subrange.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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-exception
  6. //
  7. //===---------------------------------------------------------------------===//
  8. #ifndef _LIBCPP___FWD_SUBRANGE_H
  9. #define _LIBCPP___FWD_SUBRANGE_H
  10. #include <__config>
  11. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  12. # pragma GCC system_header
  13. #endif
  14. #if _LIBCPP_STD_VER >= 20
  15. #include <__iterator/concepts.h>
  16. _LIBCPP_BEGIN_NAMESPACE_STD
  17. namespace ranges {
  18. enum class _LIBCPP_ENUM_VIS subrange_kind : bool { unsized, sized };
  19. template <input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent, subrange_kind _Kind>
  20. requires(_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>)
  21. class _LIBCPP_TEMPLATE_VIS subrange;
  22. } // namespace ranges
  23. _LIBCPP_END_NAMESPACE_STD
  24. #endif // _LIBCPP_STD_VER >= 20
  25. #endif // _LIBCPP___FWD_SUBRANGE_H