[Bug libstdc++/70564] Problem with std::experimental::not_fn
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 7 11:00:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70564
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2016-04-07
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> ---
(In reply to Rodrigo from comment #0)
> which calls _Not_fn<PRED>(_Not_fn<PRED>&) since __pred is an lvalue.
> However, between these _Not_fn constructors:
>
> template<typename _Fn2>
> explicit
> _Not_fn(_Fn2&& __fn) : _M_fn(std::forward<_Fn2>(__fn)) { }
>
> _Not_fn(const _Not_fn& __fn) = default;
> _Not_fn(_Not_fn&& __fn) = default;
>
> the first one wins and triggers an error.
Oops, that constructor needs to be constrained.
More information about the Gcc-bugs
mailing list