public interface ICPPASTStructuredBindingDeclaration extends IASTSimpleDeclaration, IASTNameOwner, IASTImplicitNameOwner
Examples:
auto [x, y]{coordinate};auto & [x, y](coordinate);auto && [x, y] = createCoordinte();IASTNode.CopyStyle| Modifier and Type | Field and Description |
|---|---|
static ASTNodeProperty |
IDENTIFIER
IDENTIFIER represents the relationship between an
ICPPASTStructuredBindingDeclaration and its
IASTNames. |
static ASTNodeProperty |
INITIALIZER
INITIALIZER represents the relationship between an
ICPPASTStructuredBindingDeclaration and its IASTInitializer. |
DECL_SPECIFIER, DECLARATOREMPTY_DECLARATION_ARRAYATTRIBUTE, ATTRIBUTE_SPECIFIEREMPTY_NODE_ARRAYr_declaration, r_definition, r_reference, r_unclearIMPLICIT_NAME| Modifier and Type | Method and Description |
|---|---|
IASTInitializer |
getInitializer()
Returns the initializer of the structured binding declaration.
|
IASTName[] |
getNames()
Returns the list of names declared by this structured binding declaration.
|
ICPPASTFunctionDeclarator.RefQualifier |
getRefQualifier()
Returns the
RefQualifier of the structured binding. |
addDeclarator, copy, copy, getDeclarators, getDeclSpecifier, setDeclSpecifieraddAttribute, addAttributeSpecifier, getAttributes, getAttributeSpecifiersaccept, contains, getChildren, getContainingFilename, getFileLocation, getLeadingSyntax, getNodeLocations, getOriginalNode, getParent, getPropertyInParent, getRawSignature, getSyntax, getTrailingSyntax, getTranslationUnit, isActive, isFrozen, isPartOfTranslationUnitFile, setParent, setPropertyInParentgetRoleForNamegetImplicitNamesstatic final ASTNodeProperty IDENTIFIER
IDENTIFIER represents the relationship between an
ICPPASTStructuredBindingDeclaration and its
IASTNames.static final ASTNodeProperty INITIALIZER
INITIALIZER represents the relationship between an
ICPPASTStructuredBindingDeclaration and its IASTInitializer.ICPPASTFunctionDeclarator.RefQualifier getRefQualifier()
RefQualifier of the structured binding. For either lvalue or
rvalue reference qualifiers.
Examples:
auto [x, y] = coordinate; it returns the empty Optionalauto & [x, y] = coordinate; it returns Optional.of(RefQualifier.LVALUE)auto && [x, y] = createCoordinte(); it returns Optional.of(RefQualifier.RVALUE)RefQualifier of the C++ declaration or null if there is no reference qualifier.
if the structured binding does not have a reference qualifier.ICPPASTFunctionDeclarator.RefQualifierIASTName[] getNames()
Example: For auto & [x, y] = coordinate; it returns the names x and y.
IASTName[]IASTNameIASTInitializer getInitializer()
auto [x, y]{coordinate}; it returns an ICPPASTInitializerListauto & [x, y](coordinate); it returns an ICPPASTConstructorInitializerauto && [x, y] = createCoordinte(); it returns an IASTEqualsInitializerIASTInitializer of this structured binding. It can be null if the C++ declaration is lacking an initializer.IASTInitializer,
ICPPASTInitializerList,
ICPPASTConstructorInitializer,
IASTEqualsInitializerCopyright (c) IBM Corp. and others 2004, 2019. All Rights Reserved.