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

Remove obsolete stdx polyfills

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • ALL
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      The mongo/stdx/ folder is full of reimplementations of C++ standard or standard-adjacent features.

      stdx::mutex (alias)
      stdx::condition_variable ( class derived from std::condition_variable_any)
      stdx::thread (class derived from std::thread)
      stdx::chrono (namespace alias for std::chrono)
      stdx::is_detected (proposed TS2 spec std lib feature superseded by concepts)

      stdx::launder (obsolete polyfill)
      stdx::hardware_*_interference_size (obsolete polyfill)

      stdx::future / async / launch / packaged_task etc... (all aliases)

      stdx::unordered_map (these MUST be fixed, as they are aliases to absl:: containers having different APIs to the std:: containers).
      type_traits.h : all obsolete polyfills.

      etc.

      Some of these were created up to 10 years ago as future-oriented previews of stdlib features. Now that the language platform has caught up we can evaluate removing them.

      There are things in here that are NOT standardized and cannot be, like stdx::thread.
      These probably need to be renamed and moved out into something like base/ or platform/ and placed in the mongo:: namespace.

      Some of these will take some sophisticated migration effort.
      MOST are simply renames.

            Assignee:
            Unassigned Unassigned
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: