1*c303c47eSjoerg // -*- C++ -*- 2*c303c47eSjoerg //===----------------------------------------------------------------------===// 3*c303c47eSjoerg // 4*c303c47eSjoerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5*c303c47eSjoerg // See https://llvm.org/LICENSE.txt for license information. 6*c303c47eSjoerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7*c303c47eSjoerg // 8*c303c47eSjoerg //===----------------------------------------------------------------------===// 9*c303c47eSjoerg 10*c303c47eSjoerg #ifndef _LIBCPP___RANGES_VIEW_H 11*c303c47eSjoerg #define _LIBCPP___RANGES_VIEW_H 12*c303c47eSjoerg 13*c303c47eSjoerg #include <__config> 14*c303c47eSjoerg #include <__ranges/concepts.h> 15*c303c47eSjoerg #include <concepts> 16*c303c47eSjoerg 17*c303c47eSjoerg 18*c303c47eSjoerg #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 19*c303c47eSjoerg #pragma GCC system_header 20*c303c47eSjoerg #endif 21*c303c47eSjoerg 22*c303c47eSjoerg _LIBCPP_PUSH_MACROS 23*c303c47eSjoerg #include <__undef_macros> 24*c303c47eSjoerg 25*c303c47eSjoerg _LIBCPP_BEGIN_NAMESPACE_STD 26*c303c47eSjoerg 27*c303c47eSjoerg #if !defined(_LIBCPP_HAS_NO_RANGES) 28*c303c47eSjoerg 29*c303c47eSjoerg namespace ranges { 30*c303c47eSjoerg 31*c303c47eSjoerg struct view_base { }; 32*c303c47eSjoerg 33*c303c47eSjoerg template <class _Tp> 34*c303c47eSjoerg inline constexpr bool enable_view = derived_from<_Tp, view_base>; 35*c303c47eSjoerg 36*c303c47eSjoerg template <class _Tp> 37*c303c47eSjoerg concept view = 38*c303c47eSjoerg range<_Tp> && 39*c303c47eSjoerg movable<_Tp> && 40*c303c47eSjoerg default_initializable<_Tp> && 41*c303c47eSjoerg enable_view<_Tp>; 42*c303c47eSjoerg 43*c303c47eSjoerg } // end namespace ranges 44*c303c47eSjoerg 45*c303c47eSjoerg #endif // !_LIBCPP_HAS_NO_RANGES 46*c303c47eSjoerg 47*c303c47eSjoerg _LIBCPP_END_NAMESPACE_STD 48*c303c47eSjoerg 49*c303c47eSjoerg _LIBCPP_POP_MACROS 50*c303c47eSjoerg 51*c303c47eSjoerg #endif // _LIBCPP___RANGES_VIEW_H 52