Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doxygen: Prevent duplicates due to forward declarations and templates

Tags:

c++

doxygen

Doxygen generally handles forward declarations well. For example,

/** \file */

class A;

class B {
    // uses A
};

class A {
    // uses B
};

results in

enter image description here

without duplicating A.

But if I make A and B class templates, then A is extracted twice:

/** \file */

template<typename T> class A;

template<typename T>
class B {
    // uses A<T>
};

template<typename T>
class A {
    // uses B<T>
};

enter image description here

How can I prevent this?

like image 551
Szabolcs Avatar asked Oct 23 '17 10:10

Szabolcs


1 Answers

With the versions 1.8.13 - 1.8.18 I can see the behavior as indicated. With the current doxygen master, i.e. 1.8.19 (0937faf2d168b64f5ccf55c1976bc045d5d12569), this problem looks like to be solved and only class B<T> and class A<T> are shown.

(It is not yet known / planned when 1.8.19 will be released, the 1.8.18 version has been released on April 12, 2020).

like image 133
albert Avatar answered Oct 21 '22 23:10

albert