Version: SMASH-1.5
cxx14compat.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2014-2018
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_CXX14COMPAT_H_
11 #define SRC_INCLUDE_CXX14COMPAT_H_
12 
13 #include <memory>
14 #include <utility>
15 
16 namespace smash {
17 
24 template <typename T, typename... Args>
25 inline std::unique_ptr<T> make_unique(Args &&... args) {
26  return std::unique_ptr<T>{new T{std::forward<Args>(args)...}};
27 }
28 
29 } // namespace smash
30 
31 #endif // SRC_INCLUDE_CXX14COMPAT_H_
std::unique_ptr< T > make_unique(Args &&... args)
Definition for make_unique Is in C++14&#39;s standard library; necessary for older compilers.
Definition: cxx14compat.h:25
Definition: action.h:24