[Bug libstdc++/91243] is_invocable mishandles functions returning indestructible types by value

2020-01-29 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91243

--- Comment #5 from TC  ---
I don't think we should use decltype's special rule in this context :)

Also, std::is_nothrow_invocable_v hard-errors in libstdc++, because the
noexcept operator doesn't have that rule...

[Bug libstdc++/91243] is_invocable mishandles functions returning indestructible types by value

2020-01-28 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91243

--- Comment #4 from Jonathan Wakely  ---
Oh that's not the problem here though. Hmm, maybe the specification of
is_invocable is bad then :-)

[Bug libstdc++/91243] is_invocable mishandles functions returning indestructible types by value

2020-01-28 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91243

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|WAITING |NEW

--- Comment #3 from Jonathan Wakely  ---
I think it's caused by a compiler bug though. For C++17 and up, G++ doesn't
object to returning a non-destructible type unless the temporary gets
materialized.

[Bug libstdc++/91243] is_invocable mishandles functions returning indestructible types by value

2020-01-28 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91243

--- Comment #2 from TC  ---
Well, this is a library bug report, not a compiler one...

[Bug libstdc++/91243] is_invocable mishandles functions returning indestructible types by value

2020-01-28 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91243

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2020-01-28
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Apparently, ICC and clang reject the code.