Skip to content

A15-4-4: Ignore results on uninstantiated templates #415

Closed
@lcartey

Description

@lcartey

Affected rules

  • A15-4-4

Description

If the noexcept specification of a template function is conditional on the template, then the uninstantiated template may be erroneously reported as the noexcept specification on the uninstantiated template will be considered as not true.

Example

#include <utility>
template <typename TypeA, typename TypeB>
void swap_wrapper(TypeA lhs,
                  TypeB rhs) noexcept(noexcept(std::swap(*lhs, *rhs))) {
  std::swap(*lhs, *rhs);
}

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