Skip to content

AstAttributeMechanism::operator=

Assignment operator.

Synopsis

Declared in <src/midend/astProcessing/AstAttributeMechanism.h>

AstAttributeMechanism&
operator=(AstAttributeMechanism const& other);

Description

Assigning one attribute container to another will cause the destination container's attributes to be erased and deleted, and the source container's attributes to be copied. The assignment operator is exception safe: it will either successfully copy and assign all attributes or not assign any attributes. However, if an attribute uses anything other than the AstAttribute::CONTAINER_OWNERSHIP ownership policy then it is up to the attribute type's designer to handle deletion of attributes that were copied before the exception occurred.

Return Value

Reference to the current object

Parameters

Name Description
other The object to copy assign from

Created with MrDocs