@@ -63,31 +63,31 @@ class vector :
63
63
/* *
64
64
* @brief First vector component.
65
65
*/
66
- component_type& x () noexcept
66
+ constexpr component_type& x () noexcept
67
67
{
68
68
return this ->operator [](0 );
69
69
}
70
70
71
71
/* *
72
72
* @brief First vector component.
73
73
*/
74
- const component_type& x () const noexcept
74
+ constexpr const component_type& x () const noexcept
75
75
{
76
76
return this ->operator [](0 );
77
77
}
78
78
79
79
/* *
80
80
* @brief First vector component.
81
81
*/
82
- component_type& r () noexcept
82
+ constexpr component_type& r () noexcept
83
83
{
84
84
return this ->operator [](0 );
85
85
}
86
86
87
87
/* *
88
88
* @brief First vector component.
89
89
*/
90
- const component_type& r () const noexcept
90
+ constexpr const component_type& r () const noexcept
91
91
{
92
92
return this ->operator [](0 );
93
93
}
@@ -96,7 +96,7 @@ class vector :
96
96
* @brief Second vector component.
97
97
*/
98
98
template <typename enable_type = component_type>
99
- std::enable_if_t <(dimension > 1 ), enable_type&> y () noexcept
99
+ constexpr std::enable_if_t <(dimension > 1 ), enable_type&> y () noexcept
100
100
{
101
101
return this ->operator [](1 );
102
102
}
@@ -105,7 +105,7 @@ class vector :
105
105
* @brief Second vector component.
106
106
*/
107
107
template <typename enable_type = component_type>
108
- std::enable_if_t <(dimension > 1 ), const enable_type&> y () const noexcept
108
+ constexpr std::enable_if_t <(dimension > 1 ), const enable_type&> y () const noexcept
109
109
{
110
110
return this ->operator [](1 );
111
111
}
@@ -114,7 +114,7 @@ class vector :
114
114
* @brief Second vector component.
115
115
*/
116
116
template <typename enable_type = component_type>
117
- std::enable_if_t <(dimension > 1 ), enable_type&> g () noexcept
117
+ constexpr std::enable_if_t <(dimension > 1 ), enable_type&> g () noexcept
118
118
{
119
119
return this ->operator [](1 );
120
120
}
@@ -123,7 +123,7 @@ class vector :
123
123
* @brief Second vector component.
124
124
*/
125
125
template <typename enable_type = component_type>
126
- std::enable_if_t <(dimension > 1 ), const enable_type&> g () const noexcept
126
+ constexpr std::enable_if_t <(dimension > 1 ), const enable_type&> g () const noexcept
127
127
{
128
128
return this ->operator [](1 );
129
129
}
@@ -132,7 +132,7 @@ class vector :
132
132
* @brief Third vector component.
133
133
*/
134
134
template <typename enable_type = component_type>
135
- std::enable_if_t <(dimension > 2 ), enable_type&> z () noexcept
135
+ constexpr std::enable_if_t <(dimension > 2 ), enable_type&> z () noexcept
136
136
{
137
137
return this ->operator [](2 );
138
138
}
@@ -141,7 +141,7 @@ class vector :
141
141
* @brief Third vector component.
142
142
*/
143
143
template <typename enable_type = component_type>
144
- std::enable_if_t <(dimension > 2 ), const enable_type&> z () const noexcept
144
+ constexpr std::enable_if_t <(dimension > 2 ), const enable_type&> z () const noexcept
145
145
{
146
146
return this ->operator [](2 );
147
147
}
@@ -150,7 +150,7 @@ class vector :
150
150
* @brief Third vector component.
151
151
*/
152
152
template <typename enable_type = component_type>
153
- std::enable_if_t <(dimension > 2 ), enable_type&> b () noexcept
153
+ constexpr std::enable_if_t <(dimension > 2 ), enable_type&> b () noexcept
154
154
{
155
155
return this ->operator [](2 );
156
156
}
@@ -159,7 +159,7 @@ class vector :
159
159
* @brief Third vector component.
160
160
*/
161
161
template <typename enable_type = component_type>
162
- std::enable_if_t <(dimension > 2 ), const enable_type&> b () const noexcept
162
+ constexpr std::enable_if_t <(dimension > 2 ), const enable_type&> b () const noexcept
163
163
{
164
164
return this ->operator [](2 );
165
165
}
@@ -168,7 +168,7 @@ class vector :
168
168
* @brief Fourth vector component.
169
169
*/
170
170
template <typename enable_type = component_type>
171
- std::enable_if_t <(dimension > 3 ), enable_type&> w () noexcept
171
+ constexpr std::enable_if_t <(dimension > 3 ), enable_type&> w () noexcept
172
172
{
173
173
return this ->operator [](3 );
174
174
}
@@ -177,7 +177,7 @@ class vector :
177
177
* @brief Fourth vector component.
178
178
*/
179
179
template <typename enable_type = component_type>
180
- std::enable_if_t <(dimension > 3 ), const enable_type&> w () const noexcept
180
+ constexpr std::enable_if_t <(dimension > 3 ), const enable_type&> w () const noexcept
181
181
{
182
182
return this ->operator [](3 );
183
183
}
@@ -186,7 +186,7 @@ class vector :
186
186
* @brief Fourth vector component.
187
187
*/
188
188
template <typename enable_type = component_type>
189
- std::enable_if_t <(dimension > 3 ), enable_type&> a () noexcept
189
+ constexpr std::enable_if_t <(dimension > 3 ), enable_type&> a () noexcept
190
190
{
191
191
return this ->operator [](3 );
192
192
}
@@ -195,7 +195,7 @@ class vector :
195
195
* @brief Fourth vector component.
196
196
*/
197
197
template <typename enable_type = component_type>
198
- std::enable_if_t <(dimension > 3 ), const enable_type&> a () const noexcept
198
+ constexpr std::enable_if_t <(dimension > 3 ), const enable_type&> a () const noexcept
199
199
{
200
200
return this ->operator [](3 );
201
201
}
0 commit comments