PeriDyno 1.2.1
Loading...
Searching...
No Matches
Export.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <functional>
4#include <memory>
5#include <utility>
6
7namespace detail {
8#if (!defined(_MSC_VER) && (__cplusplus < 201300)) || \
9 ( defined(_MSC_VER) && (_MSC_VER < 1800))
10 //_MSC_VER == 1800 is Visual Studio 2013, which is already somewhat C++14 compilant,
11 // and it has make_unique in it's standard library implementation
12 template<typename T, typename... Args>
13 std::unique_ptr<T> make_unique(Args&&... args)
14 {
15 return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
16 }
17#else
18 template<typename T, typename... Args>
19 std::unique_ptr<T> make_unique(Args&&... args)
20 {
21 return std::make_unique<T>(std::forward<Args>(args)...);
22 }
23#endif
24}
#define T(t)
detail namespace with internal helper functions
Definition Export.hpp:7
std::unique_ptr< T > make_unique(Args &&... args)
Definition Export.hpp:13