[Bug libstdc++/103448] unexpected tuple collapse

2021-11-28 Thread janezz55 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448 --- Comment #10 from Janez Zemva --- The code worked for ((...), (...), ...), but not for ((...)), I did not understand how a tuple not containing another tuple could possibly be constructed. On the other hand, I already found a workaround and I

[Bug libstdc++/103448] unexpected tuple collapse

2021-11-27 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448 --- Comment #9 from Jonathan Wakely --- With class template argument deduction, T(T{}) will always make a copy of the same type, and not wrap it in a different specialization of the template. There is no bug here, as Andrew said.

[Bug libstdc++/103448] unexpected tuple collapse

2021-11-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448 --- Comment #8 from Andrew Pinski --- (In reply to Janez Zemva from comment #7) > The c++17 type deduction rules are also going on. This makes me wonder how > std::make_tuple() circumvents the problem. Easy, it does not use the C++17 deduction

[Bug libstdc++/103448] unexpected tuple collapse

2021-11-26 Thread janezz55 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448 --- Comment #7 from Janez Zemva --- The c++17 type deduction rules are also going on. This makes me wonder how std::make_tuple() circumvents the problem.

[Bug libstdc++/103448] unexpected tuple collapse

2021-11-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448 --- Comment #6 from Andrew Pinski --- (In reply to Andrew Pinski from comment #5) > (In reply to Andrew Pinski from comment #3) > > Yes it is called the copy (or move) constructor :). > > That is: > auto t = std::tuple(std::tuple(1,2)); > s

[Bug libstdc++/103448] unexpected tuple collapse

2021-11-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448 --- Comment #5 from Andrew Pinski --- (In reply to Andrew Pinski from comment #3) > Yes it is called the copy (or move) constructor :). That is: auto t = std::tuple(std::tuple(1,2)); std::cout << type_name() << std::endl; Will produce the

[Bug libstdc++/103448] unexpected tuple collapse

2021-11-26 Thread janezz55 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448 --- Comment #4 from Janez Zemva --- Ok, thank you :)

[Bug libstdc++/103448] unexpected tuple collapse

2021-11-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug libstdc++/103448] unexpected tuple collapse

2021-11-26 Thread janezz55 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448 --- Comment #2 from Janez Zemva --- I have no idea, but it seems wrong me. Is there an explanation for the lvalue references? I expected rvalue references, but that's unrelated to the bug.

[Bug libstdc++/103448] unexpected tuple collapse

2021-11-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448 --- Comment #1 from Andrew Pinski --- Hmm, even clang with libc++ produces the same