Use to_address free function instead of pointer_traits member
This commit is contained in:
parent
8562c08e14
commit
29e4266923
@ -106,7 +106,7 @@ public:
|
||||
std::size_t n = s + min_align - 1;
|
||||
char_alloc a(base());
|
||||
char_ptr p = a.allocate(sizeof p + n);
|
||||
void* r = boost::pointer_traits<char_ptr>::to_address(p) + sizeof p;
|
||||
void* r = boost::to_address(p) + sizeof p;
|
||||
(void)align(min_align, s, r, n);
|
||||
::new(static_cast<void*>(static_cast<char_ptr*>(r) - 1)) char_ptr(p);
|
||||
return static_cast<pointer>(r);
|
||||
@ -125,7 +125,7 @@ public:
|
||||
#else
|
||||
char_ptr p = a.allocate(sizeof p + n, h);
|
||||
#endif
|
||||
void* r = boost::pointer_traits<char_ptr>::to_address(p) + sizeof p;
|
||||
void* r = boost::to_address(p) + sizeof p;
|
||||
(void)align(min_align, s, r, n);
|
||||
::new(static_cast<void*>(static_cast<char_ptr*>(r) - 1)) char_ptr(p);
|
||||
return static_cast<pointer>(r);
|
||||
|
Loading…
Reference in New Issue
Block a user