Elements 6.1.2
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
Memory.h
Go to the documentation of this file.
1
34#ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_MEMORY_H_
35#define ELEMENTSKERNEL_ELEMENTSKERNEL_MEMORY_H_
36
37#include <memory> // for unique_ptr, make_unique
38
39#include "ElementsKernel/Export.h" // ELEMENTS_API
40
41namespace Elements {
42inline namespace Kernel {
43
44#ifndef __cpp_lib_make_unique
54template <typename T, typename... Args>
56 return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
57}
58#else
59using std::make_unique;
60#endif
61
62} // namespace Kernel
63} // namespace Elements
64
65#endif // ELEMENTSKERNEL_ELEMENTSKERNEL_MEMORY_H_
66
defines the macros to be used for explicit export of the symbols
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74
ELEMENTS_API std::unique_ptr< T > make_unique(Args &&... args)
Constructs an object of type T and wraps it in a std::unique_ptr using args as the parameter list for...
Definition: Memory.h:55