convertible_to_weak_ref
A convertible_to_weak_ref
is anything that can be converted to a weak_ref
; this includes:
- a
weak_ref
- a
strong_ref
T*
ifT
extendsstd::enable_shared_from_this<T>
Example
#include <FredEmmott/weak_refs.hpp>
using namespace FredEmmott::weak_refs;
static_assert(convertible_to_weak_ref<std::shared_ptr<int>>);
static_assert(convertible_to_weak_ref<std::weak_ptr<int>>);
static_assert(!convertible_to_weak_ref<int*>);