Radium Engine  1.5.20
Loading...
Searching...
No Matches
MakeShared.hpp
1#pragma once
2
3#include <memory>
4
5namespace Ra {
6namespace Core {
7
16template <typename T, class... Args>
17inline std::shared_ptr<T> make_shared( Args&&... args ) {
18#if 0 // use std::make_shared
19
20 return std::make_shared<T>(args...);
21
22#else // use new and shared_ptr constructor.
23
24 return std::shared_ptr<T>( new T( std::forward<Args>( args )... ) );
25
26#endif
27}
28} // namespace Core
29} // namespace Ra
T forward(T... args)
T make_shared(T... args)
std::shared_ptr< T > make_shared(Args &&... args)
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3