brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 6127d06 Raw
29 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: !stdlib=libc++ && (c++03 || c++11 || c++14)10 11// P2251 was voted into C++23, but is supported even in C++17 mode by all vendors.12 13// <string_view>14 15#include <string_view>16#include <type_traits>17 18#include "test_macros.h"19 20static_assert(std::is_trivially_copyable<std::basic_string_view<char> >::value, "");21#ifndef TEST_HAS_NO_WIDE_CHARACTERS22static_assert(std::is_trivially_copyable<std::basic_string_view<wchar_t> >::value, "");23#endif24#ifndef TEST_HAS_NO_CHAR8_T25static_assert(std::is_trivially_copyable<std::basic_string_view<char8_t> >::value, "");26#endif27static_assert(std::is_trivially_copyable<std::basic_string_view<char16_t> >::value, "");28static_assert(std::is_trivially_copyable<std::basic_string_view<char32_t> >::value, "");29