diff options
Diffstat (limited to 'src/common/utils2.hpp')
-rw-r--r-- | src/common/utils2.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/utils2.hpp b/src/common/utils2.hpp index 119cc13..978ae54 100644 --- a/src/common/utils2.hpp +++ b/src/common/utils2.hpp @@ -277,4 +277,11 @@ T base_cast(U&& u) return std::forward<U>(u); } +// use this when e.g. U is an int of unknown size +template<class T, class U> +T maybe_cast(U u) +{ + return u; +} + #endif // UTILS2_HPP |