GNOME Bugzilla – Bug 527202
">>" in type causes no documentation
Last modified: 2009-01-25 11:06:14 UTC
Please describe the problem: Using ">>" as part of a type in C++, e.g. in /** * class documentation */ class myclass { public: vector<rect<s32>> myvariable; /** * documentation */ void foo(); }; results in no documentation for any class member. A similar problem appeared in Bug 307685. I know this can be resolved by writing vector< rect<s32> > myvariable but it would be nice if the first version would work too. Felix Steps to reproduce: use >> in any type Actual results: Expected results: Does this happen every time? yes Other information:
This is supported for C#, but it is not valid C++, i.e. my compiler (gcc) says: error: ‘>>’ should be ‘> >’ within a nested template argument list So why should I support it? Doing so would probably break the following valid C++ code: const int v=32; vector<v>>2> var;
Because it is valid if you use Visual Studio compiler. This might not be valid C++ for gcc but I think there are many vs developers out there and so at least a warning message might not be bad. Otherwise it takes quite a time to search the problem. felix
So the question from comment #1, why invalid C++ should be supported by doxzgen, has been answered in comment #2: Because the Windows folks don't care. I think it's up to you, Dimitri, to either close this bug as WONTFIX or accept the need for it and set it to NEW. I am REOPENing for now.
I'll mark this as a duplicate, and keep the other report open as a placeholder for people running into this problem. I agree it would be nice if doxygen could detect this case and give a warning, but if that was possible, it could also ignore it. *** This bug has been marked as a duplicate of 560512 ***