
From what I understand, this means that I am relying on implementation
Hi there, I'd like to make sure that some of my classes are only used with particular value types. This is easy enough to implement for integers, using BOOST_CONCEPT_ASSERT((boost::Integer<T>)) . However, there is no boost::FloatingPoint<T>, which is a bit odd. The following, easy code seems to do what I want, but reqires inclusion of boost/concept/detail/concept_def.hpp /*****************************************************************/ namespace boost { BOOST_concept(FloatingPoint, (T)) { BOOST_CONCEPT_USAGE(FloatingPoint) { x.error_type_must_be_a_floating_point_type(); } private: T x; }; template <> struct FloatingPoint<long double> {}; template <> struct FloatingPoint<double> {}; template <> struct FloatingPoint<float> {}; } /*****************************************************************/ details with the above code. Is there any way to do the above in a portable way ? Thanks and Best Regards, Ruediger P.S.: If the above seems acceptable, please feel free to include it in Boost.Concept.