diff --git a/libcxx/test/std/containers/views/trivially_copyable.compile.pass.cpp b/libcxx/test/std/containers/views/trivially_copyable.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/containers/views/trivially_copyable.compile.pass.cpp @@ -0,0 +1,23 @@ +// +// 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 + +// + +#include +#include + +static_assert(std::is_trivially_copyable_v>); +static_assert(std::is_trivially_copyable_v>); + +struct UserDefinedNonTrival { + UserDefinedNonTrival() {} + UserDefinedNonTrival(const UserDefinedNonTrival&) {} +}; +static_assert(std::is_trivially_copyable_v>); +static_assert(std::is_trivially_copyable_v>); diff --git a/libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp b/libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +// + +#include +#include + +static_assert(std::is_trivially_copyable_v>); +static_assert(std::is_trivially_copyable_v>); +static_assert(std::is_trivially_copyable_v>); +static_assert(std::is_trivially_copyable_v>); +static_assert(std::is_trivially_copyable_v>);