gcc/testsuite/g++.dg/cpp0x/Wpessimizing-move2.C
raw| 1 | // PR c++/86981 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-options "-Wpessimizing-move" } |
| 4 | // { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } } |
| 5 | |
| 6 | #include <string> |
| 7 | #include <tuple> |
| 8 | #include <utility> |
| 9 | |
| 10 | std::tuple<std::string, std::string> |
| 11 | foo () |
| 12 | { |
| 13 | std::pair<std::string, std::string> p; |
| 14 | return std::move (p); |
| 15 | } |