Opened 10 years ago

Closed 10 years ago

#7087 closed Bugs (fixed)

std::forward or std::move missing in Boost.Test on Darwin Clang

Reported by: Paul A. Bristow Owned by: Gennadiy Rozental
Milestone: To Be Determined Component: test
Version: Boost Development Trunk Severity: Problem
Keywords: test std::move Cc:

Description

Sandia-darwin-clang compiler in

../boost/test/tools/assertion.hpp

seems to be missing something for several Boost.math tests, for example:

Sandia-darwin-clang-trunk-c++11 - math - hypot_test / clang-darwin-trunk

http://www.boost.org/development/tests/trunk/developer/output/Sandia-darwin-clang-trunk-c++11-boost-bin-v2-libs-math-test-hypot_test-test-clang-darwin-trunk-debug-link-static.html

http://tinyurl.com/7q8ltjg

../boost/test/tools/assertion.hpp:278:29: error: 'T' does not refer to a value

: m_value( std::forward<T>(val) )

../boost/test/tools/assertion.hpp:269:19: note: declared here template<typename T>

../boost/test/tools/assertion.hpp:386:36: error: no member named 'forward' in namespace 'std'

return value_expr<T>( std::forward<T>( v ) );

Could be a missing #include, or else the compiler has rvalue refs but no std::move/forward?

Change History (4)

comment:1 by Marshall Clow, 10 years ago

I believe that if you do not specify stdlib=libc++ when using clang, you get Apple's release of gcc's standard library (which is based on gcc 4.2).

That library predates C++11, and (therefore) does not support std::move (and std::forward and lots of other C++11 stuff)

comment:2 by Marshall Clow, 10 years ago

"Someone" ought to update the clang configuration on Mac OS X so that if you specify c++11, you also get libc++

comment:3 by Paul A. Bristow, 10 years ago

Sadly this is not within my skill set!

(Might this also 'enable' numeric_limits<>::max_digits10; which should have been included from TR1 but seems not to be on many platforms, including clang?)

comment:4 by Gennadiy Rozental, 10 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk

Note: See TracTickets for help on using tickets.