######################### cmakepp_lang/asserts/type ######################### .. module:: cmakepp_lang/asserts/type .. function:: cpp_assert_type(type obj) Tests that the provided object can be implicitly cast to the provided type. If CMakePP is run in debug mode, this function will throw an error if the provided object is not implicitly convertible to the provided type. If CMakePP is not being run in debug mode, then this function is a no-op. :param type: The type that the type of the object must be implicitly convertible to. :type type: type :param obj: The object whose type must be implicitly convertible to ``type``. :type obj: str :var CMAKEPP_LANG_DEBUG_MODE: Used to determine if CMakePP is being run in debug mode :vartype CMAKEPP_LANG_DEBUG_MODE: bool Error Checking ============== In addition to asserting that the provided object's type is implicitly convertible to the provided type. This function will also ensure that the caller has only provided two arguments and that ``type`` is actually a type. These additional error checks are also only done when CMakePP is run in debug mode.