https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91456
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2019-08-15 Version|9.1.1 |10.0 Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- There's a related problem in std::is_invocable_r: // { dg-options "-std=gnu++17" } // { dg-do compile { c++17 } } #include <type_traits> struct Immovable { Immovable() = default; Immovable(const Immovable&) = delete; Immovable& operator=(const Immovable&) = delete; }; static_assert(std::is_invocable_r_v<Immovable, Immovable(*)()>); static_assert(std::is_invocable_r_v<const Immovable, Immovable(*)()>); static_assert(std::is_invocable_r_v<Immovable, const Immovable(*)()>); The assertions fail because is_invocable_r uses is_convertible, which doesn't know about guaranteed elision.