This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/63628] [c++1y] cannot use decltype on captured arg-pack
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Oct 2014 12:41:17 +0000
- Subject: [Bug c++/63628] [c++1y] cannot use decltype on captured arg-pack
- Auto-submitted: auto-generated
- References: <bug-63628-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63628
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-10-23
Summary|[c++1y] cannot use decltype |[c++1y] cannot use decltype
|on captured variable in |on captured arg-pack
|generic lambda |
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This still fails on trunk, reduced from the original code in PR 61814
auto const pack = [](auto... t)
{
[&]
{
int a[] = { static_cast<decltype(t)>(t)... };
};
};
int main() {
pack(1);
}
ll.cc: In instantiation of â<lambda(auto:1 ...)>::<lambda()> [with auto:1 =
{int}]â:
ll.cc:5:49: required from âstruct<lambda(auto:1 ...)> [with auto:1 =
{int}]::<lambda()>â
ll.cc:3:9: required from â<lambda(auto:1 ...)> [with auto:1 = {int}]â
ll.cc:10:15: required from here
ll.cc:5:55: error: cannot convert âdecltype (t)â to âintâ in initialization
int a[] = { static_cast<decltype(t)>(t)... };
^
ll.cc:5:55: error: storage size of âaâ isnât known