Skip to content
Snippets Groups Projects
Commit 176da6e7 authored by Jeremie Deray's avatar Jeremie Deray
Browse files

add make_unique.h

parent 6382cffa
No related branches found
No related tags found
No related merge requests found
/**
* \file make_unique.h
*
* Created on: Oct 11, 2017
* \author: Jeremie Deray
*/
#ifndef _WOLF_MAKE_UNIQUE_H_
#define _WOLF_MAKE_UNIQUE_H_
#include <memory>
namespace wolf {
/// @note this appears only in cpp14
template <typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
}
#endif /* _WOLF_MAKE_UNIQUE_H_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment