Boost logo

Boost Users :

Subject: Re: [Boost-users] template type asserting
From: Philipp Kraus (philipp.kraus_at_[hidden])
Date: 2011-01-25 13:38:02


On 2011-01-25 18:02:33 +0100, Igor R said:

>>
>> I have written a template class and I would like tot "assert the type". My
>> class should only use floating point types like double or float. Can I do
>> this check with BOOST_STATIC_ASSERT  or anything else? The class need not to
>> use a "countable type" (math: in N).
>
> BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);

Thanks at all, but I think that's the best solution with is_integral

Phil


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net