The solution for PR 77537 causes ambiguities due to the extra copy assignment operator taking a __nonesuch_no_braces parameter. By making the base class non-assignable we don't need the extra deleted overload in std::pair. The copy assignment operator will be implicitly deleted (and the move assignment operator not declared) as needed. Without the additional user-provided operator in std::pair the ambiguity is avoided. PR libstdc++/86751 * include/bits/stl_pair.h (__pair_base): New class with deleted copy assignment operator. (pair): Derive from __pair_base. (pair::operator=): Remove deleted overload. * python/libstdcxx/v6/printers.py (StdPairPrinter): New pretty printer so that new base class isn't shown in GDB. * testsuite/20_util/pair/86751.cc: New test. * testsuite/20_util/pair/ref_assign.cc: New test. From-SVN: r263185
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| astuple | Loading commit data... | |
| comparison_operators | Loading commit data... | |
| cons | Loading commit data... | |
| make_pair | Loading commit data... | |
| requirements | Loading commit data... | |
| 1.cc | Loading commit data... | |
| 2.cc | Loading commit data... | |
| 3.cc | Loading commit data... | |
| 4.cc | Loading commit data... | |
| 40925.cc | Loading commit data... | |
| 44487.cc | Loading commit data... | |
| 70437.cc | Loading commit data... | |
| 79141.cc | Loading commit data... | |
| 86751.cc | Loading commit data... | |
| constexpr_get.cc | Loading commit data... | |
| moveable.cc | Loading commit data... | |
| noexcept_move_assign.cc | Loading commit data... | |
| noexcept_swap.cc | Loading commit data... | |
| noncopyable.cc | Loading commit data... | |
| piecewise.cc | Loading commit data... | |
| piecewise2.cc | Loading commit data... | |
| ref_assign.cc | Loading commit data... | |
| swap.cc | Loading commit data... | |
| swap_cxx17.cc | Loading commit data... | |
| traits.cc | Loading commit data... |