Opened 10 years ago

Last modified 10 years ago

#7707 closed Bugs

clang + C++11 + libstdc++ compile errors — at Initial Version

Reported by: viboes Owned by: Peter Dimov
Milestone: To Be Determined Component: smart_ptr
Version: Boost Development Trunk Severity: Problem
Keywords: Cc: viboes

Description

There are a lot of errors when compiling with clang on c++11 mode and linking with the default library libstdc++. The erros come from the fact that the code is expecting the standard library to provide some c++11 features which are missing, as std::forward.

clang-darwin.compile.c++ ../../../bin.v2/libs/smart_ptr/test/smart_ptr_test.test/clang-darwin-3.1x/debug/smart_ptr_test.o
In file included from smart_ptr_test.cpp:36:
In file included from ../../../boost/smart_ptr.hpp:28:
In file included from ../../../boost/make_shared.hpp:15:
In file included from ../../../boost/smart_ptr/make_shared.hpp:18:
../../../boost/smart_ptr/make_shared_array.hpp:54:36: error: no member named 'forward' in namespace 'std'
        d2->construct(p2, n1, std::forward<Args>(args)...);
                              ~~~~~^
../../../boost/smart_ptr/make_shared_array.hpp:54:44: error: 'Args' does not refer to a value
        d2->construct(p2, n1, std::forward<Args>(args)...);
                                           ^
../../../boost/smart_ptr/make_shared_array.hpp:40:38: note: declared here
    template<typename T, typename... Args>
                                     ^
../../../boost/smart_ptr/make_shared_array.hpp:71:36: error: no member named 'forward' in namespace 'std'
        d2->construct(p2, n1, std::forward<Args>(args)...);
                              ~~~~~^
../../../boost/smart_ptr/make_shared_array.hpp:71:44: error: 'Args' does not refer to a value
        d2->construct(p2, n1, std::forward<Args>(args)...);
                                           ^
../../../boost/smart_ptr/make_shared_array.hpp:57:38: note: declared here
    template<typename T, typename... Args>

See the attached file for a complete list of failures when running the smart_ptr tests.

Change History (1)

by viboes, 10 years ago

Attachment: f.log added
Note: See TracTickets for help on using tickets.