mirror of git://gcc.gnu.org/git/gcc.git
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 |
||
|---|---|---|
| .. | ||
| astuple | ||
| comparison_operators | ||
| cons | ||
| make_pair | ||
| requirements | ||
| 1.cc | ||
| 2.cc | ||
| 3.cc | ||
| 4.cc | ||
| 40925.cc | ||
| 44487.cc | ||
| 70437.cc | ||
| 79141.cc | ||
| 86751.cc | ||
| constexpr_get.cc | ||
| moveable.cc | ||
| noexcept_move_assign.cc | ||
| noexcept_swap.cc | ||
| noncopyable.cc | ||
| piecewise.cc | ||
| piecewise2.cc | ||
| ref_assign.cc | ||
| swap.cc | ||
| swap_cxx17.cc | ||
| traits.cc | ||