Created
August 23, 2011 21:02
-
-
Save filcab/1166522 to your computer and use it in GitHub Desktop.
clang error in FreeBSD headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filcab@aku ~/src> cat a.cpp 1 ↵ master* | |
#include <map> | |
typedef std::map<int, long> collection; | |
typedef collection::iterator iterator; | |
filcab@aku ~/src> clang++ a.cpp -c -o a.o -D_GLIBCXX_DEBUG master* | |
In file included from a.cpp:1: | |
In file included from /usr/include/c++/4.2/map:69: | |
In file included from /usr/include/c++/4.2/debug/map:39: | |
/usr/include/c++/4.2/debug/map.h:77:20: error: dependent using declaration resolved to type without 'typename' | |
using _Base::value_compare; | |
^ | |
a.cpp:4:9: note: in instantiation of template class 'std::__debug::map<int, long, std::less<int>, std::allocator<std::pair<const | |
int, long> > >' requested here | |
typedef collection::iterator iterator; | |
^ | |
/usr/include/c++/4.2/bits/stl_map.h:111:13: note: target of using declaration | |
class value_compare | |
^ | |
1 error generated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version of the programs:
filcab@aku ~/src> g++ --version
g++ (GCC) 4.2.2 20070831 prerelease [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
filcab@aku ~/src> clang++ --version
clang version 3.0 (trunk 138346)
Target: x86_64-unknown-freebsd9.0
Thread model: posix