Opened 9 years ago
Closed 8 years ago
#9938 closed Bugs (fixed)
sp_array_test.cpp doesn't compile on clang++ without c++11
Reported by: | Owned by: | Peter Dimov | |
---|---|---|---|
Milestone: | To Be Determined | Component: | smart_ptr |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Compiling libs/smart_ptr/test/sp_array_test.cpp fails with both clang++ and g++ (compilers that came with Xcode 5.1, "Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)") unless c++11 is specified. The error is:
sp_array_test.cpp:204:32: error: no matching constructor for initialization of 'boost::shared_ptr<X []>'
boost::shared_ptr<X[]> px2( std::move( px ) );
note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'unique_ptr<X [], std::1::default_delete<X []> >' to 'const boost::shared_ptr<X []>' for 1st argument
One fix is to replace line 197 #if !defined( BOOST_NO_CXX11_SMART_PTR ) with #if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES)
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 8 years ago
The unit tests themselves are considered part of their respective library, so these bugs should be reported against the component corresponding to the library (smart_ptr in this case), not the regression testing component. It seems you can move the bug report to a different component if you click modify in the top right corner.
(I'm not part of the Boost inner circle, just trying to help.)
comment:3 by , 8 years ago
Component: | Regression Testing → smart_ptr |
---|---|
Owner: | changed from | to
Same problem, and same solution, for sp_unique_ptr_test.cpp