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//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP___RANGES_ELEMENTS_OF_H
11#define _LIBCPP___RANGES_ELEMENTS_OF_H
12
13#include <__config>
14#include <__cstddef/byte.h>
15#include <__memory/allocator.h>
16#include <__ranges/concepts.h>
17
18#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
19# pragma GCC system_header
20#endif
21
22#if _LIBCPP_STD_VER >= 23
23
24_LIBCPP_BEGIN_NAMESPACE_STD
25
26namespace ranges {
27
28template <range _Range, class _Allocator = allocator<byte>>
29struct elements_of {
30 _LIBCPP_NO_UNIQUE_ADDRESS _Range range;
31 _LIBCPP_NO_UNIQUE_ADDRESS _Allocator allocator = _Allocator();
32};
33
34template <class _Range, class _Allocator = allocator<byte>>
35elements_of(_Range&&, _Allocator = _Allocator()) -> elements_of<_Range&&, _Allocator>;
36
37} // namespace ranges
38
39_LIBCPP_END_NAMESPACE_STD
40
41#endif // _LIBCPP_STD_VER >= 23
42
43#endif // _LIBCPP___RANGES_ELEMENTS_OF_H
44