summaryrefslogtreecommitdiff
path: root/src/make_unique.hh
blob: c5a1bbc4d1d508c6b20c83c635fe78752dc90d73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef MAKE_UNIQUE_HH
#define MAKE_UNIQUE_HH

#include <memory>

namespace std {

template<typename T, typename... Args>
inline std::unique_ptr<T> make_unique(Args&&... args) {
  return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}

}  // namespace std

#endif  // MAKE_UNIQUE_HH