@@ -201,11 +201,15 @@ struct _LIBCPP_TEMPLATE_VIS array {
201201 }
202202
203203 // iterators:
204- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator begin () _NOEXCEPT _LIBCPP_LIFETIMEBOUND { return iterator (data ()); }
204+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator begin () _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
205+ return iterator (data ());
206+ }
205207 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator begin () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
206208 return const_iterator (data ());
207209 }
208- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator end () _NOEXCEPT _LIBCPP_LIFETIMEBOUND { return iterator (data () + _Size); }
210+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator end () _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
211+ return iterator (data () + _Size);
212+ }
209213 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator end () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
210214 return const_iterator (data () + _Size);
211215 }
@@ -223,8 +227,12 @@ struct _LIBCPP_TEMPLATE_VIS array {
223227 return const_reverse_iterator (begin ());
224228 }
225229
226- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cbegin () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND { return begin (); }
227- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cend () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND { return end (); }
230+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cbegin () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
231+ return begin ();
232+ }
233+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cend () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
234+ return end ();
235+ }
228236 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_reverse_iterator crbegin () const _NOEXCEPT {
229237 return rbegin ();
230238 }
@@ -236,11 +244,13 @@ struct _LIBCPP_TEMPLATE_VIS array {
236244 [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool empty () const _NOEXCEPT { return _Size == 0 ; }
237245
238246 // element access:
239- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator [](size_type __n) _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
247+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference
248+ operator [](size_type __n) _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
240249 _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS (__n < _Size, " out-of-bounds access in std::array<T, N>" );
241250 return __elems_[__n];
242251 }
243- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference operator [](size_type __n) const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
252+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference
253+ operator [](size_type __n) const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
244254 _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS (__n < _Size, " out-of-bounds access in std::array<T, N>" );
245255 return __elems_[__n];
246256 }
@@ -257,9 +267,15 @@ struct _LIBCPP_TEMPLATE_VIS array {
257267 return __elems_[__n];
258268 }
259269
260- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference front () _NOEXCEPT _LIBCPP_LIFETIMEBOUND { return (*this )[0 ]; }
261- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference front () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND { return (*this )[0 ]; }
262- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference back () _NOEXCEPT _LIBCPP_LIFETIMEBOUND { return (*this )[_Size - 1 ]; }
270+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference front () _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
271+ return (*this )[0 ];
272+ }
273+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference front () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
274+ return (*this )[0 ];
275+ }
276+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference back () _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
277+ return (*this )[_Size - 1 ];
278+ }
263279 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference back () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
264280 return (*this )[_Size - 1 ];
265281 }
@@ -309,11 +325,15 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> {
309325 }
310326
311327 // iterators:
312- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator begin () _NOEXCEPT _LIBCPP_LIFETIMEBOUND { return iterator (data ()); }
328+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator begin () _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
329+ return iterator (data ());
330+ }
313331 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator begin () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
314332 return const_iterator (data ());
315333 }
316- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator end () _NOEXCEPT _LIBCPP_LIFETIMEBOUND { return iterator (data ()); }
334+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 iterator end () _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
335+ return iterator (data ());
336+ }
317337 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator end () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
318338 return const_iterator (data ());
319339 }
@@ -331,8 +351,12 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> {
331351 return const_reverse_iterator (begin ());
332352 }
333353
334- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cbegin () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND { return begin (); }
335- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cend () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND { return end (); }
354+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cbegin () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
355+ return begin ();
356+ }
357+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_iterator cend () const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
358+ return end ();
359+ }
336360 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 const_reverse_iterator crbegin () const _NOEXCEPT {
337361 return rbegin ();
338362 }
@@ -349,7 +373,8 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> {
349373 __libcpp_unreachable ();
350374 }
351375
352- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference operator [](size_type) const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
376+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference
377+ operator [](size_type) const _NOEXCEPT _LIBCPP_LIFETIMEBOUND {
353378 _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS (false , " cannot call array<T, 0>::operator[] on a zero-sized array" );
354379 __libcpp_unreachable ();
355380 }
0 commit comments