mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
Like in r16-559 for std::expected, std::indirect's operator== is also prone to constraint recursion due to CWG 2369, for the Mandates that we implement as an associated constraint. This patch works around the recursion in a similar manner as done for std::expected (and std::basic_const_iterator). PR libstdc++/124890 PR libstdc++/119714 PR libstdc++/112490 libstdc++-v3/ChangeLog: * include/bits/indirect.h (indirect::operator==): Replace non-dependent std::indirect function parameter with a dependent one of type indirect<_Vp> where _Vp matches _Tp. * testsuite/std/memory/indirect/124890.cc: New test. Reviewed-by: Jonathan Wakely <jwakely@redhat.com>