sparrow 0.9.0
Loading...
Searching...
No Matches
layout_concept.hpp
Go to the documentation of this file.
1// Copyright 2024 Man Group Operations Limited
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or mplied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <concepts>
18
20
21namespace sparrow
22{
23 namespace detail
24 {
25 template <class T>
27 }
28
40 template <class T>
41 concept layout = requires(const T& t) {
42 typename T::inner_value_type;
43 typename T::value_type;
44 typename T::const_reference;
45 typename T::size_type;
46 typename T::const_iterator;
47 typename T::const_reverse_iterator;
48
50
51 { t[std::size_t()] } -> std::same_as<typename T::const_reference>;
52 { t.size() } -> std::same_as<typename T::size_type>;
53
54 { t.begin() } -> std::same_as<typename T::const_iterator>;
55 { t.end() } -> std::same_as<typename T::const_iterator>;
56 { t.cbegin() } -> std::same_as<typename T::const_iterator>;
57 { t.cend() } -> std::same_as<typename T::const_iterator>;
58 { t.rbegin() } -> std::same_as<typename T::const_reverse_iterator>;
59 { t.rend() } -> std::same_as<typename T::const_reverse_iterator>;
60 { t.crbegin() } -> std::same_as<typename T::const_reverse_iterator>;
61 { t.crend() } -> std::same_as<typename T::const_reverse_iterator>;
62 };
63}
Concept for layouts.
constexpr bool is_nullable_variant_v
constexpr bool is_nullable_v
Definition nullable.hpp:62