forked from boostorg/smart_ptr
Add overloads to support fixed size arrays, T[N], to allocate_shared (variadic) and make_shared (variadic) and make_shared_noinit.
[SVN r81265]
This commit is contained in:
+20
-3
@@ -28,21 +28,38 @@
|
||||
<h2><a name="Synopsis">Synopsis</a></h2>
|
||||
<pre>namespace boost {
|
||||
template<typename T>
|
||||
shared_ptr<T> <a href="#functions">make_shared</a>(size_t size);
|
||||
shared_ptr<T[]> <a href="#functions">make_shared</a>(size_t size);
|
||||
|
||||
template<typename T, typename A>
|
||||
shared_ptr<T> <a href="#functions">allocate_shared</a>(const A& allocator, size_t size);
|
||||
shared_ptr<T[]> <a href="#functions">allocate_shared</a>(const A& allocator, size_t size);
|
||||
|
||||
#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
|
||||
template<typename T, typename... Args>
|
||||
shared_ptr<T> <a href="#functions">make_shared</a>(size_t size, Args&&... args);
|
||||
shared_ptr<T[]> <a href="#functions">make_shared</a>(size_t size, Args&&... args);
|
||||
|
||||
template<typename T, typename... Args>
|
||||
shared_ptr<T[N]> <a href="#functions">make_shared</a>(Args&&... args);
|
||||
|
||||
template<typename T, typename A, typename... Args>
|
||||
shared_ptr<T> <a href="#functions">allocate_shared</a>(const A& allocator, size_t size, Args&&... args);
|
||||
|
||||
template<typename T, typename A, typename... Args>
|
||||
shared_ptr<T[N]> <a href="#functions">allocate_shared</a>(const A& allocator, Args&&... args);
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
template<typename T, typename... Args>
|
||||
shared_ptr<T[]> <a href="#functions">make_shared</a>(std::initializer_list<T> list);
|
||||
|
||||
template<typename T, typename A, typename... Args>
|
||||
shared_ptr<T[]> <a href="#functions">allocate_shared</a>(const A& allocator, std::initializer_list<T> list);
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
shared_ptr<T> <a href="#functions">make_shared_noinit</a>(size_t size);
|
||||
|
||||
template<typename T>
|
||||
shared_ptr<T[N]> <a href="#functions">make_shared_noinit</a>();
|
||||
}</pre>
|
||||
<h2><a name="functions">Free Functions</a></h2>
|
||||
<pre>template<typename T, typename... Args>
|
||||
|
||||
Reference in New Issue
Block a user