Skip to content

A0-1-6: Alias template is considered unused even when a specialization is used. #36

Closed
@lcartey

Description

@lcartey

Affected rules

  • A0-1-6

Description

Alias templates (i.e. type aliases which are templated) are always identified as unused type declarations under A0-1-6.

Example

template <class T> class Y {}; // COMPLIANT - used in test case below

// Alias template
template <typename T> using Z = Y<T>; // COMPLIANT - used below

void test_alias_template() {
  Z<int> v;
}

Metadata

Metadata

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