Fix testsuite bugs.

* testsuite/20_util/exchange/1.cc: Add missing return statements.
	* testsuite/20_util/pair/40925.cc: Avoid most vexing parse.
	* testsuite/22_locale/codecvt_byname/50714.cc: Add missing exception
	specifications.

From-SVN: r209196
This commit is contained in:
Jonathan Wakely 2014-04-07 19:40:18 +01:00 committed by Jonathan Wakely
parent aabc3affe5
commit 631e3e1b75
4 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2014-04-07 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/exchange/1.cc: Add missing return statements.
* testsuite/20_util/pair/40925.cc: Avoid most vexing parse.
* testsuite/22_locale/codecvt_byname/50714.cc: Add missing exception
specifications.
2014-04-02 Dominique d'Humieres <dominiq@lps.ens.fr>
Jack Howarth <howarth@bromo.med.uc.edu>

View File

@ -78,8 +78,8 @@ void test04()
To() = default;
To(const To&) = default;
To(const From&) = delete;
To& operator=(const From&) { value = 1; }
To& operator=(From&&) { value = 2; }
To& operator=(const From&) { value = 1; return *this; }
To& operator=(From&&) { value = 2; return *this; }
};
To t;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2009-2014 Free Software Foundation, Inc.
@ -63,5 +63,5 @@ void test01()
std::pair<move_only, int*> p15(move_only(), ip);
std::pair<move_only, int X::*> p16(move_only(), mp);
std::pair<move_only, move_only> p17(move_only(), move_only());
std::pair<move_only, move_only> p17{move_only(), move_only()};
}

View File

@ -52,12 +52,12 @@ namespace std
template<>
int
codecvt<mychar, char, mbstate_t>::do_encoding() const
codecvt<mychar, char, mbstate_t>::do_encoding() const throw()
{ return 0; }
template<>
bool
codecvt<mychar, char, mbstate_t>::do_always_noconv() const
codecvt<mychar, char, mbstate_t>::do_always_noconv() const throw()
{ return false; }
template<>
@ -69,7 +69,7 @@ namespace std
template<>
int
codecvt<mychar, char, mbstate_t>::do_max_length() const
codecvt<mychar, char, mbstate_t>::do_max_length() const throw()
{ return 4; }
}