Given a MPL Random Access Container (typename Types) I want to make a static const std::size_t array which contains the sizeof each type in Types. How can I do this? Thanks, Michael Marcin
Hey clown! Try what I have below.
//=========================================================================================
#include
Given a MPL Random Access Container (typename Types) I want to make a static const std::size_t array which contains the sizeof each type in Types.
How can I do this?
Thanks,
Michael Marcin
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Bah, the type of the 'sizes' array is wrong, but you get the basic idea...
On Nov 16, 2007 11:25 AM, Robert Dailey
Hey clown! Try what I have below.
//========================================================================================= #include
#include void MPLVectorTest() { using namespace boost::mpl;
typedef vector
MixedVector; static const std::size_t sizes[] = { sizeof( at_c
::type ), sizeof( at_c ::type ), sizeof( at_c ::type ), sizeof( at_c ::type ), sizeof( at_c ::type ) }; }
On Nov 16, 2007 12:37 AM, Michael Marcin
wrote: Given a MPL Random Access Container (typename Types) I want to make a static const std::size_t array which contains the sizeof each type in Types.
How can I do this?
Thanks,
Michael Marcin
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Michael Marcin
-
Robert Dailey