sparrow 0.3.0
Loading...
Searching...
No Matches
time_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 implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
19
20// tts : std::chrono::seconds
21
22namespace sparrow
23{
24 using time_types_t = mpl::
25 typelist<chrono::time_seconds, chrono::time_milliseconds, chrono::time_microseconds, chrono::time_nanoseconds>;
26
27 static constexpr time_types_t time_types;
28 template <typename T>
30
43 template <time_type T>
45
50
51 template <class T>
52 struct is_time_array : std::false_type
53 {
54 };
55
56 template <class T>
57 struct is_time_array<time_array<T>> : std::true_type
58 {
59 };
60
64 template <class T>
66}
consteval bool contains(L list)
Definition mp_utils.hpp:285
time_array< chrono::time_microseconds > time_microseconds_array
time_array< chrono::time_milliseconds > time_milliseconds_array
mpl:: typelist< chrono::time_seconds, chrono::time_milliseconds, chrono::time_microseconds, chrono::time_nanoseconds > time_types_t
constexpr bool is_time_array_v
Checks whether T is a time_array type.
time_array< chrono::time_nanoseconds > time_nanoseconds_array
array_trivial_copyable< T > time_array
Array of time values.
time_array< chrono::time_seconds > time_seconds_array
static constexpr time_types_t time_types