After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688647 - Missing documentation after C++11 unified initializer
Missing documentation after C++11 unified initializer
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.2
Other Linux
: Normal major
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2012-11-19 14:45 UTC by Keith Chan
Modified: 2014-12-29 17:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Doxyfile (9.91 KB, text/plain)
2012-11-19 23:05 UTC, Keith Chan
Details
Slightly Modified Sample (87.97 KB, application/x-zip-compressed)
2012-11-23 18:10 UTC, Kevin McBride
Details
New test case - nested initializers (103.80 KB, application/x-xz)
2014-12-11 11:25 UTC, Freddie Chopin
Details

Description Keith Chan 2012-11-19 14:45:10 UTC
No documentation is generated for code following the use of a C++11 unified initializer:

/**
 * foo
 */
class foo {
    int x_;

public:
    foo() : x_{42} {}

    /**
     * f
     */
    void f();
};

No documentation is generated for f().  However, if you use normal parentheses for initializing:

/**
 * foo
 */
class foo {
    int x_;

public:
    foo() : x_(42) {}

    /**
     * f
     */
    void f();
};

Documentation for f() is generated.
Comment 1 Keith Chan 2012-11-19 23:05:06 UTC
Created attachment 229414 [details]
Doxyfile
Comment 2 Kevin McBride 2012-11-23 18:10:33 UTC
Created attachment 229737 [details]
Slightly Modified Sample

I find that the class gets defined, but function void f() is not defined in Doxygen when the newer C++11 syntax is used.
Comment 3 Dimitri van Heesch 2012-11-25 14:03:00 UTC
Confirmed. Should be fixed in the next subversion update.
Comment 4 Dimitri van Heesch 2012-12-26 16:09:01 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.3. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.
Comment 5 Freddie Chopin 2014-12-11 11:23:23 UTC
I'm reporting it here - if necessary I can open a new bug, so please tell me if that would be preferable.

I'm using doxygen 1.8.8 on Arch Linux, so the bug is supposed to be fixed, but I'm experiencing the same thing as the one reported by first post. I'll attach a test-case (one header from a project and Doxyfile) that demonstrates this.

Shorter versions:

--->8--->8--->8--->8--->8--->8---

template<typename T>
class FifoQueue
{
public:

	...

	/**
	 * \brief FifoQueue's constructor
	 */

	FifoQueue(Storage* const storage, const size_t maxElements) :
			fifoQueueBase_{storage, maxElements, scheduler::FifoQueueBase::TypeTag<T>{}}
	{

	}

	/**
	 * \brief Pops the oldest (first) element from the queue.
	 */

	int pop(T& value)
	{
		return fifoQueueBase_.pop(value);
	}

	...

--->8--->8--->8--->8--->8--->8---

No documentation is generated after the constructor. If I replace this:

fifoQueueBase_{storage, maxElements, scheduler::FifoQueueBase::TypeTag<T>{}}

with this:

fifoQueueBase_(storage, maxElements, scheduler::FifoQueueBase::TypeTag<T>{})

then everything is fine.

If I replace the same line with this:

fifoQueueBase_{storage, maxElements}

or this:

fifoQueueBase_{storage, maxElements, scheduler::FifoQueueBase::TypeTag<T>}

it also works.

This is not related to bug #721462 - if I put anything in the TypeTag initializer, it still doesn't work.

So it seems that doxygen handles the new initializer syntax of C++11 only when there is no nesting, but doesn't like the idea of one initializer embedded in another initializer.
Comment 6 Freddie Chopin 2014-12-11 11:25:42 UTC
Created attachment 292523 [details]
New test case - nested initializers
Comment 7 Freddie Chopin 2014-12-29 17:18:41 UTC
I've opened a new bug #742095, sorry for the noise in old thread.