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
10
11// Test the alias.
12// simd::reference::value_type
13// simd_mask::reference::value_type
14
15#include "../test_utils.h"
16#include <experimental/simd>
17
18namespace ex = std::experimental::parallelism_v2;
19
20template <class T, std::size_t>
21struct CheckRefAlias {
22 template <class SimdAbi>
23 void operator()() {
24 static_assert(std::is_same_v<typename ex::simd<T, SimdAbi>::reference::value_type, T>);
25 static_assert(std::is_same_v<typename ex::simd_mask<T, SimdAbi>::reference::value_type, bool>);
26 }
27};
28
29int main(int, char**) {
30 test_all_simd_abi<CheckRefAlias>();
31 return 0;
32}
33

source code of libcxx/test/std/experimental/simd/simd.reference/reference_alias.pass.cpp