def is_std_ostream(type_):
    """
    Returns True, if type represents C++ std::ostream, False otherwise.

    """

    if utils.is_str(type_):
        return type_ in ostream_equivalences

    type_ = remove_alias(type_)
    type_ = remove_reference(type_)
    type_ = remove_cv(type_)
    return type_.decl_string in ostream_equivalences