Radium Engine
1.5.20
Loading...
Searching...
No Matches
MakeShared.hpp
1
#pragma once
2
3
#include <memory>
4
5
namespace
Ra
{
6
namespace
Core {
7
16
template
<
typename
T,
class
... Args>
17
inline
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
std::forward
T forward(T... args)
std::make_shared
T make_shared(T... args)
Ra::Core::make_shared
std::shared_ptr< T > make_shared(Args &&... args)
Definition
MakeShared.hpp:17
Ra
hepler function to manage enum as underlying types in VariableSet
Definition
Cage.cpp:3
std::shared_ptr
src
Core
Containers
MakeShared.hpp
Generated by
1.12.0