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

--- Comment #9 from Tomasz KamiƄski <tkaminsk at gcc dot gnu.org> ---
Unwrapping reference wrapper is observable, and not permitted by standard,
for example this should pass
struct S { int x; };
S s1, s2;
std:::refernce_wrapper<S1> rw(s1);
std::function_ref<int&()> fr(std::nontype<&S::x>, rw);
assert( &fr() == &s1.x );
rw = std::ref(s2); // rebind
assert( &f1() == &s2.x ); // the rebind must be observed.

Reply via email to