Template Struct half_caster

Struct Documentation

template<typename T, typename U, std::float_round_style R = (std::float_round_style)(HALF_ROUND_STYLE)>
struct half_caster

Helper class for half casts. This class template has to be specialized for all valid cast arguments to define an appropriate static cast member function and a corresponding type member denoting its return type.

Template Parameters:
  • T – destination type

  • U – source type

  • R – rounding mode to use