Skip to content

A8-4-7: Exclude user defined operators from this rule #397

Closed
@lcartey

Description

@lcartey

Affected rules

  • A8-4-7

Description

User defined operators are expected to conform to a particular prototype, and should not be flagged by this rule.

We should also consider whether there are any other examples of fixed prototype functions that might be erroneously reported by theis rule.

Example

class some_base_class {
 public:
  constexpr some_base_class() noexcept = default;
  constexpr std::size_t size() const noexcept { return 0; }

 protected:
...
  some_base_class& operator=(const some_base_class&) = default; // error here
};

Metadata

Metadata

Assignees

Labels

Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding Standards

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions