forked from boostorg/container
Fixes #188 ("Build fails when RTTI is disabled")
This commit is contained in:
1 parent
aa479c8eee
commit
aaa2485ebf
6 files changed
+16
-17
No files matched your search
@@ -166,7 +166,7 @@ void monotonic_buffer_resource::do_deallocate(void* p, std::size_t bytes, std::s
|
||||
{ (void)p; (void)bytes; (void)alignment; }
|
||||
|
||||
bool monotonic_buffer_resource::do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT
|
||||
{ return this == dynamic_cast<const monotonic_buffer_resource*>(&other); }
|
||||
{ return this == &other; }
|
||||
|
||||
} //namespace pmr {
|
||||
} //namespace container {
|
||||
|
||||
@@ -176,7 +176,7 @@ pool_resource::pool_resource(const pool_options& opts) BOOST_NOEXCEPT
|
||||
: m_options(opts), m_upstream(*get_default_resource()), m_oversized_list(), m_pool_data(), m_pool_count()
|
||||
{ this->priv_constructor_body(); }
|
||||
|
||||
pool_resource::~pool_resource() //virtual
|
||||
pool_resource::~pool_resource()
|
||||
{
|
||||
this->release();
|
||||
|
||||
@@ -203,7 +203,7 @@ memory_resource* pool_resource::upstream_resource() const
|
||||
pool_options pool_resource::options() const
|
||||
{ return m_options; }
|
||||
|
||||
void* pool_resource::do_allocate(std::size_t bytes, std::size_t alignment) //virtual
|
||||
void* pool_resource::do_allocate(std::size_t bytes, std::size_t alignment)
|
||||
{
|
||||
if(!m_pool_data){
|
||||
this->priv_init_pools();
|
||||
@@ -224,7 +224,7 @@ void* pool_resource::do_allocate(std::size_t bytes, std::size_t alignment) //vir
|
||||
}
|
||||
}
|
||||
|
||||
void pool_resource::do_deallocate(void* p, std::size_t bytes, std::size_t alignment) //virtual
|
||||
void pool_resource::do_deallocate(void* p, std::size_t bytes, std::size_t alignment)
|
||||
{
|
||||
(void)alignment; //alignment ignored here, max_align is used by pools
|
||||
if(bytes > m_options.largest_required_pool_block){
|
||||
@@ -237,10 +237,6 @@ void pool_resource::do_deallocate(void* p, std::size_t bytes, std::size_t alignm
|
||||
}
|
||||
}
|
||||
|
||||
bool pool_resource::do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT //virtual
|
||||
{ return this == dynamic_cast<const pool_resource*>(&other); }
|
||||
|
||||
|
||||
std::size_t pool_resource::pool_count() const
|
||||
{
|
||||
if(BOOST_LIKELY((0 != m_pool_data))){
|
||||
|
||||
@@ -87,7 +87,7 @@ void synchronized_pool_resource::do_deallocate(void* p, std::size_t bytes, std::
|
||||
}
|
||||
|
||||
bool synchronized_pool_resource::do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT //virtual
|
||||
{ return this == dynamic_cast<const synchronized_pool_resource*>(&other); }
|
||||
{ return this == &other; }
|
||||
|
||||
std::size_t synchronized_pool_resource::pool_count() const
|
||||
{ return m_pool_resource.pool_count(); }
|
||||
|
||||
@@ -55,7 +55,7 @@ void unsynchronized_pool_resource::do_deallocate(void* p, std::size_t bytes, std
|
||||
{ return m_resource.do_deallocate(p, bytes, alignment); }
|
||||
|
||||
bool unsynchronized_pool_resource::do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT //virtual
|
||||
{ return this == dynamic_cast<const unsynchronized_pool_resource*>(&other); }
|
||||
{ return this == &other; }
|
||||
|
||||
std::size_t unsynchronized_pool_resource::pool_count() const
|
||||
{ return m_resource.pool_count(); }
|
||||
|
||||
Reference in new issue
Block a user