#include <type_traits>
#include <cassert>
Go to the source code of this file.
|
template<typename TO , typename FROM > |
constexpr TO | checked_cast (FROM *from) |
| Based on checked_cast implementation from the book: C++ Coding Standard item 93: Avoid using static_cast on pointers.
|
|
template<typename TO , typename FROM > |
constexpr TO | checked_cast (FROM &from) |
|
◆ checked_cast() [1/2]
template<typename TO , typename FROM >
constexpr TO checked_cast |
( |
FROM & |
from | ) |
|
|
constexpr |
◆ checked_cast() [2/2]
template<typename TO , typename FROM >
constexpr TO checked_cast |
( |
FROM * |
from | ) |
|
|
constexpr |
Based on checked_cast implementation from the book: C++ Coding Standard item 93: Avoid using static_cast on pointers.
Definition at line 14 of file checked_cast.hh.