| Issue |
56439
|
| Summary |
clang: Different rules for instantiation of dynamic exception specifications in C++03 and C++11 modes
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
frederick-vs-ja
|
Clang currently (since at least 3.1) accepts this program (made well-formed via [CWG1330](https://cplusplus.github.io/CWG/issues/1330.html)) in C++11 mode but rejects it in C++03 mode.
Godbolt links: [acception](https://godbolt.org/z/PToYsjd9e), [rejection](https://godbolt.org/z/TcTvW5a15).
```C++
template<class X>
struct Trans {
typedef int type;
};
template<class X>
struct Trans<X*> {
typedef void type;
};
template<class X>
int foo() throw(typename Trans<X>::type);
template<class X>
struct Bar {
void fun() const throw(typename Trans<X>::type);
};
int main()
{
foo<int>();
Bar<int*> bar = Bar<int*>();
}
```
It's unclear to me why clang doesn't apply the resolution of CWG1330 to C++03 mode.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs