ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
arithmetical.hpp
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header file is part of module \alib_enums of the \aliblong.
4///
5/// \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
6/// Published under \ref mainpage_license "Boost Software License".
7//==================================================================================================
8#ifndef HPP_ALIB_ENUMS_ARITHMETICAL
9#define HPP_ALIB_ENUMS_ARITHMETICAL 1
10#pragma once
11#if !defined(DOXYGEN)
12# include "alib/alib.hpp"
13#endif
14
16
17#include "alib/lang/tmp.hpp"
18
19namespace alib { namespace enums {
20
21// #################################################################################################
22// struct T_EnumIsArithmetical
23// #################################################################################################
24
25
26#if DOXYGEN
27//==================================================================================================
28/// Simple TMP struct that inherits <c>std::false_type</c> by default. If specialized for an
29/// enumeration type \p{TEnum} to inherit <c>std::true_type</c>, the following operators set of
30/// \alib operators become applicable to elements of \p{TEnum}:
31///
32/// - \alib{enums::arithmetical;operator<}
33/// - \alib{enums::arithmetical;operator<=}
34/// - \alib{enums::arithmetical;operator>}
35/// - \alib{enums::arithmetical;operator>=}
36/// - \alib{enums::arithmetical;operator+}
37/// - \alib{enums::arithmetical;operator-}
38/// - \alib{enums::arithmetical;operator++}
39/// - \alib{enums::arithmetical;operator++(TEnum&;std::underlying_type<TEnum>::type)}
40/// - \alib{enums::arithmetical;operator--}
41/// - \alib{enums::arithmetical;operator--(TEnum&;std::underlying_type<TEnum>::type)}
42/// - \alib{enums::arithmetical;operator+=}
43/// - \alib{enums::arithmetical;operator-=}
44///
45/// \attention
46/// Likewise with the operators introduced with TMP struct \alib{enums;T_EnumIsBitwise},
47/// this documentation "fakes" the operators into namespace <c>alib::enums</c>,
48/// while in fact they are defined in the global namespace!<br>
49/// See \ref alib_enums_arithmetic_standard "corresponding note" in the Programmer's Manual
50/// for details.
51///
52/// <b>Restrictions</b><br>
53/// For technical reasons, this concept is not applicable to enum types that are defined as
54/// \c private or \c protected inner types of structs or classes.
55///
56/// \see
57/// - Macro \ref ALIB_ENUMS_MAKE_ARITHMETICAL, which specializes this TMP struct for a given
58/// enumeration type.
59/// - For details and a source code sample see chapter \ref alib_enums_arithmetic_standard
60/// of the Programmer's Manual of module \alib_enums.
61///
62/// @tparam TEnum The enum type to enable arithmetical operators for.
63/// @tparam TEnableIf This parameter has a default expressions and <b>must not</b> be provided
64/// with specializations of this struct.
65/// It is used to ensure that template parameter \p{TEnum} is an enumeration type.
66//==================================================================================================
67template<typename TEnum,typename TEnableIf>
68struct T_EnumIsArithmetical : public std::false_type {};
69#else
70template<typename TEnum,
71 typename TEnableIf= ATMP_VOID_IF(std::is_enum<TEnum>::value)>
72struct T_EnumIsArithmetical : public std::false_type {};
73#endif
74
75
76} // namespace alib[::enums]
77/// Type alias in namespace \b alib.
78template<typename TEnum>
80
81} // namespace [alib]
82
83
84// #################################################################################################
85// Helper Macros
86// #################################################################################################
87
88#define ALIB_ENUMS_MAKE_ARITHMETICAL(TEnum) \
89namespace alib::enums { \
90template<> struct T_EnumIsArithmetical<TEnum> : public std::true_type {}; } \
91
92
93// #################################################################################################
94// Arithmetic Operators
95// #################################################################################################
96
97// For documentation, all operators and enum related template functions are faked into namespace
98// alib::enums
99#if DOXYGEN
100namespace alib { namespace enums {
101
102/// Operators available to elements of enumerations if \alib{enums;T_EnumIsArithmetical} is
103/// specialized.
104///
105/// \note
106/// This namespace exits only in the documentation to collect the operators.
107/// When parsed by a C++ compiler, <b>the operators reside in the global namespace</b>.
108namespace arithmetical {
109#endif
110
111
112/// Comparison operator \e less between an enum element and an integral value of underlying type.
113///
114/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
115/// template enum type \p{TEnum} to inherit \c std::true_type.
116///
117/// @tparam TEnum Enumeration type.
118/// @param lhs First operand.
119/// @param rhs Second operand.
120/// @return The result of the comparison.
121template<typename TEnum>
122constexpr
123#if DOXYGEN
124bool
125#else
127#endif
128operator< (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
129{
130 using TValue= typename std::underlying_type<TEnum>::type;
131 return TValue(lhs) < rhs ;
132}
133
134/// Comparison operator <em>less or equal</em> between an enum element and an integral value of
135/// underlying type.
136///
137/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
138/// template enum type \p{TEnum} to inherit \c std::true_type.
139///
140/// @tparam TEnum Enumeration type.
141/// @param lhs First operand.
142/// @param rhs Second operand.
143/// @return The result of the comparison.
144template<typename TEnum>
145constexpr
146#if DOXYGEN
147bool
148#else
150#endif
151operator<= (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
152{
153 using TValue= typename std::underlying_type<TEnum>::type;
154 return TValue(lhs) <= rhs;
155}
156
157/// Comparison operator <em>greater</em> between an enum element and an integral value of
158/// underlying type.
159///
160/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
161/// template enum type \p{TEnum} to inherit \c std::true_type.
162///
163/// @tparam TEnum Enumeration type.
164/// @param lhs First operand.
165/// @param rhs Second operand.
166/// @return The result of the comparison.
167template<typename TEnum>
168constexpr
169#if DOXYGEN
170bool
171#else
173#endif
174operator> (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
175{
176 using TValue= typename std::underlying_type<TEnum>::type;
177 return TValue(lhs) > rhs;
178}
179
180
181
182/// Comparison operator <em>greater or equal</em> between an enum element and an integral value of
183/// underlying type.
184///
185/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
186/// template enum type \p{TEnum} to inherit \c std::true_type.
187///
188/// @tparam TEnum Enumeration type.
189/// @param lhs First operand.
190/// @param rhs Second operand.
191/// @return The result of the comparison.
192template<typename TEnum>
193constexpr
194#if DOXYGEN
195bool
196#else
198#endif
199operator>= (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
200{
201 using TValue= typename std::underlying_type<TEnum>::type;
202 return TValue(lhs) >= rhs ;
203}
204
205
206/// Add operator between two enum elements.
207///
208/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
209/// template enum type \p{TEnum} to inherit \c std::true_type.
210///
211/// @tparam TEnum Enumeration type.
212/// @param lhs First operand.
213/// @param rhs Second operand.
214/// @return The resulting enum element.
215template<typename TEnum>
216constexpr
217#if DOXYGEN
218TEnum
219#else
221#endif
222operator+ (TEnum lhs, TEnum rhs) noexcept
223{
224 using TValue= typename std::underlying_type<TEnum>::type;
225 return TEnum( TValue(lhs) + TValue(rhs) );
226}
227
228/// Add operator between an enum element and an integral value of underlying type.
229///
230/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
231/// template enum type \p{TEnum} to inherit \c std::true_type.
232///
233/// @tparam TEnum Enumeration type.
234/// @param lhs First operand.
235/// @param rhs Second operand.
236/// @return The resulting enum element.
237template<typename TEnum>
238constexpr
239#if DOXYGEN
240TEnum
241#else
243#endif
244operator+ (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
245{
246 using TValue= typename std::underlying_type<TEnum>::type;
247 return TEnum( TValue(lhs) + rhs );
248}
249
250
251/// Add assignment operator between two enum elements.
252///
253/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
254/// template enum type \p{TEnum} to inherit \c std::true_type.
255///
256/// @tparam TEnum Enumeration type.
257/// @param lhs First operand.
258/// @param rhs Second operand.
259/// @return The new value of \p{lhs} which is set the resulting enum element.
260template<typename TEnum>
261constexpr
262#if DOXYGEN
263TEnum
264#else
266#endif
267operator+= (TEnum& lhs, TEnum rhs) noexcept
268{
269 using TValue= typename std::underlying_type<TEnum>::type;
270 return lhs= TEnum( TValue(lhs) + TValue(rhs) );
271}
272
273/// Add assignment operator between an enum element and an integral value of underlying type.
274///
275/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
276/// template enum type \p{TEnum} to inherit \c std::true_type.
277///
278/// @param[in,out] lhs Reference to the first operand. Receives the result.
279/// @tparam TEnum Enumeration type.
280/// @param rhs Second operand.
281/// @return The new value of \p{lhs} which is set the resulting enum element.
282template<typename TEnum>
283constexpr
284#if DOXYGEN
285TEnum
286#else
288#endif
289operator+= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
290{
291 using TValue= typename std::underlying_type<TEnum>::type;
292 return lhs= TEnum( TValue(lhs) + rhs );
293}
294
295/// Prefix increment operator.
296///
297/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
298/// template enum type \p{TEnum} to inherit \c std::true_type.
299///
300/// @tparam TEnum Enumeration type.
301/// @param[in,out] arg Reference to the enum value to be incremented.
302/// @return The new value of \p{lhs} which is set the resulting enum element.
303template<typename TEnum>
304constexpr
305#if DOXYGEN
306TEnum
307#else
309#endif
310operator++ (TEnum& arg) noexcept
311{
312 using TValue= typename std::underlying_type<TEnum>::type;
313 return arg= TEnum( TValue(arg) + 1 );
314}
315
316/// Postfix increment operator.
317///
318/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
319/// template enum type \p{TEnum} to inherit \c std::true_type.
320///
321/// @tparam TEnum Enumeration type.
322/// @param[in,out] arg Reference to the enum value to be incremented.
323/// @return The old value of \p{arg}.
324template<typename TEnum>
325constexpr
326#if DOXYGEN
327TEnum
328#else
330#endif
331operator++ (TEnum& arg, typename std::underlying_type<TEnum>::type) noexcept
332{
333 using TValue= typename std::underlying_type<TEnum>::type;
334 TEnum tmp= arg;
335 arg= TEnum( TValue(arg) + 1 );
336 return tmp;
337}
338
339/// Subtract operator between two enum elements.
340///
341/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
342/// template enum type \p{TEnum} to inherit \c std::true_type.
343///
344/// @tparam TEnum Enumeration type.
345/// @param lhs First operand.
346/// @param rhs Second operand.
347/// @return The resulting enum element.
348template<typename TEnum>
349constexpr
350#if DOXYGEN
351TEnum
352#else
354#endif
355operator- (TEnum lhs, TEnum rhs) noexcept
356{
357 using TValue= typename std::underlying_type<TEnum>::type;
358 return TEnum( TValue(lhs) - TValue(rhs) );
359}
360
361
362/// Subtract operator between an enum element and an integral value of underlying type.
363///
364/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
365/// template enum type \p{TEnum} to inherit \c std::true_type.
366///
367/// @tparam TEnum Enumeration type.
368/// @param lhs First operand.
369/// @param rhs Second operand.
370/// @return The resulting enum element.
371template<typename TEnum>
372constexpr
373#if DOXYGEN
374TEnum
375#else
377#endif
378operator- (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
379{
380 using TValue= typename std::underlying_type<TEnum>::type;
381 return TEnum( TValue(lhs) - rhs );
382}
383
384/// Subtract assignment operator between two enum elements.
385///
386/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
387/// template enum type \p{TEnum} to inherit \c std::true_type.
388///
389/// @tparam TEnum Enumeration type.
390/// @param lhs First operand.
391/// @param rhs Second operand.
392/// @return The new value of \p{lhs} which is set the resulting enum element.
393template<typename TEnum>
394constexpr
395#if DOXYGEN
396TEnum
397#else
399#endif
400operator-= (TEnum& lhs, TEnum rhs) noexcept
401{
402 using TValue= typename std::underlying_type<TEnum>::type;
403 return lhs= TEnum( TValue(lhs) - TValue(rhs) );
404}
405
406/// Subtract assignment operator between an enum element and an integral value of underlying type.
407///
408/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
409/// template enum type \p{TEnum} to inherit \c std::true_type.
410///
411/// @tparam TEnum Enumeration type.
412/// @param[in,out] lhs Reference to the first operand. Receives the result.
413/// @param rhs Second operand.
414/// @return The new value of \p{lhs} which is set the resulting enum element.
415template<typename TEnum>
416constexpr
417#if DOXYGEN
418TEnum
419#else
421#endif
422operator-= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
423{
424 using TValue= typename std::underlying_type<TEnum>::type;
425 return lhs= TEnum( TValue(lhs) - rhs );
426}
427
428/// Prefix decrement operator.
429///
430/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
431/// template enum type \p{TEnum} to inherit \c std::true_type.
432///
433/// @tparam TEnum Enumeration type.
434/// @param[in,out] arg Reference to the enum value to be decremented.
435/// @return The new value of \p{lhs} which is set the resulting enum element.
436template<typename TEnum>
437constexpr
438#if DOXYGEN
439TEnum
440#else
442#endif
443operator-- (TEnum& arg) noexcept
444{
445 using TValue= typename std::underlying_type<TEnum>::type;
446 return arg= TEnum( TValue(arg) - 1 );
447}
448
449
450/// Postfix decrement operator.
451///
452/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
453/// template enum type \p{TEnum} to inherit \c std::true_type.
454///
455/// @tparam TEnum Enumeration type.
456/// @param[in,out] arg Reference to the enum value to be decremented.
457/// @return The old value of \p{arg}.
458template<typename TEnum>
459constexpr
460#if DOXYGEN
461TEnum
462#else
464#endif
465operator-- (TEnum& arg, typename std::underlying_type<TEnum>::type) noexcept
466{
467 using TValue= typename std::underlying_type<TEnum>::type;
468 TEnum tmp= arg;
469 arg= TEnum( TValue(arg) - 1 );
470 return tmp;
471}
472
473/// Unary plus operator for enum elements.
474///
475/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
476/// template enum type \p{TEnum} to inherit \c std::true_type.
477///
478/// @tparam TEnum Enumeration type.
479/// @param arg Operand.
480/// @return Parameter \p{arg} (identical value).
481template<typename TEnum>
482constexpr
483#if DOXYGEN
484TEnum
485#else
487#endif
488operator+ (TEnum arg) noexcept
489{
490 return arg;
491}
492
493/// Unary minus operator for enum elements.
494///
495/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
496/// template enum type \p{TEnum} to inherit \c std::true_type.
497///
498/// @tparam TEnum Enumeration type.
499/// @param arg Operand.
500/// @return The resulting enum element.
501template<typename TEnum>
502constexpr
503#if DOXYGEN
504TEnum
505#else
507#endif
508operator- (TEnum arg) noexcept
509{
510 using TValue= typename std::underlying_type<TEnum>::type;
511 return TEnum( - TValue(arg) );
512}
513
514
515/// Multiplication operator between an enum element and an integral value of underlying type.
516///
517/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
518/// template enum type \p{TEnum} to inherit \c std::true_type.
519///
520/// @tparam TEnum Enumeration type.
521/// @param lhs First operand.
522/// @param rhs Second operand.
523/// @return The resulting enum element.
524template<typename TEnum>
525constexpr
526#if DOXYGEN
527TEnum
528#else
530#endif
531operator* (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
532{
533 using TValue= typename std::underlying_type<TEnum>::type;
534 return TEnum( TValue(lhs) * rhs );
535}
536
537/// Multiplication assignment operator between an enum element and an integral value of underlying
538/// type.
539///
540/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
541/// template enum type \p{TEnum} to inherit \c std::true_type.
542///
543/// @tparam TEnum Enumeration type.
544/// @param[in,out] lhs Reference to the first operand. Receives the result.
545/// @param rhs Second operand.
546/// @return The resulting enum element.
547template<typename TEnum>
548constexpr
549#if DOXYGEN
550TEnum
551#else
553#endif
554operator*= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
555{
556 using TValue= typename std::underlying_type<TEnum>::type;
557 return lhs= TEnum( TValue(lhs) * rhs );
558}
559
560/// Division operator between an enum element and an integral value of underlying type.
561///
562/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
563/// template enum type \p{TEnum} to inherit \c std::true_type.
564///
565/// @tparam TEnum Enumeration type.
566/// @param lhs First operand.
567/// @param rhs Second operand.
568/// @return The resulting enum element.
569template<typename TEnum>
570constexpr
571#if DOXYGEN
572TEnum
573#else
575#endif
576operator/ (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
577{
578 using TValue= typename std::underlying_type<TEnum>::type;
579 return TEnum( TValue(lhs) / rhs );
580}
581
582/// Division assignment operator between an enum element and an integral value of underlying
583/// type.
584///
585/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
586/// template enum type \p{TEnum} to inherit \c std::true_type.
587///
588/// @tparam TEnum Enumeration type.
589/// @param[in,out] lhs Reference to the first operand. Receives the result.
590/// @param rhs Second operand.
591/// @return The resulting enum element.
592template<typename TEnum>
593constexpr
594#if DOXYGEN
595TEnum
596#else
598#endif
599operator/= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
600{
601 using TValue= typename std::underlying_type<TEnum>::type;
602 return lhs= TEnum( TValue(lhs) / rhs );
603}
604
605
606/// Modulo operator between an enum element and an integral value of underlying type.
607///
608/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
609/// template enum type \p{TEnum} to inherit \c std::true_type.
610///
611/// @tparam TEnum Enumeration type.
612/// @param lhs First operand.
613/// @param rhs Second operand.
614/// @return The resulting enum element.
615template<typename TEnum>
616constexpr
617#if DOXYGEN
618TEnum
619#else
621#endif
622operator% (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
623{
624 using TValue= typename std::underlying_type<TEnum>::type;
625 return TEnum( TValue(lhs) % rhs );
626}
627
628/// Modulo assignment operator between an enum element and an integral value of underlying
629/// type.
630///
631/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
632/// template enum type \p{TEnum} to inherit \c std::true_type.
633///
634/// @tparam TEnum Enumeration type.
635/// @param[in,out] lhs Reference to the first operand. Receives the result.
636/// @param rhs Second operand.
637/// @return The resulting enum element.
638template<typename TEnum>
639constexpr
640#if DOXYGEN
641TEnum
642#else
644#endif
645operator%= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
646{
647 using TValue= typename std::underlying_type<TEnum>::type;
648 return lhs= TEnum( TValue(lhs) % rhs );
649}
650
651
652/// Shift-left operator between an enum element and an integral value of underlying type.
653///
654/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
655/// template enum type \p{TEnum} to inherit \c std::true_type.
656///
657/// @tparam TEnum Enumeration type.
658/// @param lhs First operand.
659/// @param rhs Second operand.
660/// @return The resulting enum element.
661template<typename TEnum>
662constexpr
663#if DOXYGEN
664TEnum
665#else
667#endif
668operator<< (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
669{
670 using TValue= typename std::underlying_type<TEnum>::type;
671 return TEnum( TValue(lhs) << rhs );
672}
673
674/// Shift-left assignment operator between an enum element and an integral value of underlying type.
675///
676/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
677/// template enum type \p{TEnum} to inherit \c std::true_type.
678///
679/// @tparam TEnum Enumeration type.
680/// @param[in,out] lhs Reference to the first operand. Receives the result.
681/// @param rhs Second operand.
682/// @return The resulting enum element.
683template<typename TEnum>
684constexpr
685#if DOXYGEN
686TEnum
687#else
689#endif
690operator<<= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
691{
692 using TValue= typename std::underlying_type<TEnum>::type;
693 return lhs= TEnum( TValue(lhs) << rhs );
694}
695
696
697/// Shift-right operator between an enum element and an integral value of underlying type.
698///
699/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
700/// template enum type \p{TEnum} to inherit \c std::true_type.
701///
702/// @tparam TEnum Enumeration type.
703/// @param lhs First operand.
704/// @param rhs Second operand.
705/// @return The resulting enum element.
706template<typename TEnum>
707constexpr
708#if DOXYGEN
709TEnum
710#else
712#endif
713operator>> (TEnum lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
714{
715 using TValue= typename std::underlying_type<TEnum>::type;
716 return TEnum( TValue(lhs) << rhs );
717}
718
719/// Shift-right assignment operator between an enum element and an integral value of underlying type.
720///
721/// Selected by the compiler only if \alib{enums;T_EnumIsArithmetical} is specialized for
722/// template enum type \p{TEnum} to inherit \c std::true_type.
723///
724/// @tparam TEnum Enumeration type.
725/// @param[in,out] lhs Reference to the first operand. Receives the result.
726/// @param rhs Second operand.
727/// @return The resulting enum element.
728template<typename TEnum>
729constexpr
730#if DOXYGEN
731TEnum
732#else
734#endif
735operator>>= (TEnum& lhs, typename std::underlying_type<TEnum>::type rhs) noexcept
736{
737 using TValue= typename std::underlying_type<TEnum>::type;
738 return lhs= TEnum( TValue(lhs) >> rhs );
739}
740
741
742// Reset documentation fake
743#if DOXYGEN
744}}}} // doxygen namespace [alib::enums::arithmetical]
745#endif
746
747
748#endif // HPP_ALIB_ENUMS_ARITHMETICAL
749
#define ALIB_ASSERT_MODULE(modulename)
Definition alib.hpp:223
#define ATMP_VOID_IF(Cond)
Definition tmp.hpp:47
#define ATMP_T_IF(T, Cond)
Definition tmp.hpp:49
constexpr TEnum operator<<=(TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr TEnum operator+(TEnum lhs, TEnum rhs) noexcept
constexpr TEnum operator*=(TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr TEnum operator>>=(TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr TEnum operator>>(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr TEnum operator/=(TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr TEnum operator/(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr bool operator>(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr TEnum operator++(TEnum &arg) noexcept
constexpr bool operator>=(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr TEnum operator%(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr TEnum operator-=(TEnum &lhs, TEnum rhs) noexcept
constexpr TEnum operator<<(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr TEnum operator+=(TEnum &lhs, TEnum rhs) noexcept
constexpr TEnum operator%=(TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr TEnum operator-(TEnum lhs, TEnum rhs) noexcept
constexpr TEnum operator*(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr bool operator<(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr bool operator<=(TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
constexpr TEnum operator--(TEnum &arg) noexcept
Definition alib.cpp:69