[cfe-dev] Attempt to install and test the libc++ failing rather catastrophically

Howard Hinnant hhinnant at apple.com
Sun Jun 26 17:53:18 PDT 2011


On Jun 26, 2011, at 3:37 PM, doug livesey wrote:

> Hi -- I got around to testing again -- bit of a long & heavy weekend, sorry! :)
> I rebuilt the lib with "-U__STRICT_ANSI__", & added it to my compile flags, and got this error output: https://gist.github.com/1047946
> Sorry if it's something obvious that I should know.
> Cheers,
>    Doug.
> 

> clang++ -Wall -g -std=c++0x -stdlib=libc++ -U__STRICT_ANSI__ -c -I
> include -I /usr/local/include -DENABLE_BIOT023_IDS -DBOOST_TEST_DYN_LINK
> -o test/game_factory_test.o test/game_factory_test.cpp
> In file included from test/game_factory_test.cpp:8:
> In file included from /usr/local/include/turtle/mock.hpp:15:
> In file included from /usr/local/include/turtle/function.hpp:14:
> /usr/local/include/turtle/expectation.hpp:99:22: error: too few template
> arguments for class template 'vector'
>         typedef std::vector< boost::shared_ptr< detail::sequence_impl > > sequences_type;
>                      ^
> 
> In file included from test/game_factory_test.cpp:8:
> In file included from /usr/local/include/turtle/mock.hpp:15:
> In file included from /usr/local/include/turtle/function.hpp:14:
> In file included from /usr/local/include/turtle/expectation.hpp:16:
> In file included from /usr/local/include/turtle/check.hpp:13:
> In file included from /usr/local/include/turtle/constraints.hpp:13:
> In file included from /usr/local/include/turtle/log.hpp:13:
> /usr/local/include/boost/detail/container_fwd.hpp:86:47: note: template is declared here
>     template <class T, class Allocator> class vector;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^

/usr/local/include/boost/detail/container_fwd.hpp is illegally trying to forward declare std::vector.  One has to instead #include <vector> if you need to use std::vector.  There is no portable way to forward declare the std containers (and boost developers should know better).

Howard




More information about the cfe-dev mailing list