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

Automate enforcement of inclusion of mongo/platform/basic.h

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
    • Dev Platform 2021-08-09

      All cpp files under src/mongo are technically required to include mongo/platform/basic.h as their first include. Over 400 files do not. While this does not lead to an ill effect today, we should either enforce the requirement or remove it.

      The requirement was originally put in place because Windows header inclusion is messy, and order often matters, so using the inclusion of basic.h to ensure proper windows header inclusion was useful. I do not know if it remains relevant.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: