@@ -58,10 +58,8 @@ struct __compressed_pair_elem {
58
58
: __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
59
59
#endif
60
60
61
-
62
- _LIBCPP_INLINE_VISIBILITY reference __get () _NOEXCEPT { return __value_; }
63
- _LIBCPP_INLINE_VISIBILITY
64
- const_reference __get () const _NOEXCEPT { return __value_; }
61
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get () _NOEXCEPT { return __value_; }
62
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __get () const _NOEXCEPT { return __value_; }
65
63
66
64
private:
67
65
_Tp __value_;
@@ -97,9 +95,8 @@ struct __compressed_pair_elem<_Tp, _Idx, true> : private _Tp {
97
95
: __value_type(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
98
96
#endif
99
97
100
- _LIBCPP_INLINE_VISIBILITY reference __get () _NOEXCEPT { return *this ; }
101
- _LIBCPP_INLINE_VISIBILITY
102
- const_reference __get () const _NOEXCEPT { return *this ; }
98
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get () _NOEXCEPT { return *this ; }
99
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __get () const _NOEXCEPT { return *this ; }
103
100
};
104
101
105
102
template <class _T1 , class _T2 >
@@ -143,23 +140,19 @@ class __compressed_pair : private __compressed_pair_elem<_T1, 0>,
143
140
typename __make_tuple_indices<sizeof...(_Args2)>::type()) {}
144
141
#endif
145
142
146
- _LIBCPP_INLINE_VISIBILITY
147
- typename _Base1::reference first () _NOEXCEPT {
143
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 typename _Base1::reference first () _NOEXCEPT {
148
144
return static_cast <_Base1&>(*this ).__get ();
149
145
}
150
146
151
- _LIBCPP_INLINE_VISIBILITY
152
- typename _Base1::const_reference first () const _NOEXCEPT {
147
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename _Base1::const_reference first () const _NOEXCEPT {
153
148
return static_cast <_Base1 const &>(*this ).__get ();
154
149
}
155
150
156
- _LIBCPP_INLINE_VISIBILITY
157
- typename _Base2::reference second () _NOEXCEPT {
151
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 typename _Base2::reference second () _NOEXCEPT {
158
152
return static_cast <_Base2&>(*this ).__get ();
159
153
}
160
154
161
- _LIBCPP_INLINE_VISIBILITY
162
- typename _Base2::const_reference second () const _NOEXCEPT {
155
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename _Base2::const_reference second () const _NOEXCEPT {
163
156
return static_cast <_Base2 const &>(*this ).__get ();
164
157
}
165
158
@@ -172,22 +165,18 @@ class __compressed_pair : private __compressed_pair_elem<_T1, 0>,
172
165
return static_cast <_Base2*>(__pair);
173
166
}
174
167
175
- _LIBCPP_INLINE_VISIBILITY
176
- void swap (__compressed_pair& __x)
177
- _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
178
- __is_nothrow_swappable<_T2>::value)
179
- {
168
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 void swap (__compressed_pair& __x)
169
+ _NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) {
180
170
using _VSTD::swap;
181
171
swap (first (), __x.first ());
182
172
swap (second (), __x.second ());
183
173
}
184
174
};
185
175
186
176
template <class _T1 , class _T2 >
187
- inline _LIBCPP_INLINE_VISIBILITY
177
+ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
188
178
void swap (__compressed_pair<_T1, _T2>& __x, __compressed_pair<_T1, _T2>& __y)
189
- _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
190
- __is_nothrow_swappable<_T2>::value) {
179
+ _NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) {
191
180
__x.swap (__y);
192
181
}
193
182
0 commit comments