[llvm-bugs] [Bug 24891] New: std::integral_constant::operator ()() usage in std::tuple::get()
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Sep 21 03:48:42 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24891
Bug ID: 24891
Summary: std::integral_constant::operator ()() usage in
std::tuple::get()
Product: clang
Version: 3.6
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: unassignedclangbugs at nondot.org
Reporter: witosx at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 14917
--> https://llvm.org/bugs/attachment.cgi?id=14917&action=edit
c++14 source code ilustrating the problem
Clang will comply with "candidate template ignored: invalid
explicitly-specified argument for template parameter '__i'" when trying to
fetch tuple element with std::get when index is given by
std::integral_constant::operator()() called on lvalue/rvalue reference.
Attached stripped down example of source failing to compile.
Full compilation error:
rafalw at montec-d3 ~/CODE % clang++ -c -std=c++14 integral_constant.cpp
integral_constant.cpp:17:5: error: no matching function for call to 'get'
std::get<i()>(tuple);
^~~~~~~~~~~~~
integral_constant.cpp:36:5: note: in instantiation of function template
specialization 'get_b<unsigned long, 1>' requested here
get_b(I{});
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:147:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(std::pair<_Tp1, _Tp2>& __in) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:152:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(std::pair<_Tp1, _Tp2>&& __in) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:157:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(const std::pair<_Tp1, _Tp2>& __in) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:166:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(pair<_Tp, _Up>& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:171:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(const pair<_Tp, _Up>& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:176:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(pair<_Tp, _Up>&& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:181:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(pair<_Up, _Tp>& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:186:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(const pair<_Up, _Tp>& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:191:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(pair<_Up, _Tp>&& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/array:280:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(array<_Tp, _Nm>& __arr) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/array:289:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(array<_Tp, _Nm>&& __arr) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/array:297:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(const array<_Tp, _Nm>& __arr) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:832:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '__i'
get(tuple<_Elements...>& __t) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:838:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '__i'
get(const tuple<_Elements...>& __t) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:844:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '__i'
get(tuple<_Elements...>&& __t) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:867:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(tuple<_Types...>& __t) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:873:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(tuple<_Types...>&& __t) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:879:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(const tuple<_Types...>& __t) noexcept
^
integral_constant.cpp:25:5: error: no matching function for call to 'get'
std::get<i()>(tuple);
^~~~~~~~~~~~~
integral_constant.cpp:39:5: note: in instantiation of function template
specialization 'get_c<unsigned long, 1>' requested here
get_c(I{});
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:147:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(std::pair<_Tp1, _Tp2>& __in) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:152:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(std::pair<_Tp1, _Tp2>&& __in) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:157:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(const std::pair<_Tp1, _Tp2>& __in) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:166:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(pair<_Tp, _Up>& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:171:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(const pair<_Tp, _Up>& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:176:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(pair<_Tp, _Up>&& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:181:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(pair<_Up, _Tp>& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:186:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(const pair<_Up, _Tp>& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/utility:191:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(pair<_Up, _Tp>&& __p) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/array:280:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(array<_Tp, _Nm>& __arr) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/array:289:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(array<_Tp, _Nm>&& __arr) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/array:297:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Int'
get(const array<_Tp, _Nm>& __arr) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:832:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '__i'
get(tuple<_Elements...>& __t) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:838:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '__i'
get(const tuple<_Elements...>& __t) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:844:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '__i'
get(tuple<_Elements...>&& __t) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:867:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(tuple<_Types...>& __t) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:873:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(tuple<_Types...>&& __t) noexcept
^
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/tuple:879:5:
note: candidate template ignored:
invalid explicitly-specified argument for template parameter '_Tp'
get(const tuple<_Types...>& __t) noexcept
^
2 errors 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/20150921/93e52653/attachment.html>
More information about the llvm-bugs
mailing list