//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 // UNSUPPORTED: libcpp-no-concepts // // template _End> // basic_string_view(_It, _End) -> basic_string_view>; #include #include #include "make_string.h" #include "test_macros.h" #include "test_iterators.h" template constexpr void test() { auto val = MAKE_STRING_VIEW(CharT, "test"); auto sv = std::basic_string_view(val.begin(), Sentinel(val.end())); ASSERT_SAME_TYPE(decltype(sv), std::basic_string_view); assert(sv.size() == val.size()); assert(sv.data() == val.data()); } constexpr void test() { test(); #ifndef TEST_HAS_NO_WIDE_CHARACTERS test(); #endif test(); test(); test(); test(); test>(); } int main(int, char**) { test(); return 0; }