33 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++1410 11// Test the alias.12// simd::reference::value_type13// simd_mask::reference::value_type14 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