COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
DispatchMsgHelperType.h
1//
2// Copyright 2020 - 2024 (C). Alex Robenko. All rights reserved.
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8#pragma once
9
11
12namespace comms
13{
14
15namespace details
16{
17
18enum class DispatchMsgTypeEnum
19{
20 Multiple,
21 Single,
22 None
23};
24
25template <std::size_t TCount>
26using DispatchMsgHelperIntType =
28 TCount == 0U
29 >::template Type<
30 std::integral_constant<DispatchMsgTypeEnum, DispatchMsgTypeEnum::None>,
32 TCount == 1U
33 >::template Type<
34 std::integral_constant<DispatchMsgTypeEnum, DispatchMsgTypeEnum::Single>,
35 std::integral_constant<DispatchMsgTypeEnum, DispatchMsgTypeEnum::Multiple>
36 >
37 >;
38
39
40} // namespace details
41
42} // namespace comms
Main namespace for all classes / functions of COMMS library.
Replacement to std::conditional.
Definition type_traits.h:28
Replacement to some types from standard type_traits.