@@ -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;
@@ -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()};
}
@@ -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; }
}