ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
arithmetical.inl
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header-file is part of the module \alib_enumops of the \aliblong.
4///
5/// \emoji :copyright: 2013-2025 A-Worx GmbH, Germany.
6/// Published under \ref mainpage_license "Boost Software License".
7//==================================================================================================
9
10// #################################################################################################
11// struct ArithmeticalTraits
12// #################################################################################################
13
14//==================================================================================================
15/// A simple type trait that inherits <c>std::false_type</c> by default. If specialized for an
16/// enumeration type \p{TEnum} to inherit <c>std::true_type</c>, the following operators set of
17/// \alib operators become applicable to elements of \p{TEnum}:
18///
19/// - \alib{enumops::arithmetical;operator<}
20/// - \alib{enumops::arithmetical;operator<=}
21/// - \alib{enumops::arithmetical;operator>}
22/// - \alib{enumops::arithmetical;operator>=}
23/// - \alib{enumops::arithmetical;operator+}
24/// - \alib{enumops::arithmetical;operator-}
25/// - \alib{enumops::arithmetical;operator++}
26/// - \alib{enumops::arithmetical;operator++(TEnum&;std::underlying_type<TEnum>::type)}
27/// - \alib{enumops::arithmetical;operator--}
28/// - \alib{enumops::arithmetical;operator--(TEnum&;std::underlying_type<TEnum>::type)}
29/// - \alib{enumops::arithmetical;operator+=}
30/// - \alib{enumops::arithmetical;operator-=}
31///
32/// \attention
33/// Likewise with the operators introduced with the type trait \alib{enumops;BitwiseTraits},
34/// this documentation "fakes" the operators into namespace <c>alib::enumops</c>,
35/// while in fact they are defined in the global namespace!<br>
36/// See \ref alib_enums_arithmetic_standard "corresponding note" in the Programmer's Manual
37/// for details.
38///
39/// <b>Restrictions</b><br>
40/// For technical reasons, this concept is not applicable to enum types that are defined as
41/// \c private or \c protected inner types of structs or classes.
42///
43/// \see
44/// - Macro \ref ALIB_ENUMS_MAKE_ARITHMETICAL, which specializes this type trait for a given
45/// enumeration type.
46/// - For details and a source code sample see chapter \ref alib_enums_arithmetic_standard
47/// of the Programmer's Manual of the module \alib_enumops.
48///
49/// @tparam TEnum The enum type to enable arithmetical operators for.
50//==================================================================================================
51template<typename TEnum>
52requires std::is_enum<TEnum>::value
53struct ArithmeticalTraits : std::false_type {};
54
56
57/// Concept that is satisfied if the type trait \alib{enumops;ArithmeticalTraits}
58/// is specialized for type \p{TEnum} to inherit <c>std::true_type</c>.
59/// @tparam TEnum The type to test.
60template<typename TEnum>
62
64} // namespace [alib::enumops]
65
66
67// #################################################################################################
68// Arithmetic Operators
69// #################################################################################################
70
71// For documentation, all operators and enum related template functions are faked into namespace
72// alib::enumops
73#if DOXYGEN
74namespace alib { namespace enumops {
75
76/// Operators available to elements of enumerations if \alib{enumops;ArithmeticalTraits} is
77/// specialized.
78///
79/// \note
80/// This namespace exits only in the documentation to collect the operators.
81/// When parsed by a C++ compiler, <b>the operators reside in the global namespace</b>.
82namespace arithmetical {
83#endif
84
85
86/// Comparison operator \e less between an enum element and an integral value of underlying type.
87///
88/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
89/// template enum type \p{TEnum} to inherit \c std::true_type.
90///
91/// @tparam TEnum Enumeration type.
92/// @param lhs First operand.
93/// @param rhs Second operand.
94/// @return The result of the comparison.
96template<typename TEnum>
98constexpr bool operator< (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
99{
100 using TValue= typename std::underlying_type<TEnum>::type;
101 return TValue(lhs) < rhs ;
102}
103
104/// Comparison operator <em>less or equal</em> between an enum element and an integral value of
105/// the underlying type.
106///
107/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
108/// template enum type \p{TEnum} to inherit \c std::true_type.
109///
110/// @tparam TEnum Enumeration type.
111/// @param lhs First operand.
112/// @param rhs Second operand.
113/// @return The result of the comparison.
115template<typename TEnum>
117constexpr bool operator<= (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
118{
119 using TValue= typename std::underlying_type<TEnum>::type;
120 return TValue(lhs) <= rhs;
121}
122
123/// Comparison operator <em>greater</em> between an enum element and an integral value of
124/// underlying type.
125///
126/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
127/// template enum type \p{TEnum} to inherit \c std::true_type.
128///
129/// @tparam TEnum Enumeration type.
130/// @param lhs First operand.
131/// @param rhs Second operand.
132/// @return The result of the comparison.
134template<typename TEnum>
136constexpr bool operator> (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
137{
138 using TValue= typename std::underlying_type<TEnum>::type;
139 return TValue(lhs) > rhs;
140}
141
142/// Comparison operator <em>greater or equal</em> between an enum element and an integral value of
143/// the underlying type.
144///
145/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
146/// template enum type \p{TEnum} to inherit \c std::true_type.
147///
148/// @tparam TEnum Enumeration type.
149/// @param lhs First operand.
150/// @param rhs Second operand.
151/// @return The result of the comparison.
153template<typename TEnum>
155constexpr bool operator>= (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
156{
157 using TValue= typename std::underlying_type<TEnum>::type;
158 return TValue(lhs) >= rhs ;
159}
160
161
162/// Add-operator between two enum elements.
163///
164/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
165/// template enum type \p{TEnum} to inherit \c std::true_type.
166///
167/// @tparam TEnum Enumeration type.
168/// @param lhs First operand.
169/// @param rhs Second operand.
170/// @return The resulting enum element.
172template<typename TEnum>
174constexpr TEnum operator+ (TEnum lhs, TEnum rhs) noexcept
175{
176 using TValue= typename std::underlying_type<TEnum>::type;
177 return TEnum( TValue(lhs) + TValue(rhs) );
178}
179
180/// Add-operator between an enum element and an integral value of underlying type.
181///
182/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
183/// template enum type \p{TEnum} to inherit \c std::true_type.
184///
185/// @tparam TEnum Enumeration type.
186/// @param lhs First operand.
187/// @param rhs Second operand.
188/// @return The resulting enum element.
190template<typename TEnum>
192constexpr TEnum operator+ (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
193{
194 using TValue= typename std::underlying_type<TEnum>::type;
195 return TEnum( TValue(lhs) + rhs );
196}
197
198
199/// Add-assignment-operator between two enum elements.
200///
201/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
202/// template enum type \p{TEnum} to inherit \c std::true_type.
203///
204/// @tparam TEnum Enumeration type.
205/// @param lhs First operand.
206/// @param rhs Second operand.
207/// @return The new value of \p{lhs} which is set to the resulting enum element.
209template<typename TEnum>
211constexpr TEnum operator+= (TEnum& lhs, TEnum rhs) noexcept
212{
213 using TValue= typename std::underlying_type<TEnum>::type;
214 return lhs= TEnum( TValue(lhs) + TValue(rhs) );
215}
216
217/// Add-assignment-operator between an enum element and an integral value of underlying type.
218///
219/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
220/// template enum type \p{TEnum} to inherit \c std::true_type.
221///
222/// @param[in,out] lhs Reference to the first operand. Receives the result.
223/// @tparam TEnum Enumeration type.
224/// @param rhs Second operand.
225/// @return The new value of \p{lhs} which is set to the resulting enum element.
227template<typename TEnum>
229constexpr TEnum operator+= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
230{
231 using TValue= typename std::underlying_type<TEnum>::type;
232 return lhs= TEnum( TValue(lhs) + rhs );
233}
234
235/// Prefix increment operator.
236///
237/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
238/// template enum type \p{TEnum} to inherit \c std::true_type.
239///
240/// @tparam TEnum Enumeration type.
241/// @param[in,out] arg Reference to the enum value to be incremented.
242/// @return The new value of \p{lhs} which is set to the resulting enum element.
244template<typename TEnum>
246constexpr TEnum operator++ (TEnum& arg) noexcept
247{
248 using TValue= typename std::underlying_type<TEnum>::type;
249 return arg= TEnum( TValue(arg) + 1 );
250}
251
252/// Postfix increment operator.
253///
254/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
255/// template enum type \p{TEnum} to inherit \c std::true_type.
256///
257/// @tparam TEnum Enumeration type.
258/// @param[in,out] arg Reference to the enum value to be incremented.
259/// @return The old value of \p{arg}.
261template<typename TEnum>
263constexpr TEnum operator++ (TEnum& arg, typename std::underlying_type<TEnum>::type) noexcept
264{
265 using TValue= typename std::underlying_type<TEnum>::type;
266 TEnum tmp= arg;
267 arg= TEnum( TValue(arg) + 1 );
268 return tmp;
269}
270
271/// Subtract operator between two enum elements.
272///
273/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
274/// template enum type \p{TEnum} to inherit \c std::true_type.
275///
276/// @tparam TEnum Enumeration type.
277/// @param lhs First operand.
278/// @param rhs Second operand.
279/// @return The resulting enum element.
281template<typename TEnum>
283constexpr TEnum operator- (TEnum lhs, TEnum rhs) noexcept
284{
285 using TValue= typename std::underlying_type<TEnum>::type;
286 return TEnum( TValue(lhs) - TValue(rhs) );
287}
288
289
290/// Subtract operator between an enum element and an integral value of underlying type.
291///
292/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
293/// template enum type \p{TEnum} to inherit \c std::true_type.
294///
295/// @tparam TEnum Enumeration type.
296/// @param lhs First operand.
297/// @param rhs Second operand.
298/// @return The resulting enum element.
300template<typename TEnum>
302constexpr TEnum operator- (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
303{
304 using TValue= typename std::underlying_type<TEnum>::type;
305 return TEnum( TValue(lhs) - rhs );
306}
307
308/// Subtract assignment operator between two enum elements.
309///
310/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
311/// template enum type \p{TEnum} to inherit \c std::true_type.
312///
313/// @tparam TEnum Enumeration type.
314/// @param lhs First operand.
315/// @param rhs Second operand.
316/// @return The new value of \p{lhs} which is set to the resulting enum element.
318template<typename TEnum>
320constexpr TEnum operator-= (TEnum& lhs, TEnum rhs) noexcept
321{
322 using TValue= typename std::underlying_type<TEnum>::type;
323 return lhs= TEnum( TValue(lhs) - TValue(rhs) );
324}
325
326/// Subtract assignment operator between an enum element and an integral value of underlying type.
327///
328/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
329/// template enum type \p{TEnum} to inherit \c std::true_type.
330///
331/// @tparam TEnum Enumeration type.
332/// @param[in,out] lhs Reference to the first operand. Receives the result.
333/// @param rhs Second operand.
334/// @return The new value of \p{lhs} which is set to the resulting enum element.
336template<typename TEnum>
338constexpr TEnum operator-= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
339{
340 using TValue= typename std::underlying_type<TEnum>::type;
341 return lhs= TEnum( TValue(lhs) - rhs );
342}
343
344/// Prefix decrement operator.
345///
346/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
347/// template enum type \p{TEnum} to inherit \c std::true_type.
348///
349/// @tparam TEnum Enumeration type.
350/// @param[in,out] arg Reference to the enum value to be decremented.
351/// @return The new value of \p{lhs} which is set to the resulting enum element.
353template<typename TEnum>
355constexpr TEnum operator-- (TEnum& arg) noexcept
356{
357 using TValue= typename std::underlying_type<TEnum>::type;
358 return arg= TEnum( TValue(arg) - 1 );
359}
360
361
362/// Postfix decrement operator.
363///
364/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
365/// template enum type \p{TEnum} to inherit \c std::true_type.
366///
367/// @tparam TEnum Enumeration type.
368/// @param[in,out] arg Reference to the enum value to be decremented.
369/// @return The old value of \p{arg}.
371template<typename TEnum>
373constexpr TEnum operator-- (TEnum& arg, typename std::underlying_type<TEnum>::type) noexcept
374{
375 using TValue= typename std::underlying_type<TEnum>::type;
376 TEnum tmp= arg;
377 arg= TEnum( TValue(arg) - 1 );
378 return tmp;
379}
380
381/// Unary plus operator for enum elements.
382///
383/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
384/// template enum type \p{TEnum} to inherit \c std::true_type.
385///
386/// @tparam TEnum Enumeration type.
387/// @param arg Operand.
388/// @return Parameter \p{arg} (identical value).
390template<typename TEnum>
392constexpr TEnum operator+ (TEnum arg) noexcept
393{
394 return arg;
395}
396
397/// Unary minus operator for enum elements.
398///
399/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
400/// template enum type \p{TEnum} to inherit \c std::true_type.
401///
402/// @tparam TEnum Enumeration type.
403/// @param arg Operand.
404/// @return The resulting enum element.
406template<typename TEnum>
408constexpr TEnum operator- (TEnum arg) noexcept
409{
410 using TValue= typename std::underlying_type<TEnum>::type;
411 return TEnum( - TValue(arg) );
412}
413
414
415/// Multiplication operator between an enum element and an integral value of underlying type.
416///
417/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
418/// template enum type \p{TEnum} to inherit \c std::true_type.
419///
420/// @tparam TEnum Enumeration type.
421/// @param lhs First operand.
422/// @param rhs Second operand.
423/// @return The resulting enum element.
425template<typename TEnum>
427constexpr TEnum operator* (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
428{
429 using TValue= typename std::underlying_type<TEnum>::type;
430 return TEnum( TValue(lhs) * rhs );
431}
432
433/// Multiplication assignment operator between an enum element and an integral value of underlying
434/// type.
435///
436/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
437/// template enum type \p{TEnum} to inherit \c std::true_type.
438///
439/// @tparam TEnum Enumeration type.
440/// @param[in,out] lhs Reference to the first operand. Receives the result.
441/// @param rhs Second operand.
442/// @return The resulting enum element.
444template<typename TEnum>
446constexpr TEnum operator*= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
447{
448 using TValue= typename std::underlying_type<TEnum>::type;
449 return lhs= TEnum( TValue(lhs) * rhs );
450}
451
452/// Division operator between an enum element and an integral value of underlying type.
453///
454/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
455/// template enum type \p{TEnum} to inherit \c std::true_type.
456///
457/// @tparam TEnum Enumeration type.
458/// @param lhs First operand.
459/// @param rhs Second operand.
460/// @return The resulting enum element.
462template<typename TEnum>
464constexpr TEnum operator/ (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
465{
466 using TValue= typename std::underlying_type<TEnum>::type;
467 return TEnum( TValue(lhs) / rhs );
468}
469
470/// Division assignment operator between an enum element and an integral value of underlying
471/// type.
472///
473/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
474/// template enum type \p{TEnum} to inherit \c std::true_type.
475///
476/// @tparam TEnum Enumeration type.
477/// @param[in,out] lhs Reference to the first operand. Receives the result.
478/// @param rhs Second operand.
479/// @return The resulting enum element.
481template<typename TEnum>
483constexpr TEnum operator/= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
484{
485 using TValue= typename std::underlying_type<TEnum>::type;
486 return lhs= TEnum( TValue(lhs) / rhs );
487}
488
489
490/// Modulo operator between an enum element and an integral value of underlying type.
491///
492/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
493/// template enum type \p{TEnum} to inherit \c std::true_type.
494///
495/// @tparam TEnum Enumeration type.
496/// @param lhs First operand.
497/// @param rhs Second operand.
498/// @return The resulting enum element.
500template<typename TEnum>
502constexpr TEnum operator% (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
503{
504 using TValue= typename std::underlying_type<TEnum>::type;
505 return TEnum( TValue(lhs) % rhs );
506}
507
508/// Modulo assignment operator between an enum element and an integral value of underlying
509/// type.
510///
511/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
512/// template enum type \p{TEnum} to inherit \c std::true_type.
513///
514/// @tparam TEnum Enumeration type.
515/// @param[in,out] lhs Reference to the first operand. Receives the result.
516/// @param rhs Second operand.
517/// @return The resulting enum element.
519template<typename TEnum>
521constexpr TEnum operator%= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
522{
523 using TValue= typename std::underlying_type<TEnum>::type;
524 return lhs= TEnum( TValue(lhs) % rhs );
525}
526
527
528/// Shift-left operator between an enum element and an integral value of underlying type.
529///
530/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
531/// template enum type \p{TEnum} to inherit \c std::true_type.
532///
533/// @tparam TEnum Enumeration type.
534/// @param lhs First operand.
535/// @param rhs Second operand.
536/// @return The resulting enum element.
538template<typename TEnum>
540constexpr TEnum operator<< (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
541{
542 using TValue= typename std::underlying_type<TEnum>::type;
543 return TEnum( TValue(lhs) << rhs );
544}
545
546/// Shift-left assignment operator between an enum element and an integral value of underlying type.
547///
548/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
549/// template enum type \p{TEnum} to inherit \c std::true_type.
550///
551/// @tparam TEnum Enumeration type.
552/// @param[in,out] lhs Reference to the first operand. Receives the result.
553/// @param rhs Second operand.
554/// @return The resulting enum element.
556template<typename TEnum>
558constexpr TEnum operator<<= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
559{
560 using TValue= typename std::underlying_type<TEnum>::type;
561 return lhs= TEnum( TValue(lhs) << rhs );
562}
563
564
565/// Shift-right operator between an enum element and an integral value of underlying type.
566///
567/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
568/// template enum type \p{TEnum} to inherit \c std::true_type.
569///
570/// @tparam TEnum Enumeration type.
571/// @param lhs First operand.
572/// @param rhs Second operand.
573/// @return The resulting enum element.
575template<typename TEnum>
577constexpr TEnum operator>> (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
578{
579 using TValue= typename std::underlying_type<TEnum>::type;
580 return TEnum( TValue(lhs) << rhs );
581}
582
583/// Shift-right assignment operator between an enum element and an integral value of
584/// the underlying type.
585///
586/// Selected by the compiler only if \alib{enumops;ArithmeticalTraits} is specialized for
587/// template enum type \p{TEnum} to inherit \c std::true_type.
588///
589/// @tparam TEnum Enumeration type.
590/// @param[in,out] lhs Reference to the first operand. Receives the result.
591/// @param rhs Second operand.
592/// @return The resulting enum element.
594template<typename TEnum>
596constexpr TEnum operator>>= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
597{
598 using TValue= typename std::underlying_type<TEnum>::type;
599 return lhs= TEnum( TValue(lhs) >> rhs );
600}
601
602// Reset documentation fake
603#if DOXYGEN
604}}}} // doxygen namespace [alib::enumops::arithmetical]
605#endif
606
607
#define ALIB_WARNINGS_RESTORE
Definition alib.inl:705
#define ALIB_WARNINGS_IGNORE_DOCS
Definition alib.inl:688
#define ALIB_EXPORT
Definition alib.inl:488
ALIB_EXPORT constexpr TEnum operator/=(TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr TEnum operator>>=(TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr bool operator>(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr TEnum operator*(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr bool operator>=(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr TEnum operator>>(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr TEnum operator+(TEnum lhs, TEnum rhs) noexcept
ALIB_EXPORT constexpr TEnum operator*=(TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr TEnum operator++(TEnum &arg) noexcept
ALIB_EXPORT constexpr bool operator<(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr TEnum operator%=(TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr TEnum operator+=(TEnum &lhs, TEnum rhs) noexcept
ALIB_EXPORT constexpr TEnum operator<<=(TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr bool operator<=(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr TEnum operator-=(TEnum &lhs, TEnum rhs) noexcept
ALIB_EXPORT constexpr TEnum operator%(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr TEnum operator<<(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr TEnum operator-(TEnum lhs, TEnum rhs) noexcept
ALIB_EXPORT constexpr TEnum operator/(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
ALIB_EXPORT constexpr TEnum operator--(TEnum &arg) noexcept