diff --git a/include/string_view.h b/include/string_view.h index 164c3ac..5fefa72 100644 --- a/include/string_view.h +++ b/include/string_view.h @@ -57,17 +57,10 @@ using wzstring = wchar_t*; template using basic_string_view = array_view; -template -using string_view = basic_string_view; - -template -using cstring_view = basic_string_view; - -template -using wstring_view = basic_string_view; - -template -using cwstring_view = basic_string_view; +using string_view = basic_string_view; +using cstring_view = basic_string_view; +using wstring_view = basic_string_view; +using cwstring_view = basic_string_view; // diff --git a/tests/string_view_tests.cpp b/tests/string_view_tests.cpp index c382cf0..af3de9d 100644 --- a/tests/string_view_tests.cpp +++ b/tests/string_view_tests.cpp @@ -27,26 +27,26 @@ SUITE(string_view_tests) TEST(TestLiteralConstruction) { - cwstring_view<> v = ensure_z(L"Hello"); + cwstring_view v = ensure_z(L"Hello"); CHECK(5 == v.length()); #ifdef CONFIRM_COMPILATION_ERRORS - wstring_view<> v2 = ensure0(L"Hello"); + wstring_view v2 = ensure0(L"Hello"); #endif } TEST(TestConstructFromStdString) { std::string s = "Hello there world"; - cstring_view<> v = s; + cstring_view v = s; CHECK(v.length() == s.length()); } TEST(TestConstructFromStdVector) { std::vector vec('h', 5); - string_view<> v = vec; + string_view v = vec; CHECK(v.length() == vec.size()); } @@ -55,25 +55,25 @@ SUITE(string_view_tests) wchar_t stack_string[] = L"Hello"; { - cwstring_view<> v = ensure_z(stack_string); + cwstring_view v = ensure_z(stack_string); CHECK(v.length() == 5); CHECK(v.used_length() == v.length()); } { - cwstring_view<> v = stack_string; + cwstring_view v = stack_string; CHECK(v.length() == 6); CHECK(v.used_length() == v.length()); } { - wstring_view<> v = ensure_z(stack_string); + wstring_view v = ensure_z(stack_string); CHECK(v.length() == 5); CHECK(v.used_length() == v.length()); } { - wstring_view<> v = stack_string; + wstring_view v = stack_string; CHECK(v.length() == 6); CHECK(v.used_length() == v.length()); } @@ -82,18 +82,18 @@ SUITE(string_view_tests) TEST(TestConversionToConst) { char stack_string[] = "Hello"; - string_view<> v = ensure_z(stack_string); - cstring_view<> v2 = v; + string_view v = ensure_z(stack_string); + cstring_view v2 = v; CHECK(v.length() == v2.length()); } TEST(TestConversionFromConst) { char stack_string[] = "Hello"; - cstring_view<> v = ensure_z(stack_string); + cstring_view v = ensure_z(stack_string); #ifdef CONFIRM_COMPILATION_ERRORS - string_view<> v2 = v; - string_view<> v3 = "Hello"; + string_view v2 = v; + string_view v3 = "Hello"; #endif } }