Thread: [Doxygen-users] Rejects C++ overloaded methods w/ default parameters
Brought to you by:
dimitri
From: MK <mk...@co...> - 2014-07-21 14:18:46
|
I'm not sure why this doesn't work; I have overloaded constructors with default values that came out fine, overloaded methods, and methods w/ default params, but this is the only overloaded method with default parameters. It gets left out of the documentation and an error is reported (I've added indentation to make this more readable): Searching for member function documentation... led8x8.cpp:203: warning: no matching class member found for void led8x8::scroll ( const vector< led8x8Image * > &images, ledDirection_t direction, int delay ) Possible candidates: void led8x8::scroll ( const std::vector< led8x8Image * > &, ledDirection_t, int=5 ) void led8x8::scroll ( std::string, ledDirection_t, int=5 ) led8x8.cpp:224: warning: no matching class member found for void led8x8::scroll ( string msg, ledDirection_t direction, int delay ) Possible candidates: void led8x8::scroll ( const std::vector< led8x8Image * > &, ledDirection_t, int=5 ) void led8x8::scroll( std::string, ledDirection_t, int=5 ) As you can see, these *do* match up; this code compiles flawlessly. Is there anyway around this or do I have to edit these into the html file manually? MK -- "Enthusiasm is not the enemy of the intellect." (said of Irving Howe) |
From: Ferro, A. <Ala...@me...> - 2014-07-21 14:46:17
|
MK, Make sure your "std::" prefixes match - Doxygen is far less forgiving that the C++ compiler on this! Alasdair -----Original Message----- From: MK [mailto:mk...@co...] Sent: 21 July 2014 14:37 To: dox...@li... Subject: [Doxygen-users] Rejects C++ overloaded methods w/ default parameters I'm not sure why this doesn't work; I have overloaded constructors with default values that came out fine, overloaded methods, and methods w/ default params, but this is the only overloaded method with default parameters. It gets left out of the documentation and an error is reported (I've added indentation to make this more readable): Searching for member function documentation... led8x8.cpp:203: warning: no matching class member found for void led8x8::scroll ( const vector< led8x8Image * > &images, ledDirection_t direction, int delay ) Possible candidates: void led8x8::scroll ( const std::vector< led8x8Image * > &, ledDirection_t, int=5 ) void led8x8::scroll ( std::string, ledDirection_t, int=5 ) led8x8.cpp:224: warning: no matching class member found for void led8x8::scroll ( string msg, ledDirection_t direction, int delay ) Possible candidates: void led8x8::scroll ( const std::vector< led8x8Image * > &, ledDirection_t, int=5 ) void led8x8::scroll( std::string, ledDirection_t, int=5 ) As you can see, these *do* match up; this code compiles flawlessly. Is there anyway around this or do I have to edit these into the html file manually? MK -- "Enthusiasm is not the enemy of the intellect." (said of Irving Howe) ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Doxygen-users mailing list Dox...@li... https://lists.sourceforge.net/lists/listinfo/doxygen-users |
From: MK <mk...@co...> - 2014-07-21 17:16:10
|
On Mon, 21 Jul 2014 14:46:06 +0000 "Ferro, Alasdair" <Ala...@me...> wrote: > Make sure your "std::" prefixes match - Doxygen is far less forgiving > that the C++ compiler on this! If that's the issue, it's not a matter of "being less forgiving", it's a matter of being wrong, I think, since the .cpp files use namespace std whereas the .hpp ones don't. All of the other methods are the same in this regard and they come out okay. BUT: Adding the full namespace to the params in the .cpp works to get the documentation out. I'm okay with that, even if it does look a little inconsistent. Life is not perfect ;) Thanks! MK -- "Enthusiasm is not the enemy of the intellect." (said of Irving Howe) |
From: Dimitri v. H. <do...@gm...> - 2014-07-21 17:49:51
|
On 21 Jul 2014, at 19:14 , MK <mk...@co...> wrote: > On Mon, 21 Jul 2014 14:46:06 +0000 > "Ferro, Alasdair" <Ala...@me...> wrote: > >> Make sure your "std::" prefixes match - Doxygen is far less forgiving >> that the C++ compiler on this! > > If that's the issue, it's not a matter of "being less forgiving", > it's a matter of being wrong, I think, since the .cpp files use > namespace std whereas the .hpp ones don't. All of the other methods > are the same in this regard and they come out okay. No, it is a matter of giving doxygen incomplete input. Unlike the compiler which reads the <vector> include file and stops with an error if it cannot find it, doxygen doesn't parse this file (unless you make it part of the INPUT) and as a result it doesn't know about the existence of a namespace 'std' with a class 'vector' in it. So it cannot assume the arguments match if there are multiple candidate definitions to choose from. Since std::vector is such a common use-case, I've added the option BUILTIN_STL_SUPPORT, which you can enable to make the most common STL classes known to doxygen. > > BUT: Adding the full namespace to the params in the .cpp works to get > the documentation out. I'm okay with that, even if it does look a > little inconsistent. Life is not perfect ;) I hope it is a little more perfect with the info above ;-) Regards, Dimitri |