diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2016-06-03 13:55:34 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2016-06-03 13:55:34 -0400 |
commit | 8a3e35c1124b8d145bfc6073207f1d1b83db48c3 (patch) | |
tree | f1bfbbb2e70bb55f0bccf0b103fbe69404da491a | |
parent | 7a191accbe3c13a276d7b886b9047e7acedf9be8 (diff) | |
download | mongo-8a3e35c1124b8d145bfc6073207f1d1b83db48c3.tar.gz |
SERVER-23905 Fix compile on OS X 10.10.
The libc++ implementation of unique_ptr on OSX 10.10, or perhaps the version of
llvm on that platform, cannot handle returning a value of type unique_ptr<Y> in
a function whose return type is unique_ptr<X>, when Y is derived from X. The
workaround is to return std::move(returnvalue).
-rw-r--r-- | src/mongo/db/repl/service_context_repl_mock.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/repl/service_context_repl_mock.cpp b/src/mongo/db/repl/service_context_repl_mock.cpp index 4f8a424d274..ba88cf149bd 100644 --- a/src/mongo/db/repl/service_context_repl_mock.cpp +++ b/src/mongo/db/repl/service_context_repl_mock.cpp @@ -44,7 +44,7 @@ std::unique_ptr<OperationContext> ServiceContextReplMock::_newOpCtx(Client* clie auto opCtx = stdx::make_unique<OperationContextNoop>(client, opId); opCtx->releaseLockState(); opCtx->setLockState(stdx::make_unique<MMAPV1LockerImpl>()); - return opCtx; + return std::move(opCtx); } } // namespace repl |