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

Add Fixed width user defined integer literals

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.3.1
    • Component/s: Portability
    • None
    • Dev Tools 2019-07-01, Dev Tools 2019-07-15

      A number of our internal api's, such as safenum, require fixed width integer types. I'd like to consider what adding user defined fixed width integer types might look like.

      The idea being that one could:

      42i64 == static_cast<int64_t>(42LL)

      1234u32 == static_cast<uint32_t>(1234UL)

      etc.

      Mostly a quality of life issue

      This is probably blocked on the upgrade to msvc 2015, as vc12 lacks support for user defined literals

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: