sparrow
0.3.0
Loading...
Searching...
No Matches
timestamp_concepts.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 "
sparrow/types/data_type.hpp
"
18
#include "
sparrow/utils/mp_utils.hpp
"
19
20
namespace
sparrow
21
{
22
using
timestamp_types_t
=
mpl::typelist
<
23
timestamp<std::chrono::seconds>
,
24
timestamp<std::chrono::milliseconds>
,
25
timestamp<std::chrono::microseconds>
,
26
timestamp<std::chrono::nanoseconds>
>;
27
28
static
constexpr
timestamp_types_t
timestamp_types
;
29
template
<
typename
T>
30
concept
timestamp_type
=
mpl::contains<T>
(
timestamp_types
);
31
}
// namespace sparrow
sparrow::timestamp_type
Definition
timestamp_concepts.hpp:30
data_type.hpp
mp_utils.hpp
sparrow::mpl::contains
consteval bool contains(L list)
Definition
mp_utils.hpp:285
sparrow
Definition
array.hpp:21
sparrow::timestamp_types
static constexpr timestamp_types_t timestamp_types
Definition
timestamp_concepts.hpp:28
sparrow::timestamp
date::zoned_time< Duration, TimeZonePtr > timestamp
Definition
data_type.hpp:129
sparrow::timestamp_types_t
mpl::typelist< timestamp< std::chrono::seconds >, timestamp< std::chrono::milliseconds >, timestamp< std::chrono::microseconds >, timestamp< std::chrono::nanoseconds > > timestamp_types_t
Definition
timestamp_concepts.hpp:22
sparrow::mpl::typelist
A sequence of types, used for meta-programming operations.
Definition
mp_utils.hpp:55
include
sparrow
layout
temporal
timestamp_concepts.hpp
Generated by
1.13.2