From 7853371146d1f40513d5dfe5bc6b3f958cda97af Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Sun, 13 Feb 2022 14:58:27 -0500 Subject: [PATCH] [libc++] [test] Qualify `move` as `std::move` in a lot of tests. NFCI. We shouldn't be calling `move` via ADL -- and neither should anybody in the wild be calling it via ADL, so it's not like we need to test this ADL ability of `move` in particular. Reviewed as part of D119860. --- .../fstreams/filebuf.assign/move_assign.pass.cpp | 4 ++-- .../fstreams/fstream.assign/move_assign.pass.cpp | 4 ++-- .../fstreams/ifstream.assign/move_assign.pass.cpp | 4 ++-- .../fstreams/ofstream.assign/move_assign.pass.cpp | 4 ++-- .../stringbuf/stringbuf.assign/move.pass.cpp | 12 ++++++------ .../string_op+/char_string.pass.cpp | 2 +- .../string_op+/pointer_string.pass.cpp | 2 +- .../string_op+/string_char.pass.cpp | 2 +- .../string_op+/string_pointer.pass.cpp | 2 +- .../string_op+/string_string.pass.cpp | 6 +++--- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp index 863fd3ef87a7..8e76e117d56b 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp @@ -30,7 +30,7 @@ int main(int, char**) f.pubseekoff(1, std::ios_base::beg); assert(f.sgetc() == '2'); std::filebuf f2; - f2 = move(f); + f2 = std::move(f); assert(!f.is_open()); assert(f2.is_open()); assert(f2.sgetc() == '2'); @@ -47,7 +47,7 @@ int main(int, char**) f.pubseekoff(1, std::ios_base::beg); assert(f.sgetc() == L'2'); std::wfilebuf f2; - f2 = move(f); + f2 = std::move(f); assert(!f.is_open()); assert(f2.is_open()); assert(f2.sgetc() == L'2'); diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp index 90a7cf6ed69c..74995054a3f3 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp @@ -25,7 +25,7 @@ int main(int, char**) std::fstream fso(temp.c_str(), std::ios_base::in | std::ios_base::out | std::ios_base::trunc); std::fstream fs; - fs = move(fso); + fs = std::move(fso); double x = 0; fs << 3.25; fs.seekg(0); @@ -39,7 +39,7 @@ int main(int, char**) std::wfstream fso(temp.c_str(), std::ios_base::in | std::ios_base::out | std::ios_base::trunc); std::wfstream fs; - fs = move(fso); + fs = std::move(fso); double x = 0; fs << 3.25; fs.seekg(0); diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp index abb3863c1298..75f4295677cc 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp @@ -25,7 +25,7 @@ int main(int, char**) { std::ifstream fso("test.dat"); std::ifstream fs; - fs = move(fso); + fs = std::move(fso); double x = 0; fs >> x; assert(x == 3.25); @@ -34,7 +34,7 @@ int main(int, char**) { std::wifstream fso("test.dat"); std::wifstream fs; - fs = move(fso); + fs = std::move(fso); double x = 0; fs >> x; assert(x == 3.25); diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp index 71e57a1f9bcb..276fef55fbf3 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp @@ -24,7 +24,7 @@ int main(int, char**) { std::ofstream fso(temp.c_str()); std::ofstream fs; - fs = move(fso); + fs = std::move(fso); fs << 3.25; } { @@ -39,7 +39,7 @@ int main(int, char**) { std::wofstream fso(temp.c_str()); std::wofstream fs; - fs = move(fso); + fs = std::move(fso); fs << 3.25; } { diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp index 27b9579f5b9d..3ae562e17e80 100644 --- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp +++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/move.pass.cpp @@ -23,38 +23,38 @@ int main(int, char**) { std::stringbuf buf1("testing"); std::stringbuf buf; - buf = move(buf1); + buf = std::move(buf1); assert(buf.str() == "testing"); } { std::stringbuf buf1("testing", std::ios_base::in); std::stringbuf buf; - buf = move(buf1); + buf = std::move(buf1); assert(buf.str() == "testing"); } { std::stringbuf buf1("testing", std::ios_base::out); std::stringbuf buf; - buf = move(buf1); + buf = std::move(buf1); assert(buf.str() == "testing"); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { std::wstringbuf buf1(L"testing"); std::wstringbuf buf; - buf = move(buf1); + buf = std::move(buf1); assert(buf.str() == L"testing"); } { std::wstringbuf buf1(L"testing", std::ios_base::in); std::wstringbuf buf; - buf = move(buf1); + buf = std::move(buf1); assert(buf.str() == L"testing"); } { std::wstringbuf buf1(L"testing", std::ios_base::out); std::wstringbuf buf; - buf = move(buf1); + buf = std::move(buf1); assert(buf.str() == L"testing"); } #endif // TEST_HAS_NO_WIDE_CHARACTERS diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp index f9f8cd95fb98..42c4c134ac47 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp @@ -31,7 +31,7 @@ TEST_CONSTEXPR_CXX20 void test0(typename S::value_type lhs, const S& rhs, const #if TEST_STD_VER >= 11 template TEST_CONSTEXPR_CXX20 void test1(typename S::value_type lhs, S&& rhs, const S& x) { - assert(lhs + move(rhs) == x); + assert(lhs + std::move(rhs) == x); } #endif diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp index 89fadc2227e2..5f0c67f7e3ee 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp @@ -31,7 +31,7 @@ TEST_CONSTEXPR_CXX20 void test0(const typename S::value_type* lhs, const S& rhs, #if TEST_STD_VER >= 11 template TEST_CONSTEXPR_CXX20 void test1(const typename S::value_type* lhs, S&& rhs, const S& x) { - assert(lhs + move(rhs) == x); + assert(lhs + std::move(rhs) == x); } #endif diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp index ee2a23953968..4f516b8667d5 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp @@ -31,7 +31,7 @@ TEST_CONSTEXPR_CXX20 void test0(const S& lhs, typename S::value_type rhs, const #if TEST_STD_VER >= 11 template TEST_CONSTEXPR_CXX20 void test1(S&& lhs, typename S::value_type rhs, const S& x) { - assert(move(lhs) + rhs == x); + assert(std::move(lhs) + rhs == x); } #endif diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp index bdcc464e5a8e..66e57c8ce7c3 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp @@ -31,7 +31,7 @@ TEST_CONSTEXPR_CXX20 void test0(const S& lhs, const typename S::value_type* rhs, #if TEST_STD_VER >= 11 template TEST_CONSTEXPR_CXX20 void test1(S&& lhs, const typename S::value_type* rhs, const S& x) { - assert(move(lhs) + rhs == x); + assert(std::move(lhs) + rhs == x); } #endif diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp index 3c349ed96f74..bf6791e019aa 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp @@ -43,17 +43,17 @@ TEST_CONSTEXPR_CXX20 void test0(const S& lhs, const S& rhs, const S& x) { #if TEST_STD_VER >= 11 template TEST_CONSTEXPR_CXX20 void test1(S&& lhs, const S& rhs, const S& x) { - assert(move(lhs) + rhs == x); + assert(std::move(lhs) + rhs == x); } template TEST_CONSTEXPR_CXX20 void test2(const S& lhs, S&& rhs, const S& x) { - assert(lhs + move(rhs) == x); + assert(lhs + std::move(rhs) == x); } template TEST_CONSTEXPR_CXX20 void test3(S&& lhs, S&& rhs, const S& x) { - assert(move(lhs) + move(rhs) == x); + assert(std::move(lhs) + std::move(rhs) == x); } #endif