https://llvm.org/bugs/show_bug.cgi?id=23840
Bug ID: 23840
Summary: SFINAE failure with variadic non-type template
parameter
Product: clang
Version: 3.6
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
The sample code:
====== begin sample =====
template <typename T>
struct x1 {
using type = int;
};
template <typename T>
struct x2 {
};
template <typename T, typename x1<T>::type...>
void f(T x) {
}
template <typename T, typename x2<T>::type...>
void f(T x) {
}
int main(int ac, char** av) {
f(1);
}
====== end sample ====
Does not compile, as clang does not reject the second overload of f(T), even
though x2<T>::type does not exist.
g++ compiles this. This error is particularly bad since it causes
std::experimental::optional<> from libstdc++ 5 not to build.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs