From 98910bc2b97f248d158b301575c24597fd12ab34 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 6 Nov 2017 12:55:35 +0000 Subject: deduction.cc: Avoid -Wreturn-type warnings. 2017-11-06 Paolo Carlini * testsuite/20_util/optional/cons/deduction.cc: Avoid -Wreturn-type warnings. * testsuite/20_util/pair/cons/deduction.cc: Likewise. * testsuite/20_util/pair/traits.cc: Likewise. * testsuite/20_util/tuple/cons/deduction.cc: Likewise. * testsuite/20_util/variant/compile.cc: Likewise. * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise. * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc: Likewise. From-SVN: r254450 --- libstdc++-v3/ChangeLog | 12 +++ .../testsuite/20_util/optional/cons/deduction.cc | 4 +- .../testsuite/20_util/pair/cons/deduction.cc | 4 +- libstdc++-v3/testsuite/20_util/pair/traits.cc | 4 +- .../testsuite/20_util/tuple/cons/deduction.cc | 4 +- libstdc++-v3/testsuite/20_util/variant/compile.cc | 92 +++++++++++----------- .../23_containers/map/modifiers/try_emplace/1.cc | 1 + .../unordered_map/modifiers/try_emplace.cc | 1 + 8 files changed, 68 insertions(+), 54 deletions(-) (limited to 'libstdc++-v3') diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c18a5be..70061e9 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,15 @@ +2017-11-06 Paolo Carlini + + * testsuite/20_util/optional/cons/deduction.cc: Avoid -Wreturn-type + warnings. + * testsuite/20_util/pair/cons/deduction.cc: Likewise. + * testsuite/20_util/pair/traits.cc: Likewise. + * testsuite/20_util/tuple/cons/deduction.cc: Likewise. + * testsuite/20_util/variant/compile.cc: Likewise. + * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise. + * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc: + Likewise. + 2017-11-05 Gerald Pfeifer * doc/xml/manual/abi.xml: Move docs.oracle.com references to https. diff --git a/libstdc++-v3/testsuite/20_util/optional/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/optional/cons/deduction.cc index e15db0b..77d4ff8 100644 --- a/libstdc++-v3/testsuite/20_util/optional/cons/deduction.cc +++ b/libstdc++-v3/testsuite/20_util/optional/cons/deduction.cc @@ -24,8 +24,8 @@ struct MoveOnly { MoveOnly() = default; - MoveOnly(MoveOnly&&) {} - MoveOnly& operator=(MoveOnly&&) {} + MoveOnly(MoveOnly&&); + MoveOnly& operator=(MoveOnly&&); }; int main() diff --git a/libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc index 3831cf2..5071b13 100644 --- a/libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc +++ b/libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc @@ -30,8 +30,8 @@ template struct MoveOnly { MoveOnly() = default; - MoveOnly(MoveOnly&&) {} - MoveOnly& operator=(MoveOnly&&) {} + MoveOnly(MoveOnly&&); + MoveOnly& operator=(MoveOnly&&); }; void diff --git a/libstdc++-v3/testsuite/20_util/pair/traits.cc b/libstdc++-v3/testsuite/20_util/pair/traits.cc index 25ba7ff..6948154 100644 --- a/libstdc++-v3/testsuite/20_util/pair/traits.cc +++ b/libstdc++-v3/testsuite/20_util/pair/traits.cc @@ -31,8 +31,8 @@ struct Poison struct ThrowingCopy { - ThrowingCopy(const ThrowingCopy&) {} - ThrowingCopy& operator=(const ThrowingCopy&) {} + ThrowingCopy(const ThrowingCopy&); + ThrowingCopy& operator=(const ThrowingCopy&); }; int main() diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc index 0804d55..2ca9709 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc @@ -30,8 +30,8 @@ template struct MoveOnly { MoveOnly() = default; - MoveOnly(MoveOnly&&) {} - MoveOnly& operator=(MoveOnly&&) {} + MoveOnly(MoveOnly&&); + MoveOnly& operator=(MoveOnly&&); }; void diff --git a/libstdc++-v3/testsuite/20_util/variant/compile.cc b/libstdc++-v3/testsuite/20_util/variant/compile.cc index e5f7538..2aeec7d 100644 --- a/libstdc++-v3/testsuite/20_util/variant/compile.cc +++ b/libstdc++-v3/testsuite/20_util/variant/compile.cc @@ -481,37 +481,37 @@ void test_triviality() static_assert(MA_VAL == is_trivially_move_assignable_v>, ""); \ } TEST_TEMPLATE(=default, =default, =default, =default, =default, true, true, true, true) - TEST_TEMPLATE(=default, =default, =default, =default, {}, true, true, true, false) - TEST_TEMPLATE(=default, =default, =default, {}, =default, true, true, false, true) - TEST_TEMPLATE(=default, =default, =default, {}, {}, true, true, false, false) - TEST_TEMPLATE(=default, =default, {}, =default, =default, true, false, true, true) - TEST_TEMPLATE(=default, =default, {}, =default, {}, true, false, true, false) - TEST_TEMPLATE(=default, =default, {}, {}, =default, true, false, false, true) - TEST_TEMPLATE(=default, =default, {}, {}, {}, true, false, false, false) - TEST_TEMPLATE(=default, {}, =default, =default, =default, false, true, true, true) - TEST_TEMPLATE(=default, {}, =default, =default, {}, false, true, true, false) - TEST_TEMPLATE(=default, {}, =default, {}, =default, false, true, false, true) - TEST_TEMPLATE(=default, {}, =default, {}, {}, false, true, false, false) - TEST_TEMPLATE(=default, {}, {}, =default, =default, false, false, true, true) - TEST_TEMPLATE(=default, {}, {}, =default, {}, false, false, true, false) - TEST_TEMPLATE(=default, {}, {}, {}, =default, false, false, false, true) - TEST_TEMPLATE(=default, {}, {}, {}, {}, false, false, false, false) - TEST_TEMPLATE( {}, =default, =default, =default, =default, false, false, false, false) - TEST_TEMPLATE( {}, =default, =default, =default, {}, false, false, false, false) - TEST_TEMPLATE( {}, =default, =default, {}, =default, false, false, false, false) - TEST_TEMPLATE( {}, =default, =default, {}, {}, false, false, false, false) - TEST_TEMPLATE( {}, =default, {}, =default, =default, false, false, false, false) - TEST_TEMPLATE( {}, =default, {}, =default, {}, false, false, false, false) - TEST_TEMPLATE( {}, =default, {}, {}, =default, false, false, false, false) - TEST_TEMPLATE( {}, =default, {}, {}, {}, false, false, false, false) - TEST_TEMPLATE( {}, {}, =default, =default, =default, false, false, false, false) - TEST_TEMPLATE( {}, {}, =default, =default, {}, false, false, false, false) - TEST_TEMPLATE( {}, {}, =default, {}, =default, false, false, false, false) - TEST_TEMPLATE( {}, {}, =default, {}, {}, false, false, false, false) - TEST_TEMPLATE( {}, {}, {}, =default, =default, false, false, false, false) - TEST_TEMPLATE( {}, {}, {}, =default, {}, false, false, false, false) - TEST_TEMPLATE( {}, {}, {}, {}, =default, false, false, false, false) - TEST_TEMPLATE( {}, {}, {}, {}, {}, false, false, false, false) + TEST_TEMPLATE(=default, =default, =default, =default, , true, true, true, false) + TEST_TEMPLATE(=default, =default, =default, , =default, true, true, false, true) + TEST_TEMPLATE(=default, =default, =default, , , true, true, false, false) + TEST_TEMPLATE(=default, =default, , =default, =default, true, false, true, true) + TEST_TEMPLATE(=default, =default, , =default, , true, false, true, false) + TEST_TEMPLATE(=default, =default, , , =default, true, false, false, true) + TEST_TEMPLATE(=default, =default, , , , true, false, false, false) + TEST_TEMPLATE(=default, , =default, =default, =default, false, true, true, true) + TEST_TEMPLATE(=default, , =default, =default, , false, true, true, false) + TEST_TEMPLATE(=default, , =default, , =default, false, true, false, true) + TEST_TEMPLATE(=default, , =default, , , false, true, false, false) + TEST_TEMPLATE(=default, , , =default, =default, false, false, true, true) + TEST_TEMPLATE(=default, , , =default, , false, false, true, false) + TEST_TEMPLATE(=default, , , , =default, false, false, false, true) + TEST_TEMPLATE(=default, , , , , false, false, false, false) + TEST_TEMPLATE( , =default, =default, =default, =default, false, false, false, false) + TEST_TEMPLATE( , =default, =default, =default, , false, false, false, false) + TEST_TEMPLATE( , =default, =default, , =default, false, false, false, false) + TEST_TEMPLATE( , =default, =default, , , false, false, false, false) + TEST_TEMPLATE( , =default, , =default, =default, false, false, false, false) + TEST_TEMPLATE( , =default, , =default, , false, false, false, false) + TEST_TEMPLATE( , =default, , , =default, false, false, false, false) + TEST_TEMPLATE( , =default, , , , false, false, false, false) + TEST_TEMPLATE( , , =default, =default, =default, false, false, false, false) + TEST_TEMPLATE( , , =default, =default, , false, false, false, false) + TEST_TEMPLATE( , , =default, , =default, false, false, false, false) + TEST_TEMPLATE( , , =default, , , false, false, false, false) + TEST_TEMPLATE( , , , =default, =default, false, false, false, false) + TEST_TEMPLATE( , , , =default, , false, false, false, false) + TEST_TEMPLATE( , , , , =default, false, false, false, false) + TEST_TEMPLATE( , , , , , false, false, false, false) #undef TEST_TEMPLATE #define TEST_TEMPLATE(CC, MC, CA, MA) \ @@ -529,21 +529,21 @@ void test_triviality() static_assert(!is_trivially_move_assignable_v>, ""); \ } TEST_TEMPLATE(=default, =default, =default, =default) - TEST_TEMPLATE(=default, =default, =default, {}) - TEST_TEMPLATE(=default, =default, {}, =default) - TEST_TEMPLATE(=default, =default, {}, {}) - TEST_TEMPLATE(=default, {}, =default, =default) - TEST_TEMPLATE(=default, {}, =default, {}) - TEST_TEMPLATE(=default, {}, {}, =default) - TEST_TEMPLATE(=default, {}, {}, {}) - TEST_TEMPLATE( {}, =default, =default, =default) - TEST_TEMPLATE( {}, =default, =default, {}) - TEST_TEMPLATE( {}, =default, {}, =default) - TEST_TEMPLATE( {}, =default, {}, {}) - TEST_TEMPLATE( {}, {}, =default, =default) - TEST_TEMPLATE( {}, {}, =default, {}) - TEST_TEMPLATE( {}, {}, {}, =default) - TEST_TEMPLATE( {}, {}, {}, {}) + TEST_TEMPLATE(=default, =default, =default, ) + TEST_TEMPLATE(=default, =default, , =default) + TEST_TEMPLATE(=default, =default, , ) + TEST_TEMPLATE(=default, , =default, =default) + TEST_TEMPLATE(=default, , =default, ) + TEST_TEMPLATE(=default, , , =default) + TEST_TEMPLATE(=default, , , ) + TEST_TEMPLATE( , =default, =default, =default) + TEST_TEMPLATE( , =default, =default, ) + TEST_TEMPLATE( , =default, , =default) + TEST_TEMPLATE( , =default, , ) + TEST_TEMPLATE( , , =default, =default) + TEST_TEMPLATE( , , =default, ) + TEST_TEMPLATE( , , , =default) + TEST_TEMPLATE( , , , ) #undef TEST_TEMPLATE static_assert(is_trivially_copy_constructible_v>, ""); diff --git a/libstdc++-v3/testsuite/23_containers/map/modifiers/try_emplace/1.cc b/libstdc++-v3/testsuite/23_containers/map/modifiers/try_emplace/1.cc index e4c883c..22aa9d4 100644 --- a/libstdc++-v3/testsuite/23_containers/map/modifiers/try_emplace/1.cc +++ b/libstdc++-v3/testsuite/23_containers/map/modifiers/try_emplace/1.cc @@ -39,6 +39,7 @@ struct Val { val = other.val; other.moved_from_assign = true; + return *this; } }; diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/try_emplace.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/try_emplace.cc index f123850..b07d44b 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/try_emplace.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/try_emplace.cc @@ -39,6 +39,7 @@ struct Val { val = other.val; other.moved_from_assign = true; + return *this; } }; -- cgit v1.1