diff --git a/Src/Utils/make_unique.hpp b/Src/Utils/make_unique.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f2dce792cb14615fbb200c3da2983c59a49138c9 --- /dev/null +++ b/Src/Utils/make_unique.hpp @@ -0,0 +1,17 @@ +#if __cplusplus < 201402L + +#ifndef _SCALFMM_MAKE_UNIQUE_HPP_ +#define _SCALFMM_MAKE_UNIQUE_HPP_ + +#include <utility> +#include <memory> + +namespace std { + template<class T, class... Args> + std::unique_ptr<T> make_unique(Args&&... args) { + return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); + } +} + +#endif +#endif