mirror of
https://github.com/boostorg/core.git
synced 2025-11-29 13:50:10 +01:00
Update test and documentation
This commit is contained in:
@@ -47,15 +47,14 @@ struct creator {
|
||||
::operator delete(ptr);
|
||||
}
|
||||
|
||||
template<class U, class V>
|
||||
void construct(U* ptr, const V& value) {
|
||||
::new(static_cast<void*>(ptr)) U(value + 1);
|
||||
template<class V>
|
||||
void construct(type* ptr, const V& value) {
|
||||
::new(static_cast<void*>(ptr)) type(value + 1);
|
||||
++type::count;
|
||||
}
|
||||
|
||||
template<class U>
|
||||
void destroy(U* ptr) {
|
||||
ptr->~U();
|
||||
void destroy(type* ptr) {
|
||||
ptr->~type();
|
||||
--type::count;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user