https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64085
Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com --- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> --- This is a reduced testcase: template<typename T> struct reference_wrapper { T& get() const noexcept; }; template<class T> auto make_monad(reference_wrapper<T> arg) { return [&captive = arg.get()](auto&&) { return 1; }; } int main() { make_monad(reference_wrapper<int&>()); }