|
Boost Users : |
Subject: Re: [Boost-users] How to force a compile failure if a template parameter isn't floating-point
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2012-07-18 09:47:16
> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf
Of
> Maxime van Noppen
> Sent: Wednesday, July 18, 2012 12:03 PM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] How to force a compile failure if a template parameter isn't
floating-point
>
> On 07/18/2012 12:54 PM, Paul A. Bristow wrote:
> > Suggestions welcome :-)
> http://www.boost.org/doc/libs/1_47_0/doc/html/boost_staticassert.html
>
> BOOST_STATIC_ASSERT(boost::is_floating_point<FPT>::value);
So why didn't I think of that ;-)
(Even when I had used BOOST_STATIC_ASSERT() elsewhere in the program!)
Thanks
Paul
--- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow_at_[hidden]
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