[test] A new ERROR in trunk including C++11 features on C++98 mode

Hi, there is yet an error including C++11 features. Please could you take care of it? Thanks, Vicente darwin.compile.c++ ../../../bin.v2/libs/test/build/darwin-4.2.1/debug/link-static/threading-multi/framework.o In file included from ../../../boost/test/tools/assertion.hpp:19, from ../../../boost/test/tools/impl.hpp:25, from ../../../boost/test/test_tools.hpp:373, from ../../../boost/test/impl/framework.ipp:27, from ../../../libs/test/src/framework.cpp:16: ../../../boost/test/utils/is_forward_iterable.hpp:58: error: ‘>>’ should be ‘> >’ within a nested template argument list ../../../boost/test/utils/is_forward_iterable.hpp:61: error: ‘>>’ should be ‘> >’ within a nested template argument list "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -pedantic -g -gdwarf-2 -fexceptions -DBOOST_ALL_NO_LIB=1 -I"../../.." -c -o "../../../bin.v2/libs/test/build/darwin-4.2.1/debug/link-static/threading-multi/framework.o" "../../../libs/test/src/framework.cpp" ...failed darwin.compile.c++ ../../../bin.v2/libs/test/build/darwin-4.2.1/debug/link-static/threading-multi/framework.o...

Hi Vicente, On Thursday, 8. November 2012 20:05:20 Vicente J. Botet Escriba wrote:
Hi,
there is yet an error including C++11 features.
Please could you take care of it?
I just fixed it in Author: jhunold Date: 2012-11-08 15:34:04 EST (Thu, 08 Nov 2012) New Revision: 81255 URL: http://svn.boost.org/trac/boost/changeset/81255 Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

Le 08/11/12 21:49, Jürgen Hunold a écrit :
Hi Vicente,
On Thursday, 8. November 2012 20:05:20 Vicente J. Botet Escriba wrote:
Hi,
there is yet an error including C++11 features.
Please could you take care of it? I just fixed it in
Author: jhunold Date: 2012-11-08 15:34:04 EST (Thu, 08 Nov 2012) New Revision: 81255 URL: http://svn.boost.org/trac/boost/changeset/81255
Yours,
Jürgen Thanks,
there are yet new warnings. clang-darwin.compile.c++ ../../../bin.v2/libs/thread/test/test_2741.test/clang-darwin-3.0/debug/threading-multi/test_2741.o In file included from test_2741.cpp:17: In file included from ../../../boost/test/unit_test.hpp:19: 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:222:30: warning: unused parameter 'ostr' [-Wunused-parameter] BOOST_TEST_FOR_EACH_COMP_OP( DEFINE_COLLECTION_COMPARISON ) ^ ../../../boost/test/tools/assertion.hpp:67:5: note: expanded from: action( < , LT, >= ) \ ^ ../../../boost/test/tools/assertion.hpp:214:33: note: expanded from: report( std::ostream& ostr, \ ^ ../../../boost/test/tools/assertion.hpp:222:30: warning: unused parameter 'lhs' [-Wunused-parameter] BOOST_TEST_FOR_EACH_COMP_OP( DEFINE_COLLECTION_COMPARISON ) ^ ../../../boost/test/tools/assertion.hpp:67:5: note: expanded from: action( < , LT, >= ) \ ^ ../../../boost/test/tools/assertion.hpp:215:33: note: expanded from: PrevExprType const& lhs, \ ^ ../../../boost/test/tools/assertion.hpp:222:30: warning: unused parameter 'rhs' [-Wunused-parameter] BOOST_TEST_FOR_EACH_COMP_OP( DEFINE_COLLECTION_COMPARISON ) ^ ../../../boost/test/tools/assertion.hpp:67:5: note: expanded from: action( < , LT, >= ) \ ^ ../../../boost/test/tools/assertion.hpp:216:33: note: expanded from: Rhs const& rhs ) {} \ ^ Please could this simple to fix warnings be cleaned up. Best, Vicente

Le 09/11/12 19:58, Gennadiy Rozental a écrit :
Vicente J. Botet Escriba <vicente.botet <at> wanadoo.fr> writes:
there are yet new warnings. I'll fix these tonight
Please could you take care also of this error, Thanks, Vicente clang-darwin.compile.c++ ../../../bin.v2/libs/thread/test/test_thread_launching.test/clang-darwin-3.1xl/debug/threading-multi/test_thread_launching.o In file included from test_thread_launching.cpp:9: In file included from ../../../boost/test/unit_test.hpp:19: 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 ^

Le 10/11/12 00:43, Vicente J. Botet Escriba a écrit :
Le 09/11/12 19:58, Gennadiy Rozental a écrit :
Vicente J. Botet Escriba <vicente.botet <at> wanadoo.fr> writes:
there are yet new warnings. I'll fix these tonight
Please could you take care also of this error,
Humm, forget the last message. I was compiling with clang c++11 and libstdc which is not c++11 compliant. It works with libc++. Best, Vicente
Thanks, Vicente
clang-darwin.compile.c++ ../../../bin.v2/libs/thread/test/test_thread_launching.test/clang-darwin-3.1xl/debug/threading-multi/test_thread_launching.o In file included from test_thread_launching.cpp:9: In file included from ../../../boost/test/unit_test.hpp:19: 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 ^
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Le 10/11/12 01:48, Vicente J. Botet Escriba a écrit :
Le 10/11/12 00:43, Vicente J. Botet Escriba a écrit :
Le 09/11/12 19:58, Gennadiy Rozental a écrit :
Vicente J. Botet Escriba <vicente.botet <at> wanadoo.fr> writes:
there are yet new warnings. I'll fix these tonight
Please could you take care also of this error,
Humm, forget the last message. I was compiling with clang c++11 and libstdc which is not c++11 compliant. It works with libc++. Hrrr, unfortunately doesn't works with libc++ neither.
clang-darwin.compile.c++ ../../../bin.v2/libs/thread/test/test_thread_launching.test/clang-darwin-3.1xl/debug/threading-multi/test_thread_launching.o In file included from test_thread_launching.cpp:9: In file included from ../../../boost/test/unit_test.hpp:19: 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 ^
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

2012/11/10 Vicente J. Botet Escriba <vicente.botet@wanadoo.fr>:
Le 10/11/12 01:48, Vicente J. Botet Escriba a écrit :
Le 10/11/12 00:43, Vicente J. Botet Escriba a écrit :
Le 09/11/12 19:58, Gennadiy Rozental a écrit :
Vicente J. Botet Escriba <vicente.botet <at> wanadoo.fr> writes:
there are yet new warnings.
I'll fix these tonight
One more error (can be reproduced on clang-3.0, works on GCC) during compilation of following code: template <class To, class From, class Func> To try_cast_by_ptr(const From& from, Func f) { return f(from); }; void test_getting_pointer_to_function() { // Just checking that &lexical_cast<To, From> is not ambiguous BOOST_CHECK_EQUAL(100, try_cast_by_ptr<int>("100", &boost::lexical_cast<int, const char[4]>)); BOOST_CHECK_EQUAL(100, try_cast_by_ptr<int>("100", &boost::lexical_cast<int, std::string>)); BOOST_CHECK_EQUAL(std::string("100"), try_cast_by_ptr<std::string>(100, &boost::lexical_cast<std::string, int>)); } Error text: ../lexical_cast_test.cpp:618:28: error: no matching function for call to 'try_cast_by_ptr' BOOST_CHECK_EQUAL(100, try_cast_by_ptr<int>("100", &boost::lexical_cast<int, const char[4]>)); ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../boost/test/test_tools.hpp:230:84: note: expanded from: ::boost::test_tools::tt_detail::equal_impl_frwd(), "", CHECK, CHECK_EQUAL, (L)(R), BOOST_PP_EMPTY() ) ^ ../../../boost/test/test_tools.hpp:88:61: note: expanded from: BOOST_JOIN( BOOST_TEST_TOOL_PASS_ARGS, frwd_type )( ARGS ) ); \ ^ ../../../boost/test/test_tools.hpp:70:57: note: expanded from: BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_TOOL_PASS_ARG, _, ARGS ) ^ note: (skipping 16 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) ../../../boost/preprocessor/seq/elem.hpp:43:60: note: expanded from: # define BOOST_PP_SEQ_ELEM_II(im) BOOST_PP_SEQ_ELEM_III(im) ^ ../../../boost/preprocessor/seq/elem.hpp:44:41: note: expanded from: # define BOOST_PP_SEQ_ELEM_III(x, _) x ^ ../../../boost/test/test_tools.hpp:66:49: note: expanded from: #define BOOST_TEST_TOOL_PASS_ARG( r, _, arg ) , arg, BOOST_STRINGIZE( arg ) ^~~ ../lexical_cast_test.cpp:611:4: note: candidate template ignored: couldn't infer template argument 'Func' To try_cast_by_ptr(const From& from, Func f) { ^ ../lexical_cast_test.cpp:619:28: error: no matching function for call to 'try_cast_by_ptr' BOOST_CHECK_EQUAL(100, try_cast_by_ptr<int>("100", &boost::lexical_cast<int, std::string>)); ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../boost/test/test_tools.hpp:230:84: note: expanded from: ::boost::test_tools::tt_detail::equal_impl_frwd(), "", CHECK, CHECK_EQUAL, (L)(R), BOOST_PP_EMPTY() ) ^ ../../../boost/test/test_tools.hpp:88:61: note: expanded from: BOOST_JOIN( BOOST_TEST_TOOL_PASS_ARGS, frwd_type )( ARGS ) ); \ ^ ../../../boost/test/test_tools.hpp:70:57: note: expanded from: BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_TOOL_PASS_ARG, _, ARGS ) ^ note: (skipping 16 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) ../../../boost/preprocessor/seq/elem.hpp:43:60: note: expanded from: # define BOOST_PP_SEQ_ELEM_II(im) BOOST_PP_SEQ_ELEM_III(im) ^ ../../../boost/preprocessor/seq/elem.hpp:44:41: note: expanded from: # define BOOST_PP_SEQ_ELEM_III(x, _) x ^ ../../../boost/test/test_tools.hpp:66:49: note: expanded from: #define BOOST_TEST_TOOL_PASS_ARG( r, _, arg ) , arg, BOOST_STRINGIZE( arg ) ^~~ ../lexical_cast_test.cpp:611:4: note: candidate template ignored: couldn't infer template argument 'Func' To try_cast_by_ptr(const From& from, Func f) { ^ ../lexical_cast_test.cpp:620:43: error: no matching function for call to 'try_cast_by_ptr' BOOST_CHECK_EQUAL(std::string("100"), try_cast_by_ptr<std::string>(100, &boost::lexical_cast<std::string, int>)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../boost/test/test_tools.hpp:230:84: note: expanded from: ::boost::test_tools::tt_detail::equal_impl_frwd(), "", CHECK, CHECK_EQUAL, (L)(R), BOOST_PP_EMPTY() ) ^ ../../../boost/test/test_tools.hpp:88:61: note: expanded from: BOOST_JOIN( BOOST_TEST_TOOL_PASS_ARGS, frwd_type )( ARGS ) ); \ ^ ../../../boost/test/test_tools.hpp:70:57: note: expanded from: BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_TOOL_PASS_ARG, _, ARGS ) ^ note: (skipping 16 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) ../../../boost/preprocessor/seq/elem.hpp:43:60: note: expanded from: # define BOOST_PP_SEQ_ELEM_II(im) BOOST_PP_SEQ_ELEM_III(im) ^ ../../../boost/preprocessor/seq/elem.hpp:44:41: note: expanded from: # define BOOST_PP_SEQ_ELEM_III(x, _) x ^ ../../../boost/test/test_tools.hpp:66:49: note: expanded from: #define BOOST_TEST_TOOL_PASS_ARG( r, _, arg ) , arg, BOOST_STRINGIZE( arg ) ^~~ ../lexical_cast_test.cpp:611:4: note: candidate template ignored: couldn't infer template argument 'Func' To try_cast_by_ptr(const From& from, Func f) { ^ 3 errors generated. -- Best regards, Antony Polukhin

Le 10/11/12 00:43, Vicente J. Botet Escriba a écrit :
Le 09/11/12 19:58, Gennadiy Rozental a écrit :
Vicente J. Botet Escriba <vicente.botet <at> wanadoo.fr> writes:
there are yet new warnings. I'll fix these tonight
Please could you take care also of this error,
Thanks, Vicente
clang-darwin.compile.c++ ../../../bin.v2/libs/thread/test/test_thread_launching.test/clang-darwin-3.1xl/debug/threading-multi/test_thread_launching.o In file included from test_thread_launching.cpp:9: In file included from ../../../boost/test/unit_test.hpp:19: 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 ^
Hi, any new on this issue? Vicente

Le 14/11/12 19:04, Gennadiy Rozental a écrit :
Vicente J. Botet Escriba <vicente.botet <at> wanadoo.fr> writes:
Hi,
any new on this issue? Is this still outstanding with trunk? Do you mean warnings or error?
I mean error. and yes it is yet on trunk :( Vicente

Le 15/11/12 14:57, Gennadiy Rozental a écrit :
Vicente J. Botet Escriba <vicente.botet <at> wanadoo.fr> writes:
I mean error. and yes it is yet on trunk :( Can you tell me what is it complaining about more specifically? I do not have access to this setup. And why doesn't it fail in my own unit tests?
The patch provided by Daniel in another post solves the issue. Thanks Daniel :) Maybe the patch should be applied only for clang-3.1 c++11 to avoid troubles with other compilers. Best, Vicente

On 15 November 2012 16:37, Vicente J. Botet Escriba <vicente.botet@wanadoo.fr> wrote:
The patch provided by Daniel in another post solves the issue. Thanks Daniel :)
Maybe the patch should be applied only for clang-3.1 c++11 to avoid troubles with other compilers.
Last I heard you can't do that for clang, because llvm and apple's clang use different version numbers: http://lists.boost.org/Archives/boost/2011/06/182655.php Although, maybe that's no longer true, or it's possible to do something that works well enough. We'd need someone with apple's clang to check what it does.

I'll have a go at it. It may take a while due to timezone differences (UTC+11 here). --Dean (Sent from a Galaxy Nexus) On 16/11/2012 6:48 AM, "Daniel James" <dnljms@gmail.com> wrote:
The patch provided by Daniel in another post solves the issue. Thanks Daniel :)
Maybe the patch should be applied only for clang-3.1 c++11 to avoid
On 15 November 2012 16:37, Vicente J. Botet Escriba <vicente.botet@wanadoo.fr> wrote: troubles
with other compilers.
Last I heard you can't do that for clang, because llvm and apple's clang use different version numbers:
http://lists.boost.org/Archives/boost/2011/06/182655.php
Although, maybe that's no longer true, or it's possible to do something that works well enough. We'd need someone with apple's clang to check what it does.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Fri, Nov 16, 2012 at 11:54 AM, Gennadiy Rozental <rogeeff@gmail.com> wrote:
Vicente J. Botet Escriba <vicente.botet <at> wanadoo.fr> writes:
The patch provided by Daniel in another post solves the issue. Thanks Daniel :)
I've checked in simple patch into trunk. Please try updating.
Awesome stuff, thanks Gennadiy! Yes that fixes it. -- Dean Michael Berris www.deanberris.com
participants (6)
-
Antony Polukhin
-
Daniel James
-
Dean Michael Berris
-
Gennadiy Rozental
-
Jürgen Hunold
-
Vicente J. Botet Escriba