roar
Loading...
Searching...
No Matches
shared_from_base.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
5namespace Roar::Detail
6{
7 template <class Base, class Derived>
8 struct SharedFromBase : public Base
9 {
10 using Base::Base;
11
12 std::shared_ptr<Derived> shared_from_this()
13 {
14 return std::static_pointer_cast<Derived>(Base::shared_from_this());
15 };
16 };
17}
Definition range_file_body.hpp:18
Definition shared_from_base.hpp:9
std::shared_ptr< Derived > shared_from_this()
Definition shared_from_base.hpp:12