mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-25 01:16:30 -05:00
17 lines
358 B
C++
17 lines
358 B
C++
|
|
#pragma once
|
||
|
|
|
||
|
|
template<typename T, typename U>
|
||
|
|
constexpr T sc(U&& value) {
|
||
|
|
return static_cast<T>(std::forward<U>(value));
|
||
|
|
}
|
||
|
|
|
||
|
|
template<typename T, typename U>
|
||
|
|
constexpr T dc(U&& value) {
|
||
|
|
return dynamic_cast<T>(std::forward<U>(value));
|
||
|
|
}
|
||
|
|
|
||
|
|
template<typename T, typename U>
|
||
|
|
constexpr T rc(U&& value) {
|
||
|
|
return reinterpret_cast<T>(std::forward<U>(value));
|
||
|
|
}
|