[boost] Re: Metaprogramming question

2003-08-14 Thread Thorsten Ottosen
"John Maddock" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm trying to remember, did someone around here come up with some code
that
> can tell at compiler time whether an object has a specific member or not,
I
> can do it for operators, but not a member typedef (which is what I
want)...

I think this might help

http://article.gmane.org/gmane.comp.lib.boost.devel/14119

but I could only do it with comeau back then.

best regards

Thorrsten



___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


[boost] Re: Metaprogramming question

2003-08-14 Thread David Abrahams
"John Maddock" <[EMAIL PROTECTED]> writes:

> I'm trying to remember, did someone around here come up with some code that
> can tell at compiler time whether an object has a specific member or not, I
> can do it for operators, but not a member typedef (which is what I want)...

See boost/mpl/aux_/has_xxx.hpp.  Example usage in boost/detail/iterator.hpp.

HTH,
-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


[boost] Re: Metaprogramming question

2003-08-14 Thread David Abrahams
David Abrahams <[EMAIL PROTECTED]> writes:

> "John Maddock" <[EMAIL PROTECTED]> writes:
>
>> I'm trying to remember, did someone around here come up with some code that
>> can tell at compiler time whether an object has a specific member or not, I
>> can do it for operators, but not a member typedef (which is what I want)...
>
> See boost/mpl/aux_/has_xxx.hpp.  Example usage in boost/detail/iterator.hpp.

To my knowledge, these are the platforms it fails on:

#if BOOST_WORKAROUND(__GNUC__, == 2 && __GNUC_MINOR__ == 95)\
  || BOOST_WORKAROUND(__MWERKS__, <= 0x2407)\
  || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
  no has_xxx support
#endif

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Re: [boost] Re: Metaprogramming question

2003-08-14 Thread John Maddock
> See boost/mpl/aux_/has_xxx.hpp.  Example usage in
boost/detail/iterator.hpp.

Thanks, I'll look into it.

John.


___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost