Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-10-23 09:52:20


From: "Aleksey Gurtovoy" <agurtovoy_at_[hidden]>
> Peter Dimov wrote:
> > is_incomplete can never work. It violates ODR. ;-)
>
> You are right, of course. It should be something like this instead:

[...]

> Hmm, actually we can do even better:
>
> #define BOOST_IS_INCOMPLETE(T) \
> is_incomplete< T, boost::mpl::integral_c<long,__LINE__> > \
> /**/
>
> template< typename T >
> struct something
> : mpl::if_c<
> BOOST_IS_INCOMPLETE(T)::value
> , something_impl1<T>
> , something_impl2<T>
> >
> {
> };

Now something<> violates ODR. ;-)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk