search for: iterator_type

Displaying 7 results from an estimated 7 matches for "iterator_type".

2012 Sep 27
4
[LLVMdev] Clang bug?
...but G++ (4.6-Ubuntu and 4.2-Darwin) compiles it fine: #include <map> using std::map; template<typename K> struct Templ8 { struct Member { typename map<K,Member*>::iterator it; }; typedef typename map<K,Member*>::iterator iterator_type; }; int main() { Templ8<int> test; } This is the command-line: clang++ -stdlib=libc++ -std=c++11 main_bug.cpp If either of the flags are removed (to compile in C++03 mode, or to use the non-clang standard library), the code compiles. If the typedef is removed or c...
2012 Sep 29
0
[LLVMdev] Clang bug?
...std::map; >> > >> > template<typename K> >> > struct Templ8 { >> > struct Member { >> > typename map<K,Member*>::iterator it; >> > }; >> > typedef typename map<K,Member*>::iterator iterator_type; >> > }; >> > >> > int main() { >> > Templ8<int> test; >> > } >> > >> > >> > >> > This is the command-line: >> > clang++ -stdlib=libc++ -std=c++11 main_bug.cpp >> > If either...
2012 Sep 28
0
[LLVMdev] Clang bug?
...les it fine: > > #include <map> > using std::map; > > template<typename K> > struct Templ8 { > struct Member { > typename map<K,Member*>::iterator it; > }; > typedef typename map<K,Member*>::iterator iterator_type; > }; > > int main() { > Templ8<int> test; > } > > > > This is the command-line: > clang++ -stdlib=libc++ -std=c++11 main_bug.cpp > If either of the flags are removed (to compile in C++03 mode, or to > use the non-clang standard libra...
2012 Sep 29
1
[LLVMdev] Clang bug?
...d C++ (both C++98 and C++11). [The difference in whether we accept the original code isn't clang versus g++, it's libc++ versus libstdc++. Clang with libstdc++ accepted this code.] There's two separate problems here. One is that given: typedef typename map<K,Member*>::iterator iterator_type; libc++'s std::map implementation was using a construct whose semantics depended on whether 'Member' is a complete type (thus triggering the instantiation of that type in the middle of instantiating map<K,Member*>, creating a dependency cycle between the two instantiations). I...
2012 Sep 28
4
[LLVMdev] Clang bug?
...;map> > > using std::map; > > > > template<typename K> > > struct Templ8 { > > struct Member { > > typename map<K,Member*>::iterator it; > > }; > > typedef typename map<K,Member*>::iterator iterator_type; > > }; > > > > int main() { > > Templ8<int> test; > > } > > > > > > > > This is the command-line: > > clang++ -stdlib=libc++ -std=c++11 main_bug.cpp > > If either of the flags are removed (to compile in C++0...
2012 Sep 29
0
[LLVMdev] Clang bug?
...nt>*&, S<int>*>::value; But Adam's code: #include <map> using std::map; template<typename K> struct Templ8 { struct Member { typename map<K,Member*>::iterator it; }; typedef typename map<K,Member*>::iterator iterator_type; }; int main() { Templ8<int> test; } is not giving a diagnostic (-stdlib=libc++ -std=c++11). You seem to be saying that Adam's code with tot clang++ -stdlib=libc++ -std=c++11 is giving a diagnostic. So there's a minor mystery here. Howard
2012 Sep 29
2
[LLVMdev] Clang bug?
On Fri, Sep 28, 2012 at 6:45 PM, Howard Hinnant <hhinnant at apple.com> wrote: > On Sep 28, 2012, at 5:54 PM, Richard Smith <richard at metafoo.co.uk> wrote: > > > Reduced testcase: > > > > template<typename T> struct A { typedef decltype(T() + 0) type; }; > > template<typename T> struct B { > > struct C { typedef typename