Boost logo

Boost Users :

Subject: Re: [Boost-users] detect if a type has a size_t member
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-07-07 17:40:31


Hicham Mouline wrote:

> #include <boost/introspection/has_member_data.hpp>
>
> struct S {
> static const size_t maxsize =5;
> };
>
> struct T {
> };
>
> BOOST_HAS_MEMBER_DATA(S, maxsize)
> BOOST_HAS_MEMBER_DATA(T, maxsize)

It's not BOOST_HAS_MEMBER_DATA you need, but BOOST_HAS_STATIC_MEMBER_NAMED.

Indeed, BOOST_HAS_MEMBER_DATA is for non-static members.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net