29 template <
typename TTrue,
typename TFalse>
36 template <
typename TTrue,
typename TFalse>
41template <
bool TCond,
typename TTrue,
typename TFalse>
45struct LazyShallowConditional
47 template <
template<
typename...>
class TTrue,
template<
typename...>
class TFalse,
typename... TParams>
48 using Type = TTrue<TParams...>;
52struct LazyShallowConditional<false>
54 template <
template<
typename...>
class TTrue,
template<
typename...>
class TFalse,
typename... TParams>
55 using Type = TFalse<TParams...>;
59struct LazyDeepConditional
61 template <
template<
typename...>
class TTrue,
template<
typename...>
class TFalse,
typename... TParams>
62 using Type =
typename TTrue<>::template Type<TParams...>;
66struct LazyDeepConditional<false>
68 template <
template<
typename...>
class TTrue,
template<
typename...>
class TFalse,
typename... TParams>
69 using Type =
typename TFalse<>::template Type<TParams...>;
73struct LazyShallowDeepConditional
75 template <
template<
typename...>
class TTrue,
template<
typename...>
class TFalse,
typename... TParams>
76 using Type = TTrue<TParams...>;
80struct LazyShallowDeepConditional<false>
82 template <
template<
typename...>
class TTrue,
template<
typename...>
class TFalse,
typename... TParams>
83 using Type =
typename TFalse<>::template Type<TParams...>;
90 template <
typename T,
typename...>
95class FieldCheckVersionDependent
99 using Type = std::integral_constant<bool, T::isVersionDependent()>;
102template <
typename...>
103class FieldCheckNonDefaultRefresh
106 template <
typename T>
107 using Type = std::integral_constant<bool, T::hasNonDefaultRefresh()>;
110template <
typename...>
111class FieldCheckVarLength
114 template <
typename T>
115 using Type = std::integral_constant<bool, T::minLength() != T::maxLength()>;
118template <
typename...>
119class FieldCheckReadNoStatus
122 template <
typename T>
123 using Type = std::integral_constant<bool, T::hasReadNoStatus()>;
126template <
typename...>
127class FieldCheckWriteNoStatus
130 template <
typename T>
131 using Type = std::integral_constant<bool, T::hasWriteNoStatus()>;
134template <
typename...>
138 template <
typename...>
139 using Type = std::true_type;
143template <
typename...>
147 template <
typename...>
148 using Type = std::false_type;
151template <
typename...>
155 template <
typename T,
typename...>
159template <
typename...>
160struct LogicalOrBinaryOp
163 template <
typename TFirst,
typename TSecond>
164 using Type = std::integral_constant<bool, (TFirst::value || TSecond::value)>;
167template <
typename...>
168struct LogicalAndBinaryOp
171 template <
typename TFirst,
typename TSecond>
172 using Type = std::integral_constant<bool, (TFirst::value && TSecond::value)>;
175template <
typename...>
178 template <
typename TFirst,
typename TSecond>
180 typename Conditional<
181 (TFirst::value >= TSecond::value)
188template <
typename...>
191 template <
typename TFirst,
typename TSecond>
193 typename Conditional<
194 (TFirst::value <= TSecond::value)
201template <
typename...>
204 template <
typename TFirst,
typename TSecond>
206 std::integral_constant<typename TFirst::value_type, TFirst::value + TSecond::value>;
209template <
typename...>
210class FieldMinLengthIntType
213 template <
typename T>
214 using Type = std::integral_constant<std::size_t, T::minLength()>;
217template <
typename...>
218class FieldMaxLengthIntType
221 template <
typename T>
222 using Type = std::integral_constant<std::size_t, T::maxLength()>;
225template <
typename...>
226class FieldBitLengthIntType
229 template <
typename T>
231 typename details::FieldBitLengthIntTypeImpl<
232 T::ParsedOptions::HasFixedBitLengthLimit
236template <
typename...>
237class AlignmentIntType
240 template <
typename T>
241 using Type = std::integral_constant<std::size_t,
alignof(T)>;
244template <
typename...>
248 template <
typename T>
249 using Type = std::integral_constant<std::size_t,
sizeof(T)>;
252template <
typename...>
253class MessageCheckHasStaticId
256 template <
typename TMessage>
257 using Type = std::integral_constant<bool, TMessage::hasStaticMsgId()>;
260template <
typename...>
261struct AccumulateFromUntil
266 template<
typename...>
class TTransformOp,
267 template<
typename...>
class TBinaryOp,
271 typename details::AccumulateFromUntilImpl<
272 (0 ==
sizeof...(TRest)) || (TUntil == 0U)
282template <
typename...>
286 template<
typename...>
class TTransformOp,
287 template<
typename...>
class TBinaryOp,
291 typename AccumulateFromUntil<>::template Type<
Replacement to some types from standard type_traits.
typename Conditional< TCond >::template Type< TTrue, TFalse > ConditionalT
Replacement to std::conditional.
Definition type_traits.h:42
Main namespace for all classes / functions of COMMS library.
Replacement to std::conditional.
Definition type_traits.h:28