The following code compiles using both clang and gcc, even though Foo_t<T>::Bar
doesn't have typename
in front of it:
struct Foo {
using Bar = int;
};
template<class...>
using Foo_t = Foo;
template<class T>
void f(){
Foo_t<T>::Bar b; // no typename!
}
int main(){
f<int>();
}
Should it compile?
Aucun commentaire:
Enregistrer un commentaire