codeql-coding-standards icon indicating copy to clipboard operation
codeql-coding-standards copied to clipboard

`A2-7-3`: Friend functions in template classes do not recognise documentation

Open lcartey opened this issue 8 months ago • 0 comments

Affected rules

  • A2-7-3

Description

Friend functions in template classes do not detect documentation.

Example

template <typename T> class ClassG {
  private:
    int x;
  public:
  // Documentation
  friend int foo(ClassG<T> g) {
    return g.x;
  }
};

void test() {
  ClassG<int> g;
  foo(g);
}

lcartey avatar Jun 03 '24 09:06 lcartey