|
Boost : |
Subject: [boost] [Config] Failure with Clang-3.4 in C++14 mode
From: Ben Pope (benpope81_at_[hidden])
Date: 2013-12-11 02:38:43
"clang++-3.4" -c -x c++ -std=c++1y -stdlib=libc++ -O0 -g -fno-inline
-Wall -g -fPIC -DBOOST_ALL_NO_LIB=1 -I".." -o
"/home/ben/development/boost/test/build/results/boost/bin.v2/libs/config/test/config_test.test/clang-linux-3.4~c14_libc++/debug/config_test.o"
"../libs/config/test/config_test.cpp"
In file included from ../libs/config/test/config_test.cpp:76:
../libs/config/test/boost_no_constexpr.ipp:37:3: error: no viable
conversion from 'const boost_no_cxx11_constexpr::A' to 'int'
X<a> xx; // OK: unique conversion to int
^
../libs/config/test/boost_no_constexpr.ipp:27:14: note: candidate
function not viable: 'this' argument has type 'const
boost_no_cxx11_constexpr::A', but method is not marked const
constexpr operator int() { return val; }
^
../libs/config/test/boost_no_constexpr.ipp:28:14: note: candidate
function not viable: 'this' argument has type 'const
boost_no_cxx11_constexpr::A', but method is not marked const
constexpr operator long() { return 43; }
^
In file included from ../libs/config/test/config_test.cpp:231:
../libs/config/test/boost_no_cxx11_user_lit.ipp:64:15: error: invalid
operands to binary expression ('const
boost_no_cxx11_user_defined_literals::my_literal' and
'boost_no_cxx11_user_defined_literals::my_literal')
return ((a == my_literal(0x23)) && (b == my_literal(9))) ? 0 : 1;
~ ^ ~~~~~~~~~~~~~~~~
../libs/config/test/boost_no_cxx11_user_lit.ipp:22:19: note: candidate
function not viable: 'this' argument has type 'const
boost_no_cxx11_user_defined_literals::my_literal', but method is not
marked const
constexpr bool operator==(const my_literal& a) { return val == a.val; }
^
../libs/config/test/boost_no_cxx11_user_lit.ipp:64:42: error: invalid
operands to binary expression ('const
boost_no_cxx11_user_defined_literals::my_literal' and
'boost_no_cxx11_user_defined_literals::my_literal')
return ((a == my_literal(0x23)) && (b == my_literal(9))) ? 0 : 1;
~ ^ ~~~~~~~~~~~~~
../libs/config/test/boost_no_cxx11_user_lit.ipp:22:19: note: candidate
function not viable: 'this' argument has type 'const
boost_no_cxx11_user_defined_literals::my_literal', but method is not
marked const
constexpr bool operator==(const my_literal& a) { return val == a.val; }
^
^
6 warnings and 3 errors generated.
Looks like a simple fix of marking the members const.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3598.html
Ben
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk