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


Hello,

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?

Thanks

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