Skip to content

Instantly share code, notes, and snippets.

@filcab
Created August 23, 2011 21:02
Show Gist options
  • Save filcab/1166522 to your computer and use it in GitHub Desktop.
Save filcab/1166522 to your computer and use it in GitHub Desktop.
clang error in FreeBSD headers
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.
@filcab
Copy link
Author

filcab commented Aug 23, 2011

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment