codekingpro/portable-devtools
114k
1// -*- C++ -*-2//===----------------------------------------------------------------------===//3//4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5// See https://llvm.org/LICENSE.txt for license information.6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES8//9//===----------------------------------------------------------------------===//10 11#ifndef _LIBCUDACXX___ITERATOR_SORTABLE_H12#define _LIBCUDACXX___ITERATOR_SORTABLE_H13 14#ifndef __cuda_std__15#include <__config>16#endif // __cuda_std__17 18#include "../__functional/identity.h"19#include "../__functional/ranges_operations.h"20#include "../__iterator/concepts.h"21#include "../__iterator/permutable.h"22#include "../__iterator/projected.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 36template <class _Iter, class _Comp = _CUDA_VRANGES::less, class _Proj = identity>37concept sortable =38 permutable<_Iter> &&39 indirect_strict_weak_order<_Comp, projected<_Iter, _Proj>>;40 41#elif _LIBCUDACXX_STD_VER > 1442 43template <class _Iter, class _Comp, class _Proj>44_LIBCUDACXX_CONCEPT_FRAGMENT(45 __sortable_,46 requires()( //47 requires(permutable<_Iter>),48 requires(indirect_strict_weak_order<_Comp, projected<_Iter, _Proj>>)49 ));50 51template <class _Iter, class _Comp = _CUDA_VRANGES::less, class _Proj = identity>52_LIBCUDACXX_CONCEPT sortable = _LIBCUDACXX_FRAGMENT(__sortable_, _Iter, _Comp, _Proj);53 54#endif // _LIBCUDACXX_STD_VER > 1455 56_LIBCUDACXX_END_NAMESPACE_STD57 58#endif // _LIBCUDACXX___ITERATOR_SORTABLE_H59 