Skip to content

Instantly share code, notes, and snippets.

@biot023
Created June 26, 2011 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biot023/1047946 to your computer and use it in GitHub Desktop.
Save biot023/1047946 to your computer and use it in GitHub Desktop.
Errors when trying to use clang with C++11
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/test_runner.o test/test_runner.cpp
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;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
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:100:17: error: expected a class or namespace
typedef sequences_type::const_iterator sequences_cit;
^
/usr/local/include/turtle/expectation.hpp:41:48: error: member reference base type 'sequences_type'
(aka 'int') is not a structure or union
for( sequences_cit it = sequences_.begin();
~~~~~~~~~~ ^
/usr/local/include/turtle/expectation.hpp:42:34: error: member reference base type 'sequences_type'
(aka 'int') is not a structure or union
it != sequences_.end(); ++it )
~~~~~~~~~~ ^
/usr/local/include/turtle/expectation.hpp:43:18: error: indirection requires pointer operand ('sequences_cit'
(aka 'int') invalid)
(*it)->remove( this );
^~~
/usr/local/include/turtle/expectation.hpp:59:48: error: member reference base type 'const sequences_type'
(aka 'const int') is not a structure or union
for( sequences_cit it = sequences_.begin();
~~~~~~~~~~ ^
/usr/local/include/turtle/expectation.hpp:60:34: error: member reference base type 'const sequences_type'
(aka 'const int') is not a structure or union
it != sequences_.end(); ++it )
~~~~~~~~~~ ^
/usr/local/include/turtle/expectation.hpp:61:24: error: indirection requires pointer operand ('sequences_cit'
(aka 'int') invalid)
if( ! (*it)->is_valid( this ) )
^~~
/usr/local/include/turtle/expectation.hpp:64:48: error: member reference base type 'const sequences_type'
(aka 'const int') is not a structure or union
for( sequences_cit it = sequences_.begin();
~~~~~~~~~~ ^
/usr/local/include/turtle/expectation.hpp:65:34: error: member reference base type 'const sequences_type'
(aka 'const int') is not a structure or union
it != sequences_.end(); ++it )
~~~~~~~~~~ ^
/usr/local/include/turtle/expectation.hpp:66:18: error: indirection requires pointer operand ('sequences_cit'
(aka 'int') invalid)
(*it)->invalidate( this );
^~~
/usr/local/include/turtle/expectation.hpp:95:24: error: member reference base type 'sequences_type'
(aka 'int') is not a structure or union
sequences_.push_back( s );
~~~~~~~~~~ ^
In file included from test/game_factory_test.cpp:8:
In file included from /usr/local/include/turtle/mock.hpp:15:
/usr/local/include/turtle/function.hpp:285:26: error: too few template arguments for class template 'list'
typedef std::list< expectation_type > expectations_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:85:47: note: template is declared here
template <class T, class Allocator> class list;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
In file included from test/game_factory_test.cpp:8:
In file included from /usr/local/include/turtle/mock.hpp:15:
/usr/local/include/turtle/function.hpp:287:17: error: expected a class or namespace
expectations_type::const_iterator expectations_cit;
^
/usr/local/include/turtle/function.hpp:287:36: error: expected a qualified name after 'typename'
expectations_type::const_iterator expectations_cit;
^
/usr/local/include/turtle/function.hpp:287:50: error: expected ';' at end of declaration list
expectations_type::const_iterator expectations_cit;
^
;
/usr/local/include/turtle/function.hpp:132:26: error: use of undeclared identifier 'expectations_cit'; did you
mean 'expectations_'?
for( expectations_cit it = expectations_.begin();
^~~~~~~~~~~~~~~~
expectations_
/usr/local/include/turtle/function.hpp:289:31: note: 'expectations_' declared here
expectations_type expectations_;
^
/usr/local/include/turtle/function.hpp:132:43: error: expected ';' in 'for' statement specifier
for( expectations_cit it = expectations_.begin();
^
/usr/local/include/turtle/function.hpp:132:43: error: use of undeclared identifier 'it'
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
rake aborted!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment