cldoc icon indicating copy to clipboard operation
cldoc copied to clipboard

Duplicated class if forward declared when using category directives

Open jmillan opened this issue 9 years ago • 1 comments

Hi,

The following code perfectly generates the documentation for the given classes

/* cldoc:begin-category(core::A) */
class A;
/* cldoc:end-category() */

/* cldoc:begin-category(core::A) */
class A {
  public:
  int a;
};
/* cldoc:end-category() */

Whereas removing the category directive around the forward declaration duplicates the A class on the documentation. It generates an A class object in the root space and another one in the core category.

This is not a bug. I would expect it to work as it does. I just want to ask whether I need to surround with these directives every forward declaration which canonical declaration is also 'categorized', or whether there's another way (less manual) to do it.

Any feedback is very appreciated.

jmillan avatar Jan 25 '16 15:01 jmillan

I can't think of any solution which does not imply surrounding the forward declarations with the (begin-category and end-category) directives, which I can't afford.

It's a pity, other than this I find the project very useful.

jmillan avatar Feb 01 '16 16:02 jmillan