c1e2889a32
PR libstdc++/79141 * include/bits/stl_pair.h (__nonesuch_no_braces): New. (operator=(typename conditional< __and_<is_copy_assignable<_T1>, is_copy_assignable<_T2>>::value, const pair&, const __nonesuch&>::type)): Change __nonesuch to __nonesuch_no_braces. (operator=(typename conditional< __not_<__and_<is_copy_assignable<_T1>, is_copy_assignable<_T2>>>::value, const pair&, const __nonesuch&>::type)): Likewise. (operator=(typename conditional< __and_<is_move_assignable<_T1>, is_move_assignable<_T2>>::value, pair&&, __nonesuch&&>::type)): Likewise. * testsuite/20_util/pair/79141.cc: New. From-SVN: r246653
26 lines
871 B
C++
26 lines
871 B
C++
// { dg-do compile { target c++11 } }
|
|
|
|
// Copyright (C) 2017 Free Software Foundation, Inc.
|
|
//
|
|
// This file is part of the GNU ISO C++ Library. This library is free
|
|
// software; you can redistribute it and/or modify it under the
|
|
// terms of the GNU General Public License as published by the
|
|
// Free Software Foundation; either version 3, or (at your option)
|
|
// any later version.
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License along
|
|
// with this library; see the file COPYING3. If not see
|
|
// <http://www.gnu.org/licenses/>.
|
|
|
|
#include <utility>
|
|
|
|
int main() {
|
|
std::pair<int,int> p;
|
|
p = {};
|
|
}
|