@@ -65,8 +65,9 @@ class r_vector {
6565 r_vector& operator =(const r_vector& rhs);
6666 r_vector& operator =(r_vector&& rhs);
6767
68- operator SEXP () const ;
69- operator sexp () const ;
68+ // @pachadotdev: + noexcept
69+ operator SEXP () noexcept const ;
70+ operator sexp () noexcept const ;
7071
7172#ifdef LONG_VECTOR_SUPPORT
7273 T operator [](const int pos) const ;
@@ -85,20 +86,22 @@ class r_vector {
8586 bool contains (const r_string& name) const ;
8687 bool is_altrep () const ;
8788 bool named () const ;
88- R_xlen_t size () const ;
89- bool empty () const ;
90- SEXP data () const ;
89+ // @pachadotdev: + noexcept
90+ R_xlen_t size () noexcept const ;
91+ bool empty () no except const ;
92+ SEXP data () noexcept const ;
9193
9294 const sexp attr (const char * name) const ;
9395 const sexp attr (const std::string& name) const ;
9496 const sexp attr (SEXP name) const ;
9597
9698 r_vector<r_string> names () const ;
9799
98- const_iterator begin () const ;
99- const_iterator end () const ;
100- const_iterator cbegin () const ;
101- const_iterator cend () const ;
100+ // @pachadotdev: + noexcept
101+ const_iterator begin () noexcept const ;
102+ const_iterator end () noexcept const ;
103+ const_iterator cbegin () noexcept const ;
104+ const_iterator cend () noexcept const ;
102105 const_iterator find (const r_string& name) const ;
103106
104107 class const_iterator {
@@ -448,13 +451,15 @@ inline r_vector<T>& r_vector<T>::operator=(r_vector&& rhs) {
448451 return *this ;
449452}
450453
454+ // @pachadotdev: + noexcept
451455template <typename T>
452- inline r_vector<T>::operator SEXP () const {
456+ inline r_vector<T>::operator SEXP () const noexcept {
453457 return data_;
454458}
455459
460+ // @pachadotdev: + noexcept
456461template <typename T>
457- inline r_vector<T>::operator sexp () const {
462+ inline r_vector<T>::operator sexp () const noexcept {
458463 return data_;
459464}
460465
@@ -636,23 +641,27 @@ inline SEXP r_vector<T>::valid_length(SEXP x, R_xlen_t n) {
636641 throw std::length_error (message);
637642}
638643
644+ // @pachadotdev: + noexcept
639645template <typename T>
640- inline typename r_vector<T>::const_iterator r_vector<T>::begin() const {
646+ inline typename r_vector<T>::const_iterator r_vector<T>::begin() const noexcept {
641647 return const_iterator (this , 0 );
642648}
643649
650+ // @pachadotdev: + noexcept
644651template <typename T>
645- inline typename r_vector<T>::const_iterator r_vector<T>::end() const {
652+ inline typename r_vector<T>::const_iterator r_vector<T>::end() const noexcept {
646653 return const_iterator (this , length_);
647654}
648655
656+ // @pachadotdev: + noexcept
649657template <typename T>
650- inline typename r_vector<T>::const_iterator r_vector<T>::cbegin() const {
658+ inline typename r_vector<T>::const_iterator r_vector<T>::cbegin() const noexcept {
651659 return const_iterator (this , 0 );
652660}
653661
662+ // @pachadotdev: + noexcept
654663template <typename T>
655- inline typename r_vector<T>::const_iterator r_vector<T>::cend() const {
664+ inline typename r_vector<T>::const_iterator r_vector<T>::cend() const noexcept {
656665 return const_iterator (this , length_);
657666}
658667
@@ -1070,8 +1079,9 @@ inline void r_vector<T>::push_back(T value) {
10701079 ++length_;
10711080}
10721081
1082+ // @pachadotdev: + noexcept
10731083template <typename T>
1074- inline void r_vector<T>::pop_back() {
1084+ inline void r_vector<T>::pop_back() noexcept {
10751085 --length_;
10761086}
10771087
@@ -1128,7 +1138,7 @@ inline typename r_vector<T>::iterator r_vector<T>::erase(R_xlen_t pos) {
11281138}
11291139
11301140template <typename T>
1131- inline void r_vector<T>::clear() {
1141+ inline void r_vector<T>::clear() noexcept {
11321142 length_ = 0 ;
11331143}
11341144
0 commit comments