[memprof] Move YAML traits to MemProf.h (NFC) (#118668)
[llvm-project.git] / libcxx / test / std / experimental / simd / simd.mask.class / simd_mask_alias.pass.cpp
blob963376585e53c59082fcc9ab92376d7439bfb4cc
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 // Test the alias.
12 // template <class T, class Abi> class simd_mask {
13 // public:
14 // using value_type = bool;
15 // using simd_type = simd<T, Abi>;
16 // using abi_type = Abi;
17 // };
19 #include "../test_utils.h"
20 #include <experimental/simd>
22 namespace ex = std::experimental::parallelism_v2;
24 template <class T, std::size_t>
25 struct CheckSimdMaskAlias {
26 template <class SimdAbi>
27 void operator()() {
28 static_assert(std::is_same_v<typename ex::simd_mask<T, SimdAbi>::value_type, bool>);
29 static_assert(std::is_same_v<typename ex::simd_mask<T, SimdAbi>::simd_type, ex::simd<T, SimdAbi>>);
30 static_assert(std::is_same_v<typename ex::simd_mask<T, SimdAbi>::abi_type, SimdAbi>);
34 int main(int, char**) {
35 test_all_simd_abi<CheckSimdMaskAlias>();
36 return 0;