[X86] Use NSW/NUW flags on ISD::TRUNCATE nodes to improve X86 PACKSS/PACKUS lowering...
[llvm-project.git] / libcxx / test / std / strings / string.view / string.view.deduct / implicit.pass.cpp
blob36584f76bebdafe3b95b2d57af238b0dd595aed8
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14
11 // <string_view>
13 // basic_string_view
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>);
33 #endif
35 return 0;