diff options
Diffstat (limited to 'src/mongo/db/api_parameters.cpp')
-rw-r--r-- | src/mongo/db/api_parameters.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/db/api_parameters.cpp b/src/mongo/db/api_parameters.cpp index 05ffe9c49cb..51e424637db 100644 --- a/src/mongo/db/api_parameters.cpp +++ b/src/mongo/db/api_parameters.cpp @@ -76,4 +76,18 @@ void APIParameters::appendInfo(BSONObjBuilder* builder) const { } } +std::size_t APIParameters::Hash::operator()(const APIParameters& params) const { + size_t seed = 0; + if (params.getAPIVersion()) { + boost::hash_combine(seed, *params.getAPIVersion()); + } + if (params.getAPIStrict()) { + boost::hash_combine(seed, *params.getAPIStrict()); + } + if (params.getAPIDeprecationErrors()) { + boost::hash_combine(seed, *params.getAPIDeprecationErrors()); + } + return seed; +} + } // namespace mongo |