C++ named parameters?
-
Browsing woboq (my only resource for Qt source code) I came across many occurrences such as https://codebrowser.dev/qt5/qtbase/src/corelib/io/qprocess_unix.cpp.html#713
And I thought to myself: "Wot? Named parameters?!". Since what version of C++??
Then I tried to copy/paste that line to post here, and found it shows as:
So the plot thickens! Clearly the source code is not really as shown, it does not actually have the "named parameters" in it, right? So this is some woboq-ism on presentation to confuse the gullible? What's going on?
-
Browsing woboq (my only resource for Qt source code) I came across many occurrences such as https://codebrowser.dev/qt5/qtbase/src/corelib/io/qprocess_unix.cpp.html#713
And I thought to myself: "Wot? Named parameters?!". Since what version of C++??
Then I tried to copy/paste that line to post here, and found it shows as:
So the plot thickens! Clearly the source code is not really as shown, it does not actually have the "named parameters" in it, right? So this is some woboq-ism on presentation to confuse the gullible? What's going on?
You may find your solution here
(haven't checked all of it)- https://woboq.com/blog/codebrowser-under-the-hood.html
- https://woboq.com/blog/codebrowser-introduction.html
I think it's a woboq code browser feature.
-
You may find your solution here
(haven't checked all of it)- https://woboq.com/blog/codebrowser-under-the-hood.html
- https://woboq.com/blog/codebrowser-introduction.html
I think it's a woboq code browser feature.
-
@Pl45m4
Didn't notice my specific feature in their links, but as you say it will be some annotation they add. I thought I (C++) was going mad! I have used woboq many times on many other Qt source files without seeing this aspect.I think it's some kind of hint for the reader to understand the source code better without browsing the whole class.
Like:in some
class.h
wheresomeFunction(int a, int b, float c)
is declaredvoid someFunction(int a, int b, float c);
and (if I'm correct) everywhere the function is used, on every call, the code browser adds the names from the header, so you know right away what this
// some code // ... someFunction(42, 42, 13.37); // ...
means.
With the hint it looks like:
( imagine meaningful names there :D )someFunction( [ a ]: 42, [ b ]: 42, [ c ]: 13.37);
Therefore I don't think it's C++ :)
Btw: I also like woboq to check Qt source code :) -
J JonB has marked this topic as solved on