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//===----------------------------------------------------------------------===//
8
9// UNSUPPORTED: c++03
10
11// Verify TEST_WORKAROUND_MSVC_BROKEN_IS_TRIVIALLY_COPYABLE.
12
13#include <type_traits>
14
15#include "test_macros.h"
16#include "test_workarounds.h"
17
18struct S {
19 S(S const&) = default;
20 S(S&&) = default;
21 S& operator=(S const&) = delete;
22 S& operator=(S&&) = delete;
23};
24
25int main(int, char**) {
26#ifdef TEST_WORKAROUND_MSVC_BROKEN_IS_TRIVIALLY_COPYABLE
27 static_assert(!std::is_trivially_copyable<S>::value, "");
28#else
29 static_assert(std::is_trivially_copyable<S>::value, "");
30#endif
31
32 return 0;
33}
34

source code of libcxx/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp