2

I have some C++ source code with templates maybe like this - doxygen runs without errors but none of the documentation is added to the output, what is going on?

///
/// A class
///
class A
{
  ///
  /// A typedef
  ///
  typedef B<C<D>> SomeTypedefOfTemplates;
};

2 Answers 2

6

Note that doxygen now supports closing a template with the right shift operator (since version 1.6.0).

Also see http://bugzilla.gnome.org/show_bug.cgi?id=560512 for a discussion on the problem and the solution implemented.

Sign up to request clarification or add additional context in comments.

Comments

4

Yeah, so what is going on is the template instantiation is bogus. The ">>" like that is ambiguous and is meant to be a compile time error. You couldn't see it because maybe your compiler (VC++) let it slip by but I guess doxygen was stricter on that. Add a space like shown.

///
/// A class
///
class A
{
  ///
  /// A typedef
  ///
  typedef B<C<D> > SomeTypedefOfTemplates;
};

2 Comments

Yep, the >> gets interpreted as a right-shift operator. C++0x will change this behavior, though. See en.wikipedia.org/wiki/C%2B%2B0x#Angle_bracket
Did you just ask your own question and answer it for the sake of it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.