Boost logo

Boost Users :

Subject: [Boost-users] error with static assert and floating-point detection
From: Philipp Kraus (philipp.kraus_at_[hidden])
Date: 2014-03-11 10:00:55


I try to use Boost Static Assert to define a template parameter only for double & floats.
I use the call BOOST_STATIC_ASSERT( !boost::is_integral<T>::value )

I get in a class the error:
error: no member named 'is_integral' in namespace 'boost' BOOST_STATIC_ASSERT( !boost::is_integral<T>::value )

My question is, how can I check the template parameter so that only floating-point types are allowed?
How can I avoid the error?



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at