summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/storage_interface_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/storage_interface_impl.cpp')
-rw-r--r--src/mongo/db/repl/storage_interface_impl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/repl/storage_interface_impl.cpp b/src/mongo/db/repl/storage_interface_impl.cpp
index 0f9c3aa4969..4127ad6b410 100644
--- a/src/mongo/db/repl/storage_interface_impl.cpp
+++ b/src/mongo/db/repl/storage_interface_impl.cpp
@@ -303,9 +303,10 @@ namespace {
* Returns NamespaceNotFound if the database or collection does not exist.
*/
template <typename AutoGetCollectionType>
-StatusWith<Collection*> getCollection(const AutoGetCollectionType& autoGetCollection,
- const NamespaceStringOrUUID& nsOrUUID,
- const std::string& message) {
+StatusWith<decltype(std::declval<AutoGetCollectionType>().getCollection())> getCollection(
+ const AutoGetCollectionType& autoGetCollection,
+ const NamespaceStringOrUUID& nsOrUUID,
+ const std::string& message) {
if (!autoGetCollection.getDb()) {
StringData dbName = nsOrUUID.nss() ? nsOrUUID.nss()->db() : nsOrUUID.dbname();
return {ErrorCodes::NamespaceNotFound,