#6820 closed Bugs (fixed)
make_big_value() in big_constant.hpp uses constexpr incorrectly
Reported by: | Eric Niebler | Owned by: | John Maddock |
---|---|---|---|
Milestone: | Boost 1.50.0 | Component: | math |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
This error is breaking the Boost.Accumulators test when compiled with recent clang builds that support constexpr.
In file included from /Users/niji/Boosty/boost-trunk/boost/math/special_functions/log1p.hpp:19: /Users/niji/Boosty/boost-trunk/boost/math/tools/big_constant.hpp:34:11: error: cannot initialize return object of type 'char *' with an lvalue of type 'const char *' return s; ^ /Users/niji/Boosty/boost-trunk/boost/math/tools/big_constant.hpp:32:39: error: no return statement in constexpr function inline BOOST_CONSTEXPR_OR_CONST char* make_big_value(long double, const char* s, mpl::false_ const&, mpl::true_ const&) ^ 2 errors generated.
Change History (3)
comment:1 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Since it's a specifier and not a type modifier, I'm pretty certain that putting it after the return type is invalid. So this:
inline const char* BOOST_CONSTEXPR_OR_CONST make_big_value(...
should be:
inline BOOST_CONSTEXPR const char* make_big_value(...
comment:3 by , 10 years ago
Note:
See TracTickets
for help on using tickets.
Nod. I spotted that earlier, hopefully it should be fixed now.