10#ifndef INCLUDED_O3TL_MAKE_SHARED_HXX
11#define INCLUDED_O3TL_MAKE_SHARED_HXX
25 static_assert(std::is_arithmetic<T>::value,
"only arrays of arithmetic types allowed");
26 return std::shared_ptr<T>(
new T[
size], std::default_delete<T[]>());
33template <
class T,
class... Args> std::shared_ptr<T>
make_shared(Args&&... args)
35#if defined(__COVERITY__)
38 return std::make_shared<T>(std::forward<Args>(
args)...);
std::shared_ptr< T > make_shared(Args &&... args)
To markup std::shared_ptr that coverity warns might throw exceptions which won't throw in practice,...
std::shared_ptr< T > make_shared_array(size_t const size)
Allocate an array stored in a shared_ptr, calling operator delete[].
To markup std::unique_ptr that coverity warns might throw exceptions which won't throw in practice,...