namespace
helpersThis namespace contains utility functionality like adapters between interfaces.
Typedefs
-
template<typename T_lhs, typename T_rhs, typename T_result>using enable_if_same_t = std::enable_if_t<std::is_same<T_lhs, T_rhs>::value, T_result>
Functions
-
template<typename T>auto type_to_typedesc() -> enable_
if_ same_ t<T, double, OIIO::TypeDesc> constexpr -
template<typename T>auto type_to_typedesc() -> enable_
if_ same_ t<T, float, OIIO::TypeDesc> constexpr -
template<typename T>auto type_to_typedesc() -> enable_
if_ same_ t<T, uint32_t, OIIO::TypeDesc> constexpr -
template<typename T>auto type_to_typedesc() -> enable_
if_ same_ t<T, uint16_t, OIIO::TypeDesc> constexpr -
template<typename T>auto type_to_typedesc() -> enable_
if_ same_ t<T, uint8_t, OIIO::TypeDesc> constexpr
Typedef documentation
template<typename T_lhs, typename T_rhs, typename T_result>
using spice:: helpers:: enable_if_same_t = std::enable_if_t<std::is_same<T_lhs, T_rhs>::value, T_result>
Wraps std::enable_if_t
in such a way that the template is enabled when the first two template arguments are equal as determined by std::is_same
. When enabled, this type becomes equivalent to the third argument T_result
.
Function documentation
template<typename T>
enable_ if_ same_ t<T, double, OIIO::TypeDesc> spice:: helpers:: type_to_typedesc() constexpr
Converts a C++ double to OIIO::TypeDesc::DOUBLE.
template<typename T>
enable_ if_ same_ t<T, float, OIIO::TypeDesc> spice:: helpers:: type_to_typedesc() constexpr
Converts a C++ float to OIIO::TypeDesc::FLOAT.
template<typename T>
enable_ if_ same_ t<T, uint32_t, OIIO::TypeDesc> spice:: helpers:: type_to_typedesc() constexpr
Converts a C++ uint32_t to OIIO::TypeDesc::UINT.
template<typename T>
enable_ if_ same_ t<T, uint16_t, OIIO::TypeDesc> spice:: helpers:: type_to_typedesc() constexpr
Converts a C++ uint16_t to OIIO::TypeDesc::UINT16.
template<typename T>
enable_ if_ same_ t<T, uint8_t, OIIO::TypeDesc> spice:: helpers:: type_to_typedesc() constexpr
Converts a C++ uint8_t to OIIO::TypeDesc::UINT8.