diff --git a/README.md b/README.md index e396057a..073517ec 100644 --- a/README.md +++ b/README.md @@ -30,14 +30,14 @@ not_null | ☑ | restricts a pointer / smart po span | ☑ | a view over a contiguous sequence of memory. Based on the standardized verison of `std::span`, however `gsl::span` enforces bounds checking. See the [wiki](https://github.com/microsoft/GSL/wiki/gsl::span-and-std::span) for additional information. span_p | ☐ | spans a range starting from a pointer to the first place for which the predicate is true basic_zstring | ☑ | A pointer to a C-string (zero-terminated array) with a templated char type -zstring | ☑ | An alias to `basic_zstring` with a char type of char -czstring | ☑ | An alias to `basic_zstring` with a char type of const char -wzstring | ☑ | An alias to `basic_zstring` with a char type of wchar_t -cwzstring | ☑ | An alias to `basic_zstring` with a char type of const wchar_t -u16zstring | ☑ | An alias to `basic_zstring` with a char type of char16_t -cu16zstring | ☑ | An alias to `basic_zstring` with a char type of const char16_t -u32zstring | ☑ | An alias to `basic_zstring` with a char type of char32_t -cu32zstring | ☑ | An alias to `basic_zstring` with a char type of const char32_t +zstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of char +czstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of const char +wzstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of wchar_t +cwzstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of const wchar_t +u16zstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of char16_t +cu16zstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of const char16_t +u32zstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of char32_t +cu32zstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of const char32_t [**2. Owners**][cg-owners] | | unique_ptr | ☑ | an alias to `std::unique_ptr` shared_ptr | ☑ | an alias to `std::shared_ptr` diff --git a/include/gsl/string_span b/include/gsl/string_span index a76236d2..bcc672af 100644 --- a/include/gsl/string_span +++ b/include/gsl/string_span @@ -59,29 +59,21 @@ namespace gsl template using basic_zstring = CharT*; -template -using czstring = basic_zstring; +using czstring = basic_zstring; -template -using cwzstring = basic_zstring; +using cwzstring = basic_zstring; -template -using cu16zstring = basic_zstring; +using cu16zstring = basic_zstring; -template -using cu32zstring = basic_zstring; +using cu32zstring = basic_zstring; -template -using zstring = basic_zstring; +using zstring = basic_zstring; -template -using wzstring = basic_zstring; +using wzstring = basic_zstring; -template -using u16zstring = basic_zstring; +using u16zstring = basic_zstring; -template -using u32zstring = basic_zstring; +using u32zstring = basic_zstring; namespace details { diff --git a/tests/string_span_tests.cpp b/tests/string_span_tests.cpp index 8cc45c66..ed42b384 100644 --- a/tests/string_span_tests.cpp +++ b/tests/string_span_tests.cpp @@ -985,7 +985,7 @@ TEST(string_span_tests, zstring) auto name = CreateTempName({buf, 10}); if (!name.empty()) { - czstring<> str = name.assume_z(); + czstring str = name.assume_z(); EXPECT_TRUE(generic::strlen(str) == 3); EXPECT_TRUE(*(str + 3) == '\0'); } @@ -1028,7 +1028,7 @@ TEST(string_span_tests, wzstring) const auto name = CreateTempNameW({buf, 10}); if (!name.empty()) { - cwzstring<> str = name.assume_z(); + cwzstring str = name.assume_z(); EXPECT_TRUE(generic::strnlen(str, 10) == 3); EXPECT_TRUE(*(str + 3) == L'\0'); } @@ -1071,7 +1071,7 @@ TEST(string_span_tests, u16zstring) const auto name = CreateTempNameU16({buf, 10}); if (!name.empty()) { - cu16zstring<> str = name.assume_z(); + cu16zstring str = name.assume_z(); EXPECT_TRUE(generic::strnlen(str, 10) == 3); EXPECT_TRUE(*(str + 3) == L'\0'); } @@ -1114,7 +1114,7 @@ TEST(string_span_tests, u32zstring) const auto name = CreateTempNameU32({buf, 10}); if (!name.empty()) { - cu32zstring<> str = name.assume_z(); + cu32zstring str = name.assume_z(); EXPECT_TRUE(generic::strnlen(str, 10) == 3); EXPECT_TRUE(*(str + 3) == L'\0'); }