@@ -53,7 +53,7 @@ class StorageArray
5353 size_type length () const { return m_length; }
5454 size_type size () const { return m_length; }
5555 bool empty () const { return m_length == 0 ; }
56- void reserve (size_type new_cap = 0 ) SPSL_NOEXCEPT_IF(!ThrowOnTruncate)
56+ void reserve (size_type new_cap = 0 )
5757 {
5858 if (new_cap > max_size () && ThrowOnTruncate)
5959 throw std::length_error (" requested capacity exceeds maximum" );
@@ -107,15 +107,15 @@ class StorageArray
107107 char_type& operator [](size_type pos) { return m_buffer[pos]; }
108108 const char_type& operator [](size_type pos) const { return m_buffer[pos]; }
109109
110- void assign (const char_type* s, size_type n) SPSL_NOEXCEPT_IF(!ThrowOnTruncate)
110+ void assign (const char_type* s, size_type n)
111111 {
112112 size_type len = std::min (n, max_size ());
113113 if (len != n && ThrowOnTruncate)
114114 throw std::length_error (" string length exceeds maximum capacity" );
115115
116116 assign_nothrow (s, len);
117117 }
118- void assign (size_type count, char_type ch) SPSL_NOEXCEPT_IF(!ThrowOnTruncate)
118+ void assign (size_type count, char_type ch)
119119 {
120120 size_type len = std::min (count, max_size ());
121121 if (len != count && ThrowOnTruncate)
@@ -127,7 +127,7 @@ class StorageArray
127127 }
128128
129129 template <typename InputIt>
130- void assign (InputIt first, InputIt last) SPSL_NOEXCEPT_IF(!ThrowOnTruncate)
130+ void assign (InputIt first, InputIt last)
131131 {
132132 // is there enough space?
133133 const size_type n = std::distance (first, last);
@@ -148,7 +148,7 @@ class StorageArray
148148 m_buffer[0 ] = nul;
149149 m_length = 0 ;
150150 }
151- void push_back (char_type c) SPSL_NOEXCEPT_IF(!ThrowOnTruncate)
151+ void push_back (char_type c)
152152 {
153153 if (capacity_left ())
154154 {
@@ -219,7 +219,7 @@ class StorageArray
219219 }
220220
221221
222- void append (size_type count, char_type ch) SPSL_NOEXCEPT_IF(!ThrowOnTruncate)
222+ void append (size_type count, char_type ch)
223223 {
224224 // is there enough space?
225225 size_type appendCount = std::min (count, capacity_left ());
@@ -231,7 +231,7 @@ class StorageArray
231231 m_buffer[m_length] = nul;
232232 }
233233
234- void append (const char_type* s, size_type n) SPSL_NOEXCEPT_IF(!ThrowOnTruncate)
234+ void append (const char_type* s, size_type n)
235235 {
236236 // is there enough space?
237237 const size_type appendCount = std::min (n, capacity_left ());
@@ -244,7 +244,7 @@ class StorageArray
244244 }
245245
246246 template <typename InputIt>
247- void append (InputIt first, InputIt last) SPSL_NOEXCEPT_IF(!ThrowOnTruncate)
247+ void append (InputIt first, InputIt last)
248248 {
249249 // is there enough space?
250250 const size_type n = std::distance (first, last);
@@ -259,7 +259,7 @@ class StorageArray
259259 m_buffer[m_length] = nul;
260260 }
261261
262- void resize (size_type count, char_type ch) SPSL_NOEXCEPT_IF(!ThrowOnTruncate)
262+ void resize (size_type count, char_type ch)
263263 {
264264 if (count < size ())
265265 {
@@ -278,7 +278,6 @@ class StorageArray
278278 }
279279
280280 void replace (size_type pos, size_type count, const char_type* cstr, size_type count2)
281- SPSL_NOEXCEPT_IF(!ThrowOnTruncate)
282281 {
283282 // simple implementation (avoid a lot of memmove's): create a new string and swap
284283 // => This is ok because there is no heap allocation, making this actually fast.
@@ -302,7 +301,6 @@ class StorageArray
302301 }
303302
304303 void replace (size_type pos, size_type count, size_type count2, char_type ch)
305- SPSL_NOEXCEPT_IF(!ThrowOnTruncate)
306304 {
307305 // => same implementation as above
308306 this_type tmp;
0 commit comments