replace BOOST_STATIC_ASSERT by C++-2011's static_assert

This commit is contained in:
Andreas Lauser 2013-08-28 13:38:52 +02:00
parent d11db08084
commit 3c9baded80

View File

@ -37,7 +37,6 @@
#define OPM_AVERAGE_HEADER
#include <boost/static_assert.hpp>
#include <boost/type_traits.hpp>
#include <cmath>
@ -53,7 +52,7 @@ namespace Opm {
{
// To avoid some user errors, we disallow taking averages of
// integral values.
BOOST_STATIC_ASSERT(boost::is_integral<T>::value == false);
static_assert(boost::is_integral<T>::value == false, "");
Tresult retval(t1);
retval += t2;
retval *= 0.5;
@ -71,7 +70,7 @@ namespace Opm {
{
// To avoid some user errors, we disallow taking averages of
// integral values.
BOOST_STATIC_ASSERT(boost::is_integral<T>::value == false);
static_assert(boost::is_integral<T>::value == false, "");
return std::sqrt(t1*t2);
}
@ -84,7 +83,7 @@ namespace Opm {
{
// To avoid some user errors, we disallow taking averages of
// integral values.
BOOST_STATIC_ASSERT(boost::is_integral<T>::value == false);
static_assert(boost::is_integral<T>::value == false, "");
return (2*t1*t2)/(t1 + t2);
}