@@ -123,7 +123,7 @@ namespace etl
123
123
// *************************************************************************
124
124
// / Default constructor.
125
125
// *************************************************************************
126
- ETL_CONSTEXPR array_view ()
126
+ ETL_CONSTEXPR array_view () ETL_NOEXCEPT
127
127
: mbegin(ETL_NULLPTR),
128
128
mend(ETL_NULLPTR)
129
129
{
@@ -238,7 +238,7 @@ namespace etl
238
238
// / Construct from iterators
239
239
// *************************************************************************
240
240
template <typename TIterator>
241
- ETL_CONSTEXPR array_view (const TIterator begin_, const TIterator end_)
241
+ ETL_CONSTEXPR array_view (const TIterator begin_, const TIterator end_) ETL_NOEXCEPT
242
242
: mbegin(etl::to_address(begin_)),
243
243
mend(etl::to_address(begin_) + etl::distance(begin_, end_))
244
244
{
@@ -249,7 +249,7 @@ namespace etl
249
249
// *************************************************************************
250
250
template <typename TIterator,
251
251
typename TSize>
252
- ETL_CONSTEXPR array_view (const TIterator begin_, const TSize size_)
252
+ ETL_CONSTEXPR array_view (const TIterator begin_, const TSize size_) ETL_NOEXCEPT
253
253
: mbegin(etl::to_address(begin_)),
254
254
mend(etl::to_address(begin_) + size_)
255
255
{
@@ -259,7 +259,7 @@ namespace etl
259
259
// / Construct from C array
260
260
// *************************************************************************
261
261
template <size_t Array_Size>
262
- ETL_CONSTEXPR array_view (T(&begin_)[Array_Size])
262
+ ETL_CONSTEXPR array_view (T(&begin_)[Array_Size]) ETL_NOEXCEPT
263
263
: mbegin(begin_),
264
264
mend(begin_ + Array_Size)
265
265
{
@@ -268,7 +268,7 @@ namespace etl
268
268
// *************************************************************************
269
269
// / Copy constructor
270
270
// *************************************************************************
271
- ETL_CONSTEXPR array_view (const array_view& other)
271
+ ETL_CONSTEXPR array_view (const array_view& other) ETL_NOEXCEPT
272
272
: mbegin(other.mbegin),
273
273
mend(other.mend)
274
274
{
@@ -309,143 +309,143 @@ namespace etl
309
309
// *************************************************************************
310
310
// / Returns a pointer to the first element of the internal storage.
311
311
// *************************************************************************
312
- pointer data ()
312
+ pointer data () ETL_NOEXCEPT
313
313
{
314
314
return mbegin;
315
315
}
316
316
317
317
// *************************************************************************
318
318
// / Returns a const pointer to the first element of the internal storage.
319
319
// *************************************************************************
320
- const_pointer data () const
320
+ const_pointer data () const ETL_NOEXCEPT
321
321
{
322
322
return mbegin;
323
323
}
324
324
325
325
// *************************************************************************
326
326
// / Returns an iterator to the beginning of the array.
327
327
// *************************************************************************
328
- iterator begin ()
328
+ iterator begin () ETL_NOEXCEPT
329
329
{
330
330
return mbegin;
331
331
}
332
332
333
333
// *************************************************************************
334
334
// / Returns a const iterator to the beginning of the array.
335
335
// *************************************************************************
336
- const_iterator begin () const
336
+ const_iterator begin () const ETL_NOEXCEPT
337
337
{
338
338
return mbegin;
339
339
}
340
340
341
341
// *************************************************************************
342
342
// / Returns a const iterator to the beginning of the array.
343
343
// *************************************************************************
344
- const_iterator cbegin () const
344
+ const_iterator cbegin () const ETL_NOEXCEPT
345
345
{
346
346
return mbegin;
347
347
}
348
348
349
349
// *************************************************************************
350
350
// / Returns an iterator to the end of the array.
351
351
// *************************************************************************
352
- iterator end ()
352
+ iterator end () ETL_NOEXCEPT
353
353
{
354
354
return mend;
355
355
}
356
356
357
357
// *************************************************************************
358
358
// / Returns a const iterator to the end of the array.
359
359
// *************************************************************************
360
- const_iterator end () const
360
+ const_iterator end () const ETL_NOEXCEPT
361
361
{
362
362
return mend;
363
363
}
364
364
365
365
// *************************************************************************
366
366
// Returns a const iterator to the end of the array.
367
367
// *************************************************************************
368
- const_iterator cend () const
368
+ const_iterator cend () const ETL_NOEXCEPT
369
369
{
370
370
return mend;
371
371
}
372
372
373
373
// *************************************************************************
374
374
// Returns an reverse iterator to the reverse beginning of the array.
375
375
// *************************************************************************
376
- reverse_iterator rbegin ()
376
+ reverse_iterator rbegin () ETL_NOEXCEPT
377
377
{
378
378
return reverse_iterator (mend);
379
379
}
380
380
381
381
// *************************************************************************
382
382
// / Returns a const reverse iterator to the reverse beginning of the array.
383
383
// *************************************************************************
384
- const_reverse_iterator rbegin () const
384
+ const_reverse_iterator rbegin () const ETL_NOEXCEPT
385
385
{
386
386
return const_reverse_iterator (mend);
387
387
}
388
388
389
389
// *************************************************************************
390
390
// / Returns a const reverse iterator to the reverse beginning of the array.
391
391
// *************************************************************************
392
- const_reverse_iterator crbegin () const
392
+ const_reverse_iterator crbegin () const ETL_NOEXCEPT
393
393
{
394
394
return const_reverse_iterator (mend);
395
395
}
396
396
397
397
// *************************************************************************
398
398
// / Returns a reverse iterator to the end of the array.
399
399
// *************************************************************************
400
- reverse_iterator rend ()
400
+ reverse_iterator rend () ETL_NOEXCEPT
401
401
{
402
402
return reverse_iterator (mbegin);
403
403
}
404
404
405
405
// *************************************************************************
406
406
// / Returns a const reverse iterator to the end of the array.
407
407
// *************************************************************************
408
- const_reverse_iterator rend () const
408
+ const_reverse_iterator rend () const ETL_NOEXCEPT
409
409
{
410
410
return const_reverse_iterator (mbegin);
411
411
}
412
412
413
413
// *************************************************************************
414
414
// / Returns a const reverse iterator to the end of the array.
415
415
// *************************************************************************
416
- const_reverse_iterator crend () const
416
+ const_reverse_iterator crend () const ETL_NOEXCEPT
417
417
{
418
418
return const_reverse_iterator (mbegin);
419
419
}
420
420
421
421
// *************************************************************************
422
422
// / Returns <b>true</b> if the array size is zero.
423
423
// *************************************************************************
424
- ETL_CONSTEXPR bool empty () const
424
+ ETL_CONSTEXPR bool empty () const ETL_NOEXCEPT
425
425
{
426
426
return (mbegin == mend);
427
427
}
428
428
429
429
// *************************************************************************
430
430
// / Returns the size of the array.
431
431
// *************************************************************************
432
- ETL_CONSTEXPR size_t size () const
432
+ ETL_CONSTEXPR size_t size () const ETL_NOEXCEPT
433
433
{
434
434
return static_cast <size_t >(mend - mbegin);
435
435
}
436
436
437
437
// *************************************************************************
438
438
// / Returns the maximum possible size of the array.
439
439
// *************************************************************************
440
- ETL_CONSTEXPR size_t max_size () const
440
+ ETL_CONSTEXPR size_t max_size () const ETL_NOEXCEPT
441
441
{
442
442
return size ();
443
443
}
444
444
445
445
// *************************************************************************
446
446
// / Assign from a view.
447
447
// *************************************************************************
448
- array_view& operator =(const array_view& other)
448
+ array_view& operator =(const array_view& other) ETL_NOEXCEPT
449
449
{
450
450
mbegin = other.mbegin ;
451
451
mend = other.mend ;
@@ -477,7 +477,7 @@ namespace etl
477
477
// *************************************************************************
478
478
// / Returns a reference to the indexed value.
479
479
// *************************************************************************
480
- reference operator [](const size_t i)
480
+ reference operator [](const size_t i) ETL_NOEXCEPT
481
481
{
482
482
return mbegin[i];
483
483
}
@@ -486,7 +486,7 @@ namespace etl
486
486
// *************************************************************************
487
487
// / Returns a const reference to the indexed value.
488
488
// *************************************************************************
489
- const_reference operator [](const size_t i) const
489
+ const_reference operator [](const size_t i) const ETL_NOEXCEPT
490
490
{
491
491
return mbegin[i];
492
492
}
@@ -516,7 +516,7 @@ namespace etl
516
516
// *************************************************************************
517
517
// / Swaps with another array_view.
518
518
// *************************************************************************
519
- void swap (array_view& other)
519
+ void swap (array_view& other) ETL_NOEXCEPT
520
520
{
521
521
using ETL_OR_STD::swap; // Allow ADL
522
522
@@ -527,7 +527,7 @@ namespace etl
527
527
// *************************************************************************
528
528
// / Shrinks the view by moving its start forward.
529
529
// *************************************************************************
530
- void remove_prefix (const size_type n)
530
+ void remove_prefix (const size_type n) ETL_NOEXCEPT
531
531
{
532
532
if (n < size ())
533
533
mbegin += n;
@@ -538,7 +538,7 @@ namespace etl
538
538
// *************************************************************************
539
539
// / Shrinks the view by moving its end backward.
540
540
// *************************************************************************
541
- void remove_suffix (const size_type n)
541
+ void remove_suffix (const size_type n) ETL_NOEXCEPT
542
542
{
543
543
if (n < size ())
544
544
mend -= n;
@@ -647,7 +647,7 @@ namespace etl
647
647
// / Swaps the values.
648
648
// *************************************************************************
649
649
template <typename T>
650
- void swap (etl::array_view<T>& lhs, etl::array_view<T>& rhs)
650
+ void swap (etl::array_view<T>& lhs, etl::array_view<T>& rhs) ETL_NOEXCEPT
651
651
{
652
652
lhs.swap (rhs);
653
653
}
0 commit comments