-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Eric Niebler Sent: Wednesday, July 18, 2012 5:44 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] How to force a compile failure if a template parameter isn't floating-point
On 7/18/2012 4:02 AM, Maxime van Noppen wrote:
But you might as well consider having:
template <typename FPT> std::string f_impl(FPT v) { }
std::string f(float v) { return f_impl(v); } std::string f(double v) { return f_impl(v); }
Don't forget long double. But +1 to the simple suggestion.
Ok - I'm all for KISS - BUT the imposing spectre of multiprecision looms ;-) But thanks for the helpful suggestions. Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com