Index: test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp =================================================================== --- test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp +++ test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp @@ -120,11 +120,10 @@ test_npos(S(), SV("12345"), 5, S("")); test_npos(S(), SV("12345"), 6, S("not happening")); } + { - typedef std::string S; - typedef std::string_view SV; - S s; - SV sv = "EFGH"; + std::string s; + std::string_view sv = "EFGH"; char arr[] = "IJKL"; s.append("CDEF", 0); // calls append(const char *, len) @@ -138,7 +137,7 @@ s.append(sv, 0); // calls append(T, pos, npos) assert(s == sv); s.clear(); - + s.append(sv, 0, std::string::npos); // calls append(T, pos, npos) assert(s == sv); s.clear(); @@ -154,10 +153,11 @@ s.append(arr, 0); // calls append(const char *, len) assert(s == ""); s.clear(); + } { - S s = "ABCD"; - SV sv = s; + std::string s = "ABCD"; + std::string_view sv = s; s.append(sv); assert(s == "ABCDABCD"); @@ -169,10 +169,10 @@ s.append(sv, sv.size()); assert(s == "ABCDABCDABCDABCD"); } - + { - S s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - SV sv = s; + std::string s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + std::string_view sv = s; s.append(sv); assert(s == "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"); @@ -180,5 +180,4 @@ s.append(sv, 0, std::string::npos); assert(s == "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"); } - } } Index: test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp =================================================================== --- test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp +++ test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp @@ -119,11 +119,10 @@ test_npos(S(), SV("12345"), 5, S("")); test_npos(S(), SV("12345"), 6, S("not happening")); } + { - typedef std::string S; - typedef std::string_view SV; - S s = "ABCD"; - SV sv = "EFGH"; + std::string s = "ABCD"; + std::string_view sv = "EFGH"; char arr[] = "IJKL"; s.assign("CDEF", 0); // calls assign(const char *, len) @@ -137,7 +136,7 @@ s.assign(sv, 0); // calls assign(T, pos, npos) assert(s == sv); s.clear(); - + s.assign(sv, 0, std::string::npos); // calls assign(T, pos, npos) assert(s == sv); s.clear(); @@ -153,10 +152,11 @@ s.assign(arr, 0); // calls assign(const char *, len) assert(s == ""); s.clear(); + } { - S s = "ABCD"; - SV sv = s; + std::string s = "ABCD"; + std::string_view sv = s; s.assign(sv); assert(s == "ABCD"); @@ -164,10 +164,10 @@ s.assign(sv, 0, std::string::npos); assert(s == "ABCD"); } - + { - S s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - SV sv = s; + std::string s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + std::string_view sv = s; s.assign(sv); assert(s == "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); @@ -175,5 +175,4 @@ s.assign(sv, 0, std::string::npos); assert(s == "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); } - } }