[boost] Re: is_class

2003-02-19 Thread Gennaro Prota
On Tue, 18 Feb 2003 19:14:50 +0200, Rani Sharoni [EMAIL PROTECTED] wrote: This is very nice technique. Just notice that you also need to handle void, functions and arrays types. Abstract classes, functions and array types will fail the completion on the burn conversion operator since they are

[boost] Re: is_class

2003-02-19 Thread Gennaro Prota
On Wed, 19 Feb 2003 16:09:26 +0200, Rani Sharoni [EMAIL PROTECTED] wrote: // fire-prevention template typename T BurnT ref(T*); You can improve it to deal with qualified function types (you can't have pointers or references for such types): Right. However the version with the (pointer

Re: [boost] Re: is_class

2003-02-18 Thread Peter Dimov
Rani Sharoni wrote: You can probably use a similar approach to implement yet another is_class (not void, reference and doesn't have an implicit standard conversion to bool). I wonder whether int () const has an implicit standard conversion to bool. ;-)

Re: [boost] Re: is_class

2003-02-17 Thread Daniel Frey
Dave Gomboc wrote: No, I would prefer #if BOOST_WORKAROUND(__HP_aCC, =33900) || BOOST_WORKAROUND(__VisualAge, =12345) template bool cond, typename T struct enable_if; #else template bool, typename struct enable_if; #endif I already explained the reason: C++ compiler vendors

[boost] Re: is_class

2003-02-17 Thread Dave Gomboc
No, I would prefer #if BOOST_WORKAROUND(__HP_aCC, =33900) || BOOST_WORKAROUND(__VisualAge, =12345) template bool cond, typename T struct enable_if; #else template bool, typename struct enable_if; #endif I already explained the reason: C++ compiler vendors use Boost

[boost] Re: is_class

2003-02-17 Thread Gennaro Prota
On Mon, 17 Feb 2003 08:34:24 -0500, David Abrahams [EMAIL PROTECTED] wrote: I think even Intel 7 is using the old front-end, but Intel 6 certainly. I don't know whether you'll _notice_ a difference, though. I don't know what is, in context, the old front-end here. However Intel C++ 7 for

[boost] Re: is_class

2003-02-17 Thread Gennaro Prota
On Mon, 17 Feb 2003 10:02:58 +0100, Daniel Frey [EMAIL PROTECTED] wrote: I started to implement my own type-traits to see if I can do it and to learn something. While doing so, my design lead me to some dependencies: is_enum needed is_class Daniel, my apologies in advance if this is just a

[boost] Re: is_class

2003-02-16 Thread Gennaro Prota
On Sun, 16 Feb 2003 03:12:13 +0100, Daniel Frey [EMAIL PROTECTED] wrote: On Sun, 16 Feb 2003 01:14:17 +0100, David Abrahams wrote: Daniel Frey [EMAIL PROTECTED] writes: I won't try to fix any of these anymore. I neither understand the documentation nor the implementation of boost's

Re: [boost] Re: is_class

2003-02-16 Thread Daniel Frey
Gennaro Prota wrote: More generally, cleaning up implementations is IMHO a must do at this point of the boost evolution. Rather than worrying about ordinary releases, I think we should have the library undergoing a global review, focused on eliminating the noise that have been accumulating

Re: [boost] Re: is_class

2003-02-16 Thread David Abrahams
Gennaro Prota [EMAIL PROTECTED] writes: And lambda_support, in turn, includes so much preprocessor stuff that I think it is more than what I would have in the whole application hadn't I included is_integral. Only on non-conforming compilers like vc6/7. On the rest, lambda_support.hpp is

Re: [boost] Re: is_class

2003-02-16 Thread David Abrahams
Gennaro Prota [EMAIL PROTECTED] writes: #include boost/type_traits/detail/bool_trait_def.hpp I end up including: - template_arity_spec.hpp - bool_c.hpp and - lambda_support.hpp (!!!) And lambda_support, in turn, includes so much preprocessor stuff that I think it is more than

[boost] Re: is_class

2003-02-16 Thread Dave Gomboc
See also the discussion about a general coding guideline to always provide a name for template parameters. Here, the maintainer already did the right thing when he received the patch. If the maintainer hid the compiler brokenness completely, then they did the wrong thing. If they didn't,

Re: [boost] Re: is_class

2003-02-16 Thread Daniel Frey
Dave Gomboc wrote: See also the discussion about a general coding guideline to always provide a name for template parameters. Here, the maintainer already did the right thing when he received the patch. If the maintainer hid the compiler brokenness completely, then they did the wrong

Re: [boost] Re: is_class

2003-02-15 Thread John Maddock
After thinking about it longer, I still think that there is a problem. The code seems twisted to me. Let me try to explain it, I start by some observations (all for the case of BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION not being set): is_scalar is based on 3.9/10, which says that

[boost] Re: is_class

2003-02-14 Thread Daniel Frey
On Fri, 07 Feb 2003 12:48:13 +0100, John Maddock wrote: Why can't I see them?? Look at: OK the implementation is: BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and ::boost::type_traits::ice_not ::boost::is_unionT::value ::value,

[boost] Re: is_class

2003-02-06 Thread Gennaro Prota
On Wed, 05 Feb 2003 14:37:34 +0100, Daniel Frey [EMAIL PROTECTED] wrote: Maybe it's just me but the boost source is feeling more and more unmaintainable given the extrem use of MACROs to workaround each and every problem some compilers have. Am I the only one who feels uncomfortable with it? No,

Re: [boost] Re: is_class

2003-02-04 Thread Peter Dimov
From: Daniel Frey [EMAIL PROTECTED] On Tue, 04 Feb 2003 00:23:26 +0100, Paul Mensonides wrote: - Original Message - From: Daniel Frey [EMAIL PROTECTED] template class C, typename T struct is_member_function_pointer T C::* { enum { value = is_function T ::value }; };

Re: [boost] Re: is_class

2003-02-04 Thread Daniel Frey
Peter Dimov wrote: Are you sure that T C::* const is a type? Isn't it? It's a constant pointer to a member of class C. T may be the type of a member variable or (although GCC don't detect it) a function type. At least this is my current understanding. Do you have a reason to ask about it? I

Re: [boost] Re: is_class

2003-02-04 Thread Daniel Frey
Peter Dimov wrote: From: Daniel Frey [EMAIL PROTECTED] Peter Dimov wrote: Are you sure that T C::* const is a type? Isn't it? It's a constant pointer to a member of class C. T may be the type of a member variable or (although GCC don't detect it) a function type. At least this

[boost] Re: is_class

2003-02-03 Thread Daniel Frey
On Tue, 04 Feb 2003 00:23:26 +0100, Paul Mensonides wrote: - Original Message - From: Daniel Frey [EMAIL PROTECTED] template class C, typename T struct is_member_function_pointer T C::* { enum { value = is_function T ::value }; }; template class C, typename T struct