def is_copy_constructor(constructor):
assert isinstance(constructor, calldef_members.constructor_t)<EOL>args = constructor.arguments<EOL>parent = constructor.parent<EOL>if len(args) != <NUM_LIT:1>:<EOL><INDENT>return False<EOL><DEDENT>arg = args[<NUM_LIT:0>]<EOL>if not isinstance(arg.decl_type, cpptypes.compound_t):<EOL><INDENT>return False<EOL><DEDENT>if not type_traits.is_reference(arg.decl_type):<EOL><INDENT>return False<EOL><DEDENT>if not type_traits.is_const(arg.decl_type.base):<EOL><INDENT>return False<EOL><DEDENT>un_aliased = type_traits.remove_alias(arg.decl_type.base)<EOL>if not isinstance(un_aliased.base, cpptypes.declarated_t):<EOL><INDENT>return False<EOL><DEDENT>return id(un_aliased.base.declaration) == id(parent)<EOL>
Check if the declaration is a copy constructor,

Args:
    constructor (declarations.constructor_t): the constructor
        to be checked.

Returns:
    bool: True if this is a copy constructor, False instead.