Simplify dependencies dropping Boost.Core

This commit is contained in:
Ion Gaztañaga
2023-02-01 23:00:23 +01:00
parent 70f756960e
commit 552688c7fc
35 changed files with 282 additions and 263 deletions
+11 -12
View File
@@ -50,7 +50,6 @@
#include <boost/move/traits.hpp>
#include <boost/static_assert.hpp>
#include <boost/core/no_exceptions_support.hpp>
#include <iosfwd>
#include <istream> //
@@ -2969,7 +2968,7 @@ class basic_string
const size_type long_size = this->priv_long_size();
const size_type long_storage = this->priv_long_storage();
//We can make this nothrow as chars are always NoThrowCopyables
BOOST_TRY{
BOOST_CONTAINER_TRY{
pointer reuse = 0;
real_cap = long_size+1;
const pointer ret = this->allocation_command(allocate_new, long_size+1, real_cap, reuse);
@@ -2982,10 +2981,10 @@ class basic_string
//And release old buffer
this->alloc().deallocate(long_addr, long_storage);
}
BOOST_CATCH(...){
BOOST_CONTAINER_CATCH(...){
return;
}
BOOST_CATCH_END
BOOST_CONTAINER_CATCH_END
}
template<class AllocVersion>
@@ -3015,20 +3014,20 @@ class basic_string
//Save initial position
FwdIt init = first;
BOOST_TRY{
BOOST_CONTAINER_TRY{
//Construct objects
for (; count--; ++first){
this->construct(first, val);
}
}
BOOST_CATCH(...){
BOOST_CONTAINER_CATCH(...){
//Call destructors
for (; init != first; ++init){
this->destroy(init);
}
BOOST_RETHROW
BOOST_CONTAINER_RETHROW
}
BOOST_CATCH_END
BOOST_CONTAINER_CATCH_END
}
template<class InpIt, class FwdIt> inline
@@ -3038,20 +3037,20 @@ class basic_string
FwdIt dest_init = dest;
size_type constructed = 0;
BOOST_TRY{
BOOST_CONTAINER_TRY{
//Try to build objects
for (; first != last; ++dest, ++first, ++constructed){
this->construct(dest, *first);
}
}
BOOST_CATCH(...){
BOOST_CONTAINER_CATCH(...){
//Call destructors
for (; constructed--; ++dest_init){
this->destroy(dest_init);
}
BOOST_RETHROW
BOOST_CONTAINER_RETHROW
}
BOOST_CATCH_END
BOOST_CONTAINER_CATCH_END
return (constructed);
}