sparrow 0.3.0
Loading...
Searching...
No Matches
duration_array.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
18
19// tDs : std::chrono::seconds
20// tDm : std::chrono::milliseconds
21// tDu : std::chrono::microseconds
22// tDn : std::chrono::nanoseconds
23
24namespace sparrow
25{
26 using duration_types_t = mpl::
27 typelist<std::chrono::seconds, std::chrono::milliseconds, std::chrono::microseconds, std::chrono::nanoseconds>;
28
30 template <typename T>
32
45 template <duration_type T>
47
52
53 template <class T>
54 struct is_duration_array : std::false_type
55 {
56 };
57
58 template <class T>
59 struct is_duration_array<duration_array<T>> : std::true_type
60 {
61 };
62
66 template <class T>
68}
consteval bool contains(L list)
Definition mp_utils.hpp:285
array_trivial_copyable< T > duration_array
Array of std::chrono::duration values.
duration_array< std::chrono::seconds > duration_seconds_array
constexpr bool is_duration_array_v
Checks whether T is a duration_array type.
duration_array< std::chrono::microseconds > duration_microseconds_array
duration_array< std::chrono::milliseconds > duration_milliseconds_array
static constexpr duration_types_t duration_types
duration_array< std::chrono::nanoseconds > duration_nanoseconds_array
mpl:: typelist< std::chrono::seconds, std::chrono::milliseconds, std::chrono::microseconds, std::chrono::nanoseconds > duration_types_t