Subject: [Boost-bugs] [Boost C++ Libraries] #7697: Boost.Test in C++11 w/ Clang fails with decltype usage
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-11-15 13:22:40
#7697: Boost.Test in C++11 w/ Clang fails with decltype usage
-------------------------------------+--------------------------------------
Reporter: mikhailberis | Owner: rogeeff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------+--------------------------------------
Error trace reproduced below:
{{{
clang-darwin.compile.c++ bin.v2/libs/test/build/clang-
darwin-4.2.1/debug/unit_test_monitor.o
In file included from libs/test/src/unit_test_monitor.cpp:16:
In file included from ./boost/test/impl/unit_test_monitor.ipp:21:
In file included from ./boost/test/test_tools.hpp:373:
In file included from ./boost/test/tools/impl.hpp:25:
./boost/test/tools/assertion.hpp:158:1: error: expected ')'
BOOST_TEST_FOR_EACH_CONST_OP( DEFINE_CONST_OPER )
^
./boost/test/tools/assertion.hpp:90:13: note: expanded from macro
'BOOST_TEST_FOR_EACH_CONST_OP'
action( >>, RSH, >> ) \
^
./boost/test/tools/assertion.hpp:135:33: note: expanded from macro
'DEFINE_CONST_OPER'
typedef DEDUCE_RESULT_TYPE( oper ) result_type; \
^
./boost/test/tools/assertion.hpp:126:103: note: expanded from macro
'DEDUCE_RESULT_TYPE'
# define DEDUCE_RESULT_TYPE( oper ) typename
boost::remove_reference<decltype(boost::declval<Lhs>() oper
boost::declval<Rhs>() )>::type
^
./boost/test/tools/assertion.hpp:158:31: note: to match this '('
BOOST_TEST_FOR_EACH_CONST_OP( DEFINE_CONST_OPER )
^
./boost/test/tools/assertion.hpp:90:5: note: expanded from macro
'BOOST_TEST_FOR_EACH_CONST_OP'
action( >>, RSH, >> ) \
^
./boost/test/tools/assertion.hpp:135:13: note: expanded from macro
'DEFINE_CONST_OPER'
typedef DEDUCE_RESULT_TYPE( oper ) result_type; \
^
./boost/test/tools/assertion.hpp:126:80: note: expanded from macro
'DEDUCE_RESULT_TYPE'
# define DEDUCE_RESULT_TYPE( oper ) typename
boost::remove_reference<decltype(boost::declval<Lhs>() oper
boost::declval<Rhs>() )>::type
^
./boost/test/tools/assertion.hpp:158:1: error: expected ')'
BOOST_TEST_FOR_EACH_CONST_OP( DEFINE_CONST_OPER )
^
./boost/test/tools/assertion.hpp:92:5: note: expanded from macro
'BOOST_TEST_FOR_EACH_CONST_OP'
BOOST_TEST_FOR_EACH_COMP_OP(action) \
^
./boost/test/tools/assertion.hpp:69:13: note: expanded from macro
'BOOST_TEST_FOR_EACH_COMP_OP'
action( > , GT, <= ) \
^
./boost/test/tools/assertion.hpp:135:33: note: expanded from macro
'DEFINE_CONST_OPER'
typedef DEDUCE_RESULT_TYPE( oper ) result_type; \
^
./boost/test/tools/assertion.hpp:126:103: note: expanded from macro
'DEDUCE_RESULT_TYPE'
# define DEDUCE_RESULT_TYPE( oper ) typename
boost::remove_reference<decltype(boost::declval<Lhs>() oper
boost::declval<Rhs>() )>::type
^
./boost/test/tools/assertion.hpp:158:31: note: to match this '('
BOOST_TEST_FOR_EACH_CONST_OP( DEFINE_CONST_OPER )
^
./boost/test/tools/assertion.hpp:92:33: note: expanded from macro
'BOOST_TEST_FOR_EACH_CONST_OP'
BOOST_TEST_FOR_EACH_COMP_OP(action) \
^
./boost/test/tools/assertion.hpp:69:5: note: expanded from macro
'BOOST_TEST_FOR_EACH_COMP_OP'
action( > , GT, <= ) \
^
./boost/test/tools/assertion.hpp:135:13: note: expanded from macro
'DEFINE_CONST_OPER'
typedef DEDUCE_RESULT_TYPE( oper ) result_type; \
^
./boost/test/tools/assertion.hpp:126:80: note: expanded from macro
'DEDUCE_RESULT_TYPE'
# define DEDUCE_RESULT_TYPE( oper ) typename
boost::remove_reference<decltype(boost::declval<Lhs>() oper
boost::declval<Rhs>() )>::type
^
2 errors generated.
"clang++" -x c++ -Wall -Wself-assign -std=c++11 -stdlib=libc++ -O0 -g
-O0 -fno-inline -Wall -pedantic -g -DBOOST_ALL_NO_LIB=1
-DBOOST_TEST_DYN_LINK=1 -I"." -c -o "bin.v2/libs/test/build/clang-
darwin-4.2.1/debug/unit_test_monitor.o"
"libs/test/src/unit_test_monitor.cpp"
...failed clang-darwin.compile.c++ bin.v2/libs/test/build/clang-
darwin-4.2.1/debug/unit_test_monitor.o...
}}}
Clang version details:
{{{
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM
3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
}}}
My user-config.jam:
{{{
using clang : : : <cxxflags>-Wall <cxxflags>-Wself-assign
<cxxflags>-std=c++11 <cxxflags>-stdlib=libc++ <linkflags>-stdlib=libc++ ;
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7697> 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:11 UTC