1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14
15 // Make sure that the implicitly-generated CTAD works.
17 #include <string_view>
19 #include "test_macros.h"
21 int main(int, char**) {
23 char const* str
= "hello world";
24 std::basic_string_view
sv(str
);
25 ASSERT_SAME_TYPE(decltype(sv
), std::basic_string_view
<char>);
27 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
29 wchar_t const* str
= L
"hello world";
30 std::basic_string_view
sv(str
);
31 ASSERT_SAME_TYPE(decltype(sv
), std::basic_string_view
<wchar_t>);