Opened 10 years ago

Closed 10 years ago

#7707 closed Bugs (fixed)

clang + C++11 + libstdc++ compile errors

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

Description (last modified by viboes)

There are a lot of errors when compiling with clang on c++11 mode and linking with the default library libstdc++. The errors 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.

Attachments (1)

f.log (72.2 KB ) - added by viboes 10 years ago.

Download all attachments as: .zip

Change History (5)

by viboes, 10 years ago

Attachment: f.log added

comment:1 by viboes, 10 years ago

Cc: viboes added
Version: Boost 1.52.0Boost Development Trunk

comment:2 by viboes, 10 years ago

Description: modified (diff)

comment:3 by Peter Dimov, 10 years ago

Are you sure you are testing the latest trunk?

comment:4 by Peter Dimov, 10 years ago

Resolution: fixed
Status: newclosed

Vicente, since the std::forward references were already absent when you filed the ticket, and since you haven't provided any further feedback, I'm closing this as fixed.

Note: See TracTickets for help on using tickets.