//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. // //===----------------------------------------------------------------------===// // UNSUPPORTED: msvc-19.16 // template // concept range; #include #include "test_range.h" static_assert(cuda::std::ranges::range>, ""); struct incompatible_iterators { __host__ __device__ int* begin(); __host__ __device__ long* end(); }; static_assert(!cuda::std::ranges::range, ""); struct int_begin_int_end { __host__ __device__ int begin(); __host__ __device__ int end(); }; static_assert(!cuda::std::ranges::range, ""); struct iterator_begin_int_end { __host__ __device__ int* begin(); __host__ __device__ int end(); }; static_assert(!cuda::std::ranges::range, ""); struct int_begin_iterator_end { __host__ __device__ int begin(); __host__ __device__ int* end(); }; static_assert(!cuda::std::ranges::range, ""); #if TEST_STD_VER > 2017 // Test ADL-proofing. struct Incomplete; template struct Holder { T t; }; static_assert(!cuda::std::ranges::range*>, ""); #endif int main(int, char**) { return 0; }