Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-03-13 14:28:14


> BOOST_STATIC_ASSERT(sizeof(f<X>(wraps<X&>())) == 1);
oops, missed this-------------^^^

It wasn't an SP5 thing, it was the above.
However, how can we apply that? To even write that, you not only need to
know that X is a reference, you need to know what it refers to!

-Dave

----- Original Message -----
From: "Aleksey Gurtovoy" <alexy_at_[hidden]>

> This compiles:
>
> #include "boost/static_assert.hpp"
>
> struct X;
> template <class T> struct wraps{};
> template <class T> char f(wraps<T&>);
> template <class T> char(& f(void const volatile*))[2];
>
> int main()
> {
> BOOST_STATIC_ASSERT(sizeof(f<X>(wraps<X&>())) == 1);
> return 0;
> }
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>


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