summaryrefslogtreecommitdiff
path: root/src/mongo/base/status.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2016-05-06 14:09:50 -0400
committerMathias Stearn <mathias@10gen.com>2016-05-09 17:52:12 -0400
commit26586d84484c16f3d5aa7ab4cad87552e4b8bc5f (patch)
treefbfd4e3fd4e3280cc28914d0664e9469a775e96f /src/mongo/base/status.h
parentfb439046f73ce10b862750df853746c41e9e2e81 (diff)
downloadmongo-26586d84484c16f3d5aa7ab4cad87552e4b8bc5f.tar.gz
SERVER-24082 Move std::string construction into Status constructor
Previously it was done at every call site that used string literals.
Diffstat (limited to 'src/mongo/base/status.h')
-rw-r--r--src/mongo/base/status.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/base/status.h b/src/mongo/base/status.h
index 63ef2785913..b54031a04d4 100644
--- a/src/mongo/base/status.h
+++ b/src/mongo/base/status.h
@@ -34,6 +34,12 @@
#include "mongo/base/error_codes.h"
#include "mongo/platform/atomic_word.h"
+namespace mongoutils {
+namespace str {
+class stream;
+}
+}
+
namespace mongo {
/**
@@ -72,6 +78,12 @@ public:
MONGO_COMPILER_COLD_FUNCTION Status(ErrorCodes::Error code,
std::string reason,
int location = 0);
+ MONGO_COMPILER_COLD_FUNCTION Status(ErrorCodes::Error code,
+ const char* reason,
+ int location = 0);
+ MONGO_COMPILER_COLD_FUNCTION Status(ErrorCodes::Error code,
+ const mongoutils::str::stream& reason,
+ int location = 0);
inline Status(const Status& other);
inline Status& operator=(const Status& other);