Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / include / __iterator / sortable.h
blobd4d77d6cf334544ef95932b90f77e5d051f0685d
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-exception
7 //
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP___ITERATOR_SORTABLE_H
11 #define _LIBCPP___ITERATOR_SORTABLE_H
13 #include <__config>
14 #include <__functional/identity.h>
15 #include <__functional/ranges_operations.h>
16 #include <__iterator/concepts.h>
17 #include <__iterator/permutable.h>
18 #include <__iterator/projected.h>
20 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
21 # pragma GCC system_header
22 #endif
24 _LIBCPP_BEGIN_NAMESPACE_STD
26 #if _LIBCPP_STD_VER >= 20
28 template <class _Iter, class _Comp = ranges::less, class _Proj = identity>
29 concept sortable =
30 permutable<_Iter> &&
31 indirect_strict_weak_order<_Comp, projected<_Iter, _Proj>>;
33 #endif // _LIBCPP_STD_VER >= 20
35 _LIBCPP_END_NAMESPACE_STD
37 #endif // _LIBCPP___ITERATOR_SORTABLE_H