Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-99223

Use SourceLocation consistently in assertions

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • ALL
    • Programmability 2025-01-20, Programmability 2025-02-03, Programmability 2025-02-17

      Stop passing file and line around
      SourceLocation cannot be confused with other parameters as it's a distinct type.
      It also has better information (function and column), and can be implicitly generated by the special default parameter compiler intrinsics (a la std::source_location).

      Use BOOST_SOURCE_LOCATION to deal with platform compatibility.

      It will find the __builtin_LINE() etc functions needed for the SourceLocation default parameter behavior.
      https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fLINE
      These features are supported by all of our compilers even if std::source_location isn't yet.

      We can get rid of MONGO_SOURCE_LOCATION_NO_FUNC.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: