Utility Rack
Loading...
Searching...
No Matches
include
utility
cast_ptr_to.hpp
Go to the documentation of this file.
1
29
#ifndef CAST_PTR_TO_HPP_INCLUDED
30
#define CAST_PTR_TO_HPP_INCLUDED
31
32
namespace
chops {
33
34
template
<
typename
Dst,
typename
Src>
35
const
Dst* cast_ptr_to (
const
Src* p)
noexcept
{
36
return
static_cast<
const
Dst*
>
(
static_cast<
const
void
*
>
(p));
37
}
38
39
template
<
typename
Dst,
typename
Src>
40
Dst* cast_ptr_to (Src* p)
noexcept
{
41
return
static_cast<
Dst*
>
(
static_cast<
void
*
>
(p));
42
}
43
44
}
// end namespace
45
46
#endif
47
Generated by
1.12.0