clang: Different rules for instantiation of dynamic exception specifications in C++03 and C++11 modes (original) (raw)

Clang currently (since at least 3.1) accepts this program (made well-formed via CWG1330) in C++11 mode but rejects it in C++03 mode.

Godbolt links: acception, rejection.

template struct Trans { typedef int type; };

template struct Trans<X*> { typedef void type; };

template struct Bar { void fun() const throw(typename Trans::type); };

int main() { Bar<int*> bar = Bar<int*>(); }

It's unclear to me why clang doesn't apply the resolution of CWG1330 to C++03 mode.