简体   繁体   中英

Doxygen: Prevent duplicates due to forward declarations and templates

Doxygen generally handles forward declarations well. For example,

/** \file */

class A;

class B {
    // uses A
};

class A {
    // uses B
};

results in

在此处输入图片说明

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>
};

在此处输入图片说明

How can I prevent this?

With the versions 1.8.13 - 1.8.18 I can see the behavior as indicated. With the current doxygen master, ie 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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM