def is_integral( type ): """returns True, if type represents C++ integral type, False otherwise""" integral_def = create_cv_types( cpptypes.char_t() ) \ + create_cv_types( cpptypes.unsigned_char_t() ) \ + create_cv_types( cpptypes.signed_char_t() ) \ + create_cv_types( cpptypes.wchar_t() ) \ + create_cv_types( cpptypes.short_int_t() ) \ + create_cv_types( cpptypes.short_unsigned_int_t() ) \ + create_cv_types( cpptypes.bool_t() ) \ + create_cv_types( cpptypes.int_t() ) \ + create_cv_types( cpptypes.unsigned_int_t() ) \ + create_cv_types( cpptypes.long_int_t() ) \ + create_cv_types( cpptypes.long_unsigned_int_t() ) \ + create_cv_types( cpptypes.long_long_int_t() ) \ + create_cv_types( cpptypes.long_long_unsigned_int_t() ) return remove_alias( type ) in integral_def
def is_integral(type): """returns True, if type represents C++ integral type, False otherwise""" integral_def = create_cv_types( cpptypes.char_t() ) \ + create_cv_types( cpptypes.unsigned_char_t() ) \ + create_cv_types( cpptypes.signed_char_t() ) \ + create_cv_types( cpptypes.wchar_t() ) \ + create_cv_types( cpptypes.short_int_t() ) \ + create_cv_types( cpptypes.short_unsigned_int_t() ) \ + create_cv_types( cpptypes.bool_t() ) \ + create_cv_types( cpptypes.int_t() ) \ + create_cv_types( cpptypes.unsigned_int_t() ) \ + create_cv_types( cpptypes.long_int_t() ) \ + create_cv_types( cpptypes.long_unsigned_int_t() ) \ + create_cv_types( cpptypes.long_long_int_t() ) \ + create_cv_types( cpptypes.long_long_unsigned_int_t() ) return remove_alias(type) in integral_def
def is_bool( type_ ): """returns True, if type represents `bool`, False otherwise""" return remove_alias( type_ ) in create_cv_types( cpptypes.bool_t() )