« Return to Thread: detect if a type has a size_t member

Re: detect if a type has a size_t member

by Joel Falcou-3 :: Rate this Message:

Reply to Author | View in Thread

Hicham Mouline wrote:
> which doesn't build because
>
> error C2953: 'boost::introspection::has_member_data_maxsize' : class
> template has already been defined
>  
The macro build a template meta-function that you use on your type :

BOOST_HAS_MEMBER_DATA(size_t, maxsize);


int main()
{
    if ( boost::introspection::has_member_data_maxsize<T>::value )
    {
        std::cout<<" T has max_size"<<std::endl;
    }
    return 0;
}


___________________________________________
Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35


_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

 « Return to Thread: detect if a type has a size_t member