introduced make_object function to create object_ptr instances and removed some session::insert overloads for simplicity
This commit is contained in:
@@ -59,6 +59,11 @@ struct is_object_ptr : std::false_type {
|
||||
template<typename Type>
|
||||
struct is_object_ptr<object_ptr<Type> > : std::true_type {
|
||||
};
|
||||
|
||||
template<class Type, typename... Args>
|
||||
object_ptr<Type> make_object(Args &&... args) {
|
||||
return object_ptr<Type>(std::make_shared<Type>(std::forward<Args>(args)...));
|
||||
}
|
||||
}
|
||||
|
||||
#endif //OBJECT_PTR_HPP
|
||||
|
||||
Reference in New Issue
Block a user