Skip to content

RULE-10-0-1: Structured bindings should not be reported as violations #1172

Open

Description

@MichaelRFairhurst

Affected rules

  • RULE-10-0-1
  • M8-0-1

Description

The examples for rule 10-0-1 specifically say that structured bindings are not a violation.

We can detect these with Variable.isStructuredBinding.

Example

void example_function(std::pair<int, long> p) {
  auto [i, l] = p; // COMPLIANT[False positive]
}

Activity

  1. added
    false positive/false negative
    on Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stardard-MISRA-C++false positive/false negative

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions