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 libstdc++/66284] std::reference_wrapper is transparent to std::function::target_type


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66284

--- Comment #2 from David Krauss <potswa at mac dot com> ---
The converting constructor requirements also say more explicitly,

  shall not throw exceptions when f is a function pointer
  or a reference_wrapper<T> for some T.

Probably the copy constructor should be worded similarly.

In any case, the exception guarantee isn't affected, as
sizeof(reference_wrapper<T>) == sizeof(T*).

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