Details
-
Bug
-
Status: New
-
Medium
-
Resolution: Unresolved
-
Code Generation Tools
-
CODEGEN-4026
-
Description
The compiler fails to compile an example from C++14 Section 14.8.2.5 paragraph 9. The code has been adapted with a self-check below:
template<class T, class... U> struct A
{ static constexpr bool f()
template<class T1, class T2, class... U> struct A<T1, T2*, U...>
{ static constexpr bool f() { return true; } }; // #2
template<class T1, class T2> struct A<T1, T2>
{ static constexpr bool f() { return false; }
}; // #3
using x = A<int, int*>; // selects #2
static_assert(x::f(), "Whoops!");