mirror of
https://github.com/boostorg/core.git
synced 2025-07-30 04:47:24 +02:00
Correct example in documentation
This commit is contained in:
@ -6,7 +6,7 @@ Distributed under the Boost Software License, Version 1.0.
|
|||||||
(http://www.boost.org/LICENSE_1_0.txt)
|
(http://www.boost.org/LICENSE_1_0.txt)
|
||||||
]
|
]
|
||||||
|
|
||||||
[section:alloc_construct alloc_construct]
|
[section:alloc_construct alloc_construct, alloc_destroy]
|
||||||
|
|
||||||
[simplesect Authors]
|
[simplesect Authors]
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ auto create(A& a, std::size_t n)
|
|||||||
try {
|
try {
|
||||||
boost::alloc_construct_n(a, boost::to_address(p), n);
|
boost::alloc_construct_n(a, boost::to_address(p), n);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
a.deallocate(n);
|
a.deallocate(p, n);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
return p;
|
return p;
|
||||||
|
Reference in New Issue
Block a user