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 153362 - doxygen gets confused by template typedefs that contain parenthesis
doxygen gets confused by template typedefs that contain parenthesis
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.3.x
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2004-09-22 05:09 UTC by Matthias Klose
Modified: 2007-08-02 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase - GZIPP'ed Tarball (49.10 KB, application/x-gzip)
2005-12-19 04:14 UTC, Kevin McBride
Details

Description Matthias Klose 2004-09-22 05:09:51 UTC
[forwarded from http://bugs.debian.org/267406]

In the following file:
struct Foo {
    typedef bar<void()> Baz;
};

Baz' signature will be shown as:

typedef bar<void() Foo::Baz)

instead of

typedef bar<void()> Foo::Baz

A 'typedef bar<void> Baz' is handled correctly.
Comment 1 st_jax 2005-12-17 18:42:44 UTC
I believe another case of this problem manifests with boost::signals when you're
using the 'preferred syntax' they describe e.g. boost:signal< void () >. This is
not recognized as a type at all.
Comment 2 Kevin McBride 2005-12-19 04:14:44 UTC
Created attachment 56137 [details]
Testcase - GZIPP'ed Tarball

Confirmed.  My attatchment contains a testcase I have produced for this bug.
Comment 3 Kevin McBride 2005-12-19 04:29:11 UTC
This bug appears in 1.4.5-20051127 as well.
Comment 4 Sebastien Delestaing 2005-12-19 08:40:24 UTC
Hello,

I see that bug in C with Doxygen 1.4.5 as well, with the following declaration:

typedef __declspec(dllimport) BOOL(*SomeFunctionPointer)(double, int, long*, char*);

Thanks
Comment 5 Hector C 2006-02-19 07:41:42 UTC
I found a similar bug in doxygen 1.4.6 :

/// Lookup table
template< class POD >
class AA
{
public:
    // Chokes on this
    typedef void ( t_Function )( const POD *, float &, float & );

    /// No return value for constructors
    AA( );
};
Comment 6 Steven 2006-10-23 20:26:41 UTC
typedef typeOUResult (WINAPI *typeOperationCompletedCallback)( typeListOfStrings*,  bool);
Leads to the following output HTML:
typedef typeOUResult(WINAPI *) typeOperationCompletedCallback(typeListOfStrings *, bool)

Note that the Brackets are moved into a semi-incorrect format.

Comment 7 ahothan 2007-06-05 20:54:57 UTC
There is a bug in displaying all C function prototypes.
The bug is still in 1.5.2.

The following C function prototype:
typedef void (*foo)(int arg);

will translate in the following HTML output (which is incorrect and won't compile):

typedef void (*) foo(int arg);

Comment 8 Dimitri van Heesch 2007-07-25 10:27:37 UTC
#4 and #6 are preprocessor issues, see the corresponding section in the manual.
#3 and #5 seems already be fixed.
#7 is indeed a bug and will be fixed in the next release.
Comment 9 Steven 2007-07-25 14:40:53 UTC
I'm sorry...I don't see how my comment is related to preprocessor issues...
If you are implying i should add "WINAPI= \" to PREPROCESSOR_DEFINES...I then end up with comment 7

Comment 6 and comment 7 are virtually identical-->

typedef void (WINAPI *foo)(int arg);
vs.
typedef void (*foo)(int arg);

In any case, if comment 7 is fixed, my issue should be fixed as well...Thanks for looking into it!
Comment 10 Dimitri van Heesch 2007-07-27 09:22:32 UTC
This bug was marked ASSIGNED and as a result has been moved to the FIXED state with the release of 1.5.3, since I believe the bug has been fixed in this release. I kindly ask you to verify this and reopen the bug should this not be the case. 
Comment 11 Steven 2007-07-27 15:20:34 UTC
I can confirm this is fixed in 1.5.3
Comment 12 ahothan 2007-08-02 13:56:04 UTC
Works for me too in 1.5.3.
Thanks!