def is_noncopyable(class_, already_visited_cls_vars=None):
logger = utils.loggers.cxx_parser<EOL>class_decl = class_traits.get_declaration(class_)<EOL>true_header = "<STR_LIT>" % class_.decl_string<EOL>if is_union(class_):<EOL><INDENT>return False<EOL><DEDENT>if class_decl.is_abstract:<EOL><INDENT>logger.debug(true_header + "<STR_LIT>")<EOL>return True<EOL><DEDENT>copy_ = find_copy_constructor(class_decl)<EOL>if copy_ and copy_.access_type == '<STR_LIT>' and not copy_.is_artificial:<EOL><INDENT>return False<EOL><DEDENT>if already_visited_cls_vars is None:<EOL><INDENT>already_visited_cls_vars = []<EOL><DEDENT>for base_desc in class_decl.recursive_bases:<EOL><INDENT>assert isinstance(base_desc, class_declaration.hierarchy_info_t)<EOL>if base_desc.related_class.decl_string in('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>logger.debug(true_header + "<STR_LIT>")<EOL>return True<EOL><DEDENT>if not has_copy_constructor(base_desc.related_class):<EOL><INDENT>base_copy_ = find_copy_constructor(base_desc.related_class)<EOL>if base_copy_ and base_copy_.access_type == '<STR_LIT>':<EOL><INDENT>logger.debug(<EOL>true_header +<EOL>"<STR_LIT>")<EOL>return True<EOL><DEDENT>elif __is_noncopyable_single(<EOL>base_desc.related_class, already_visited_cls_vars):<EOL><INDENT>logger.debug(<EOL>true_header +<EOL>"<STR_LIT>")<EOL>return True<EOL><DEDENT><DEDENT>if __is_noncopyable_single(<EOL>base_desc.related_class, already_visited_cls_vars):<EOL><INDENT>logger.debug(<EOL>true_header +<EOL>"<STR_LIT>")<EOL>return True<EOL><DEDENT><DEDENT>if not has_copy_constructor(class_decl):<EOL><INDENT>logger.debug(true_header + "<STR_LIT>")<EOL>return True<EOL><DEDENT>elif not has_public_constructor(class_decl):<EOL><INDENT>logger.debug(true_header + "<STR_LIT>")<EOL>return True<EOL><DEDENT>elif has_destructor(class_decl) and not has_public_destructor(class_decl):<EOL><INDENT>logger.debug(true_header + "<STR_LIT>")<EOL>return True<EOL><DEDENT>return __is_noncopyable_single(class_decl, already_visited_cls_vars)<EOL>
Checks if class is non copyable

Args:
    class_ (declarations.class_t): the class to be checked
    already_visited_cls_vars (list): optional list of vars that should not
        be checked a second time, to prevent infinite recursions.
        In general you can ignore this argument, it is mainly used during
        recursive calls of is_noncopyable() done by pygccxml.

Returns:
    bool: if the class is non copyable