@@ -18,72 +18,72 @@ namespace gf {
18
18
19
19
Flags () = default ;
20
20
21
- constexpr Flags (NoneType /* unused */ )
21
+ constexpr Flags (NoneType /* unused */ ) noexcept
22
22
: m_data(0 )
23
23
{
24
24
}
25
25
26
- constexpr Flags (AllType /* unused */ )
26
+ constexpr Flags (AllType /* unused */ ) noexcept
27
27
: m_data(0 )
28
28
{
29
29
m_data = ~m_data;
30
30
}
31
31
32
- constexpr Flags (E e)
32
+ constexpr Flags (E e) noexcept
33
33
: m_data(static_cast <Type>(e))
34
34
{
35
35
}
36
36
37
- constexpr Flags operator ~() const
37
+ constexpr Flags operator ~() const noexcept
38
38
{
39
39
return Flags (~m_data);
40
40
}
41
41
42
- constexpr Flags operator |(Flags flags) const
42
+ constexpr Flags operator |(Flags flags) const noexcept
43
43
{
44
44
return Flags (m_data | flags.m_data );
45
45
}
46
46
47
- Flags& operator |=(Flags flags)
47
+ constexpr Flags& operator |=(Flags flags) noexcept
48
48
{
49
49
m_data |= flags.m_data ;
50
50
return *this ;
51
51
}
52
52
53
- constexpr Flags operator &(Flags flags) const
53
+ constexpr Flags operator &(Flags flags) const noexcept
54
54
{
55
55
return Flags (m_data & flags.m_data );
56
56
}
57
57
58
- Flags& operator &=(Flags flags)
58
+ constexpr Flags& operator &=(Flags flags) noexcept
59
59
{
60
60
m_data &= flags.m_data ;
61
61
return *this ;
62
62
}
63
63
64
- constexpr operator bool () const
64
+ constexpr operator bool () const noexcept
65
65
{
66
66
return m_data != 0 ;
67
67
}
68
68
69
- constexpr bool test (E flag) const
69
+ constexpr bool test (E flag) const noexcept
70
70
{
71
71
return (m_data & static_cast <Type>(flag)) != 0 ;
72
72
}
73
73
74
- void set (E flag)
74
+ constexpr void set (E flag) noexcept
75
75
{
76
76
m_data |= static_cast <Type>(flag);
77
77
}
78
78
79
- void reset (E flag)
79
+ constexpr void reset (E flag) noexcept
80
80
{
81
81
m_data &= ~static_cast <Type>(flag);
82
82
}
83
83
84
84
using Type = std::underlying_type_t <E>;
85
85
86
- constexpr Type value () const
86
+ constexpr Type value () const noexcept
87
87
{
88
88
return m_data;
89
89
}
0 commit comments