You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Non-literal primitive template arguments not evaluated when matching partial specialisation.
To Reproduce
template <typename T> constexpr bool consume_r1() { return true; }
template <class T1, bool EN = true> class A { };
template <class T1> class A <T1, (bool)consume_r1<T1>() > {
constexpr static int val = 99;
};
A<int> a1; // should use specialisation
int f = a1.val; // error marked (incorrect!)
Expected behavior
The line marked with an error should not be marked, it has no error. The issue is that CDT does not use the partial specialisation of A which defines the val member, though it should.
Version Information (please complete the following information):