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<class X>
struct Trans {
typedef int type;
};
template<class X>
struct Trans<X*> {
typedef void type;
};
template<class X>
struct Bar {
void fun() const throw(typename Trans<X>::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.
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.
It's unclear to me why clang doesn't apply the resolution of CWG1330 to C++03 mode.