Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. C++ named parameters?
Forum Updated to NodeBB v4.3 + New Features

C++ named parameters?

Scheduled Pinned Locked Moved Solved C++ Gurus
4 Posts 2 Posters 641 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JonBJ Online
    JonBJ Online
    JonB
    wrote on last edited by
    #1

    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
    Screenshot 2024-05-18 082443.png

    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:
    Screenshot 2024-05-18 082738.png

    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?

    Pl45m4P 1 Reply Last reply
    0
    • JonBJ JonB

      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
      Screenshot 2024-05-18 082443.png

      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:
      Screenshot 2024-05-18 082738.png

      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?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @JonB

      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.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      JonBJ 1 Reply Last reply
      1
      • Pl45m4P Pl45m4

        @JonB

        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.

        JonBJ Online
        JonBJ Online
        JonB
        wrote on last edited by
        #3

        @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.

        Pl45m4P 1 Reply Last reply
        0
        • JonBJ JonB

          @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.

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by Pl45m4
          #4

          @JonB

          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 where someFunction(int a, int b, float c) is declared

          void 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 :)


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          0
          • JonBJ JonB has marked this topic as solved on

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved