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
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.
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
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.
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448
--- Comment #4 from Janez Zemva ---
Ok, thank you :)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
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.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103448
--- Comment #1 from Andrew Pinski ---
Hmm, even clang with libc++ produces the same
10 matches
Mail list logo