@@ -110,7 +110,7 @@ namespace utxx {
110
110
T* m_begin;
111
111
T* m_end;
112
112
113
- void check_range (size_t a_id) const throw (badarg_error) {
113
+ void check_range (size_t a_id) const {
114
114
size_t n = m_header->max_recs ;
115
115
if (likely (a_id < n))
116
116
return ;
@@ -158,7 +158,7 @@ namespace utxx {
158
158
// / @return true if the storage file didn't exist and was created
159
159
bool init (const char * a_filename, size_t a_max_recs, bool a_read_only = false ,
160
160
int a_mode = default_file_mode(), void const * a_map_address = nullptr,
161
- int a_map_options = 0) throw (io_error, utxx::runtime_error) ;
161
+ int a_map_options = 0);
162
162
163
163
// / Initialize the storage in shared memory.
164
164
// / @param a_segment the shared memory segment
@@ -168,8 +168,7 @@ namespace utxx {
168
168
// / @param a_max_recs max capacity of the storage in the number of records
169
169
// / @return true if the shared memory object didn't exist and was created
170
170
bool init (bip::fixed_managed_shared_memory& a_segment,
171
- const char * a_name, persist_attach_type a_flag, size_t a_max_recs)
172
- throw (utxx::runtime_error);
171
+ const char * a_name, persist_attach_type a_flag, size_t a_max_recs);
173
172
174
173
size_t count () const { return m_header->rec_count .load (std::memory_order_relaxed); }
175
174
size_t capacity () const { return m_header->max_recs ; }
@@ -180,7 +179,7 @@ namespace utxx {
180
179
181
180
// / Allocate next record and return its ID.
182
181
// / @return
183
- size_t allocate_rec () throw(utxx::runtime_error) {
182
+ size_t allocate_rec () {
184
183
auto error = [this ]() {
185
184
throw utxx::runtime_error
186
185
(" persist_array: Out of storage capacity (" , this ->m_storage_name , " )!" );
@@ -235,10 +234,10 @@ namespace utxx {
235
234
// / @return id of the given object in the storage
236
235
size_t id_of (const T* a_rec) const { return a_rec - m_begin; }
237
236
238
- const T& operator [] (size_t a_id) const throw (badarg_error) {
237
+ const T& operator [] (size_t a_id) const {
239
238
check_range (a_id); return *get (a_id);
240
239
}
241
- T& operator [] (size_t a_id) throw (badarg_error) {
240
+ T& operator [] (size_t a_id) {
242
241
check_range (a_id); return *get (a_id);
243
242
}
244
243
@@ -314,8 +313,8 @@ namespace utxx {
314
313
315
314
template <typename T, size_t NLocks, typename Lock, typename Ext>
316
315
bool persist_array<T,NLocks,Lock,Ext>::
317
- init (const char * a_filename, size_t a_max_recs, bool a_read_only, int a_mode, void const * a_map_address, int a_map_options)
318
- throw (io_error, utxx::runtime_error )
316
+ init (const char * a_filename, size_t a_max_recs, bool a_read_only, int a_mode,
317
+ void const * a_map_address, int a_map_options )
319
318
{
320
319
auto sz = total_size (a_max_recs);
321
320
@@ -439,7 +438,6 @@ namespace utxx {
439
438
bool persist_array<T,NLocks,Lock,Ext>::
440
439
init (bip::fixed_managed_shared_memory& a_segment,
441
440
const char * a_name, persist_attach_type a_flag, size_t a_max_recs)
442
- throw (utxx::runtime_error)
443
441
{
444
442
std::pair<char *, size_t > fres = a_segment.find <char >(a_name);
445
443
0 commit comments