|
- #pragma once
-
- namespace cppcore
- {
-
- /**
- * @brief Convert one type to another type.
- *
- * This method will try to convert the given value to the given type.
- * If a convertion between the two types is unknown, a compiler error is raised.
- * If the value to convert does not fullfill the conversion requirements (like range checks)
- * the program will panic (call to std::abort) or throw an convert_exception (if configured).
- *
- * @tparam T_to Type to convert to.
- * @tparam T_from Type to convert from.
- *
- * @param[in] p_value Value to convert.
- * @return Converted value.
- */
- template<typename T_to, typename T_from>
- constexpr T_to convert_cast(T_from p_value);
-
- }
-
- #include "convert_cast.inl"
|