|
libbio
|
#include <Pointer.h>
Static Public Attributes | |
| static const bool | sValue = (sizeof(Test(MakeFrom())) == sizeof(Yes)) |
IsPointerConvertible< FROM, TO >::sValue is true iff a FROM* is IMPLICITLY convertible to a TO* — i.e. exactly when the bare pointers would convert (Derived* -> Base*, T* -> const T*, T* -> void*).
Implemented with the classic two-overload sizeof SFINAE idiom so it behaves identically under C++98 and C++20 (std::is_convertible does not exist on cpp98, and type::IsBaseOf is hard-wired to false on cpp98, so neither is usable as the gate for the converting constructor).
The Test(FROM*) overload is viable only when the implicit FROM* -> TO* conversion exists; otherwise the ellipsis overload wins.
| FROM | the source pointee type. |
| TO | the destination pointee type. |
|
static |