|
Boost : |
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-01-09 16:33:03
----- Original Message -----
From: "David B. Held" <dheld_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, January 09, 2003 1:16 PM
Subject: [boost] Re: Re: How to do this in
withboost--assert(typeid(T)==typeid(bool) )
> "Paul Mensonides" <pmenso57_at_[hidden]> wrote in message
> news:000901c2b823$1e7f4aa0$8c00a8c0_at_c161550b...
> ----- Original Message -----
> From: "Terje Slettebø" <tslettebo_at_[hidden]>
>
> > [...]
> > BOOST_STATIC_ASSERT((\
> > boost::is_same<T, bool>::value ||\
> > boost::is_same<T, int>::value ||\
> > boost::is_same<T, double>::value ||\
> > boost::is_same<T, std::string>::value ));
>
> And this is still bulkier and less elegant than the two-line MPL solution.
> ;)
Which could be even shorter yet if we could get away with template template
parameters.
Paul Mensonides
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk