http://llvm.org/bugs/show_bug.cgi?id=22402
Bug ID: 22402
Summary: variable template specialization, lambda and
std::tuple
Product: clang
Version: 3.5
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The related code is:
```
#include <tuple>
#include <iostream>
template <int I, typename =void>
bool foo;
template <>
auto foo<1, void> = std::make_tuple(1, [](auto){});
template <int I>
auto foo<I, std::enable_if_t<I==2>> = std::make_tuple(I, [](auto){});
auto foo_3 = std::make_tuple(3, [](auto){});
template <int I>
auto foo<I, std::enable_if_t<I==3>> = foo_3;
template <int I>
auto foo<I, std::enable_if_t<I==4>> = std::make_tuple(I);
int main() {
std::cout << std::get<0>(foo<1>) << std::endl; // OK, prints 1
std::cout << std::get<0>(foo<2>) << std::endl; // ERROR, won't compile
std::cout << std::get<0>(foo<3>) << std::endl; // ERROR, prints 0
std::cout << std::get<0>(foo<4>) << std::endl; // OK, prints 4
}
```
Am I missing anything here?
--
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