This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64085] ICE on C++14 lambda by-reference capture with an initializer
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Mar 2015 17:42:37 +0000
- Subject: [Bug c++/64085] ICE on C++14 lambda by-reference capture with an initializer
- Auto-submitted: auto-generated
- References: <bug-64085-4 at http dot gcc dot gnu dot org/bugzilla/>
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&>());
}