Dave A. wrote: > > AFAICT the logic is backwards: you should assume there's no > > std::abs which works on long long and use your own function by > > default, only using std::abs if the compiler is *known* to support > > that extension... if it's even worth the trouble (it'll be less > > code to just do the whole thing yourself).
Point taken. Markus S. wrote: > Looks like there a two cases which would need two macros. > > - BOOST_NO_STD_ABS identifies that no std::abs is available. > > - BOOST_HAS_STD_ABS_LONG_LONG identifies that the compiler provides a > long long overload for std::abs. > > Those macro names follow the general macro naming convention, I think. > > The easiest thing would probably be to just say > > namespace whatever { inline template <class T> T abs(T) { ... } } > > and use this, as Dave suggested. I think I'm inclined to take Dave's last suggestion, rename the template function and remove all the macros. Jeff _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost