//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03 // See GCC PR63723. // UNSUPPORTED: gcc-4.9 // // // [simd.class] // template simd(U&& value); #include #include using namespace std::experimental::parallelism_v2; template auto not_supported_native_simd_ctor(Args&&... args) -> decltype(native_simd(std::forward(args)...), void()) = delete; template void not_supported_native_simd_ctor(...) {} template auto supported_native_simd_ctor(Args&&... args) -> decltype(native_simd(std::forward(args)...), void()) {} template void supported_native_simd_ctor(...) = delete; void compile_narrowing_conversion() { supported_native_simd_ctor(3); supported_native_simd_ctor(3); supported_native_simd_ctor(3); supported_native_simd_ctor(3); supported_native_simd_ctor(3); supported_native_simd_ctor(3); supported_native_simd_ctor(3); supported_native_simd_ctor(3); supported_native_simd_ctor(3.f); supported_native_simd_ctor(3.); supported_native_simd_ctor(3.); not_supported_native_simd_ctor(3.); not_supported_native_simd_ctor(long(3)); not_supported_native_simd_ctor(long(3)); not_supported_native_simd_ctor(3.); } int main() {}