Open llvmbot opened 12 years ago
Given this code, clang++ should diagnose that 'x' is not a constant, and thus can't be used as a template argument.
We would need to be more specific than that: 'x' is not a constant, and does not denote an object of static storage duration, and is not of a class type with a constexpr conversion operator, and is not of type std::nullptr_t.
Or perhaps we should improve the note (to explain why the argument is invalid for the one-and-only candidate).
Extended Description
Given this code, clang++ should diagnose that 'x' is not a constant, and thus can't be used as a template argument.
This actually results in "error: no matching member function for call to 'foo'" with a final notice of "note: candidate template ignored: invalid explicitly-specified argument for template parameter 'I'".