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, c++11, c++14, c++17
10
11// using value_type = floating-point-type;
12// using difference_type = value_type;
13// The atomic floating-point specializations are standard-layout structs. They each have a trivial destructor.
14
15#include <atomic>
16#include <type_traits>
17
18template <class T>
19void test() {
20 static_assert(std::is_same_v<typename std::atomic<T>::value_type, T>);
21 static_assert(std::is_same_v<typename std::atomic<T>::difference_type, T>);
22 static_assert(std::is_standard_layout_v<std::atomic<T>>);
23 static_assert(std::is_trivially_destructible_v<std::atomic<T>>);
24}
25
26template void test<float>();
27template void test<double>();
28template void test<long double>();
29

source code of libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/types.compile.pass.cpp