Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Struct template is_aggregate

boost::proto::is_aggregate — A Boolean metafunction that indicates whether a type requires aggregate initialization.


// In header: <boost/proto/traits.hpp>

template<typename T> 
struct is_aggregate :  mpl::bool_<true-or-false> {


proto::is_aggregate<> is used by the proto::make<> transform to determine how to construct an object of some type T, given some initialization arguments a0, If proto::is_aggregate<T>::value is true, then an object of type T will be initialized as T t = {a0,};. Otherwise, it will be initialized as T t(a0,

Note: proto::expr<> and proto::basic_expr<>are aggregates.