Fix get_deleter in allocate_shared_array.hpp

This commit is contained in:
Peter Dimov
2017-06-20 19:33:39 +03:00
parent 9fe6885078
commit 028bb2cee8

View File

@@ -762,8 +762,8 @@ public:
allocator.deallocate(this, 1);
}
void* get_deleter(const sp_typeinfo&) {
return &reinterpret_cast<char&>(deleter_);
void* get_deleter(const sp_typeinfo& ti) {
return ti == BOOST_SP_TYPEID(deleter_type)? &reinterpret_cast<char&>(deleter_): 0;
}
void* get_untyped_deleter() {
@@ -803,8 +803,8 @@ public:
allocator.deallocate(this, 1);
}
void* get_deleter(const sp_typeinfo&) {
return &reinterpret_cast<char&>(deleter_);
void* get_deleter(const sp_typeinfo& ti) {
return ti == BOOST_SP_TYPEID(deleter_type)? &reinterpret_cast<char&>(deleter_): 0;
}
void* get_untyped_deleter() {
@@ -849,8 +849,8 @@ public:
allocator.deallocate(this, 1);
}
void* get_deleter(const sp_typeinfo&) {
return &reinterpret_cast<char&>(deleter_);
void* get_deleter(const sp_typeinfo& ti) {
return ti == BOOST_SP_TYPEID(deleter_type)? &reinterpret_cast<char&>(deleter_): 0;
}
void* get_untyped_deleter() {
@@ -894,8 +894,8 @@ public:
allocator.deallocate(this, 1);
}
void* get_deleter(const sp_typeinfo&) {
return &reinterpret_cast<char&>(deleter_);
void* get_deleter(const sp_typeinfo& ti) {
return ti == BOOST_SP_TYPEID(deleter_type)? &reinterpret_cast<char&>(deleter_): 0;
}
void* get_untyped_deleter() {