/* * Copyright (c) 2021 Cisco and/or its affiliates. */ #pragma once #include namespace utils { template inline std::shared_ptr shared_from_base( std::enable_shared_from_this* base) { return base->shared_from_this(); } template inline std::shared_ptr shared_from_base( std::enable_shared_from_this const* base) { return base->shared_from_this(); } template inline std::shared_ptr shared_from(That* that) { return std::static_pointer_cast(shared_from_base(that)); } } // namespace utils