Skip to content
Snippets Groups Projects
Commit 203ee514 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Removed custom implementation of std::make_unique which is available in STL since C++14

parent 826332e4
No related branches found
No related tags found
1 merge request!42Refactoring for execution policies
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <memory> #include <memory>
#include "make_unique.h"
#include <TNL/Assert.h> #include <TNL/Assert.h>
#include <TNL/String.h> #include <TNL/String.h>
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <vector> #include <vector>
#include <memory> #include <memory>
#include "make_unique.h"
#include <TNL/param-types.h> #include <TNL/param-types.h>
//#include <TNL/Debugging/StackBacktrace.h> //#include <TNL/Debugging/StackBacktrace.h>
......
#pragma once
// std::make_unique does not exist until C++14
// https://stackoverflow.com/a/9657991
#if __cplusplus < 201402L
#include <memory>
namespace std {
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
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