[PPL-devel] Doxygen bug report: namespaces and friends

Roberto Bagnara bagnara at cs.unipr.it
Thu Nov 1 16:20:38 CET 2001


The attached files exemplify a bug in Doxygen 1.2.11 whereby
Doxygen seems unable to match a friend function with its
documentation in the presence of namespaces.
Here is bug3.cc (certified standard conformant C++ code):

namespace N {
  class A;
  void bar(A& a);
};

//! Documenting class A.
class N::A {
private:
  int i;

public:
  void foo();
  friend void N::bar(A& a);
};

/*!
  Documentation for foo.
*/
void N::A::foo() {
}

/*!
  Documentation for bar.
*/
void N::bar(A& a) {
  ++a.i;
}

Doxygen outputs, among other things,

.../bug3.cc:13 Warning: Member N::bar of class N::A is not documented.

First, N::bar is not a member of class N::A.
Then it is not true that it is not documented.
In fact, it is documented the same way the member N::A::foo is.

To reproduce:

$ doxygen Doxyfile
$ make ps

All the best,

    Roberto

-- 
Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it
-------------- next part --------------
PROJECT_NAME           = BugReport
PROJECT_NUMBER         = PPL.3
OUTPUT_DIRECTORY       = .
OUTPUT_LANGUAGE        = English
INPUT                  = bug3.cc
GENERATE_LATEX         = YES
LATEX_OUTPUT           = .
COMPACT_LATEX          = YES
-------------- next part --------------
namespace N {
  class A;
  void bar(A& a);
};

//! Documenting class A.
class N::A {
private:
  int i;

public:
  void foo();
  friend void N::bar(A& a);
};

/*!
  Documentation for foo.
*/
void N::A::foo() {
}

/*!
  Documentation for bar.
*/
void N::bar(A& a) {
  ++a.i;
}


More information about the PPL-devel mailing list