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

Constructing a StatusWith from a call to Status::OK() should fail to compile

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Internal Code
    • None
    • Service Arch

    Description

      It is always an error to construct a StatusWith from an OK status. In the case of Status::OK() we can detect that at compile time. This can easily happen when converting a function from returning Status to StatusWith.

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            mathias@mongodb.com Mathias Stearn
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: