Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
common_reference_with.h75 linesDownload Raw Back to __concepts
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// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCUDACXX___CONCEPTS_COMMON_REFERENCE_WITH_H11#define _LIBCUDACXX___CONCEPTS_COMMON_REFERENCE_WITH_H12 13#ifndef __cuda_std__14#include <__config>15#endif //__cuda_std__16 17#include "../__concepts/__concept_macros.h"18#include "../__concepts/convertible_to.h"19#include "../__concepts/same_as.h"20#include "../__type_traits/common_reference.h"21#include "../__type_traits/copy_cv.h"22#include "../__type_traits/copy_cvref.h"23 24#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)25#  pragma GCC system_header26#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)27#  pragma clang system_header28#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)29#  pragma system_header30#endif // no system header31 32_LIBCUDACXX_BEGIN_NAMESPACE_STD33 34#if _LIBCUDACXX_STD_VER > 1735 36// [concept.commonref]37 38template<class _Tp, class _Up>39concept common_reference_with =40  same_as<common_reference_t<_Tp, _Up>, common_reference_t<_Up, _Tp>> &&41  convertible_to<_Tp, common_reference_t<_Tp, _Up>> &&42  convertible_to<_Up, common_reference_t<_Tp, _Up>>;43 44#elif _LIBCUDACXX_STD_VER > 1145 46template<class _Tp, class _Up>47_LIBCUDACXX_CONCEPT_FRAGMENT(48  __common_reference_exists_,49  requires()(50    typename(common_reference_t<_Tp, _Up>),51    typename(common_reference_t<_Up, _Tp>)52  ));53 54template<class _Tp, class _Up>55_LIBCUDACXX_CONCEPT _Common_reference_exists = _LIBCUDACXX_FRAGMENT(__common_reference_exists_, _Tp, _Up);56 57template<class _Tp, class _Up>58_LIBCUDACXX_CONCEPT_FRAGMENT(59  __common_reference_with_,60  requires()(61    requires(_Common_reference_exists<_Tp, _Up>),62    requires(same_as<common_reference_t<_Tp, _Up>, common_reference_t<_Up, _Tp>>),63    requires(convertible_to<_Tp, common_reference_t<_Tp, _Up>>),64    requires(convertible_to<_Up, common_reference_t<_Tp, _Up>>)65  ));66 67template<class _Tp, class _Up>68_LIBCUDACXX_CONCEPT common_reference_with = _LIBCUDACXX_FRAGMENT(__common_reference_with_, _Tp, _Up);69 70#endif // _LIBCUDACXX_STD_VER > 1171 72_LIBCUDACXX_END_NAMESPACE_STD73 74#endif // _LIBCUDACXX___CONCEPTS_COMMON_REFERENCE_WITH_H75 
codekingpro/portable-devtools · Team Ai