
I have some functions that I want to ensure (with a compile failure - because it means a logical mistake) that they are not instantiated if the template parameter is not floating point type. In effect, #error Type Not floating point! template <typename FPT> std::string f(FPT v) { ... } At present I have added a run-time check, but doesn't prevent compilation (and instantiation). if (boost::is_floating_point<FPT>::value; == false) { assert fail or something and/or return " "Type Not floating point!"; } I don't see how enable_if can help either. I can't find BOOST_CONCEPT_ASSERT((boost::FloatingPoint<FPT>)); or boost::function_requires< boost::Integer<FPT> >(); Suggestions welcome :-) Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com