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

Add Fixed width user defined integer literals

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • 3.3.1
    • Portability
    • None
    • Dev Tools 2019-07-01, Dev Tools 2019-07-15

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: