[Bug c++/64085] ICE on C++14 lambda by-reference capture with an initializer
paolo.carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Wed Mar 4 17:42:00 GMT 2015
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&>());
}
More information about the Gcc-bugs
mailing list