Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9811: boost/boost/chrono/duration.hpp:355:56: error: call to non-constexpr function 'static std::numeric_limits<float>::_Ty std::numeric_limits<float>::max()' /home/zosun/input_service/inputservices-core-service/other/boost/boost/chrono/duration.hpp: In static member function 'static constexpr double boost::chrono::detail::chrono_numeric_limits<double, true>::lowest()':
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-04-19 07:04:51
#9811: boost/boost/chrono/duration.hpp:355:56: error: call to non-constexpr
function 'static std::numeric_limits<float>::_Ty
std::numeric_limits<float>::max()' /home/zosun/input_service/inputservices-
core-service/other/boost/boost/chrono/duration.hpp: In static member
function 'static constexpr double
boost::chrono::detail::chrono_numeric_limits<double, true>::lowest()':
-------------------------------+---------------------
Reporter: szj087@⦠| Owner: viboes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: chrono
Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+---------------------
Comment (by viboes):
An alternative could be to define BOOST_CHRONO_LIB_CONSTEXPR if not
already defined
{{{
#ifndef BOOST_CHRONO_LIB_CONSTEXPR
#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
#define BOOST_CHRONO_LIB_CONSTEXPR
#elif defined(_LIBCPP_VERSION) && !defined(_LIBCPP_CONSTEXPR)
#define BOOST_CHRONO_LIB_CONSTEXPR
#else
#define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR
#endif
#endif
}}}
Now the user could define BOOST_CHRONO_LIB_CONSTEXPR if its c++ std
library doesn't supports constexpr for numeric_limits. What do you think?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9811#comment:5> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC