[llvm-bugs] [Bug 27601] New: [regression] libstdc++4.9 get tuple element by type broke
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 2 04:34:15 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27601
Bug ID: 27601
Summary: [regression] libstdc++4.9 get tuple element by type
broke
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: unassignedclangbugs at nondot.org
Reporter: gonzalobg88 at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
The following code compiles fine with clang at 264182 and libstdc++4.9 (which
supports C++14 get tuple element by type) using: clang++ -std=c++14 file.cpp
#include <tuple>
int main() {
std::tuple<int, double, char> t;
std::get<double>(t);
return 0;
}
But breaks with the following error message on clang trunk (268219):
~/test> clang++ -std=c++14 file.cpp
In file included from file.cpp:1:
/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../include/c++/4.9/tuple:791:14:
error: no matching function for call to '__get_helper2'
{ return std::__get_helper2<_Tp>(__t); }
^~~~~~~~~~~~~~~~~~~~~~~
file.cpp:5:8: note: in instantiation of function template specialization
'std::get<double, int, double, char>' requested here
std::get<double>(t);
^
/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../include/c++/4.9/tuple:779:5:
note: candidate template ignored: deduced type '_Tuple_impl<3UL, double> &' of
1st parameter does not
match adjusted type 'tuple<int, double, char>' of argument [with _Head =
double, __i = 3, _Tail = <>]
__get_helper2(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
^
/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../include/c++/4.9/tuple:784:5:
note: candidate template ignored: deduced type 'const _Tuple_impl<3UL, double>
&' of 1st parameter does
not match adjusted type 'tuple<int, double, char>' of argument [with
_Head = double, __i = 3, _Tail = <>]
__get_helper2(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
^
1 error generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160502/8e62b01f/attachment-0001.html>
More information about the llvm-bugs
mailing list