This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/64085] ICE on C++14 lambda by-reference capture with an initializer


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&>());
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]