23 struct MakeUniqueResult {
24 using scalar = std::unique_ptr<T>;
27 struct MakeUniqueResult<T[]> {
28 using array = std::unique_ptr<T[]>;
30 template <
typename T,
size_t N>
31 struct MakeUniqueResult<T[N]> {
38 template <
typename T,
typename... Args>
39 typename MakeUniqueResult<T>::scalar make_unique(Args &&... args) {
40 return std::unique_ptr<T>(
41 new T(std::forward<Args>(args)...));
48 typename MakeUniqueResult<T>::array make_unique(
size_t n) {
49 return std::unique_ptr<T>(
new typename std::remove_extent<T>::type[n]());
53 template <
typename T,
typename... Args>
54 typename MakeUniqueResult<T>::invalid make_unique(Args &&... ) =
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16