diff options
Diffstat (limited to 'src/mongo/util')
-rw-r--r-- | src/mongo/util/SConscript | 10 | ||||
-rw-r--r-- | src/mongo/util/dns_query_windows-impl.h | 8 | ||||
-rw-r--r-- | src/mongo/util/future.h | 7 | ||||
-rw-r--r-- | src/mongo/util/options_parser/SConscript | 2 |
4 files changed, 18 insertions, 9 deletions
diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript index 6c218980a0e..a5674b3eb18 100644 --- a/src/mongo/util/SConscript +++ b/src/mongo/util/SConscript @@ -8,7 +8,7 @@ Import("use_system_version_of_library") env = env.Clone() -env.InjectThirdPartyIncludePaths('asio') +env.InjectThirdParty('asio') env.SConscript( dirs=[ @@ -380,7 +380,7 @@ if env['MONGO_ALLOCATOR'] == 'tcmalloc': if not use_system_version_of_library('tcmalloc'): # Add in the include path for our vendored tcmalloc. - tcmspEnv.InjectThirdPartyIncludePaths('gperftools') + tcmspEnv.InjectThirdParty('gperftools') # If our changes to tcmalloc are ever upstreamed, this should become set based on a top # level configure check, though its effects should still be scoped just to these files. @@ -393,7 +393,7 @@ if env['MONGO_ALLOCATOR'] == 'tcmalloc': if not use_system_version_of_library('valgrind'): # Include valgrind since tcmalloc disables itself while running under valgrind - tcmspEnv.InjectThirdPartyIncludePaths('valgrind') + tcmspEnv.InjectThirdParty('valgrind') tcmspEnv.Library( target='tcmalloc_set_parameter', @@ -512,7 +512,7 @@ if has_option('use-cpu-profiler'): ) if not use_system_version_of_library('tcmalloc'): - quick_exit_env.InjectThirdPartyIncludePaths( + quick_exit_env.InjectThirdParty( 'gperftools' ) @@ -822,7 +822,7 @@ if not use_system_version_of_library("icu"): ) icuEnv.Alias("generated-sources", generateICUInit) - icuEnv.InjectThirdPartyIncludePaths("icu") + icuEnv.InjectThirdParty("icu") # Since we are injecting the third-party ICU headers, we must also copy the same defines that we # use to configure ICU when building ICU sources. See comment in # src/third_party/icu4c-57.1/source/SConscript. diff --git a/src/mongo/util/dns_query_windows-impl.h b/src/mongo/util/dns_query_windows-impl.h index 65395da16b4..ba2940196d5 100644 --- a/src/mongo/util/dns_query_windows-impl.h +++ b/src/mongo/util/dns_query_windows-impl.h @@ -154,8 +154,14 @@ public: explicit DNSResponse(std::string service, PDNS_RECORDA initialResults) : _service(std::move(service)), _results(initialResults, freeDnsRecord) {} - class iterator : public std::iterator<std::forward_iterator_tag, ResourceRecord> { + class iterator { public: + using iterator_category = std::forward_iterator_tag; + using value_type = ResourceRecord; + using difference_type = std::ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; + const ResourceRecord& operator*() { this->_populate(); return this->_storage; diff --git a/src/mongo/util/future.h b/src/mongo/util/future.h index c32731c1986..3ad43982591 100644 --- a/src/mongo/util/future.h +++ b/src/mongo/util/future.h @@ -1710,8 +1710,8 @@ inline auto makePromiseFuture() { * FutureContinuationResult<std::function<int(bool)>, NotBool> SFINAE-safe substitution failure. */ template <typename Func, typename... Args> -using FutureContinuationResult = - typename future_details::FutureContinuationResultImpl<std::result_of_t<Func(Args&&...)>>::type; +using FutureContinuationResult = typename future_details::FutureContinuationResultImpl< + std::invoke_result_t<Func, Args&&...>>::type; // // Implementations of methods that couldn't be defined in the class due to ordering requirements. @@ -1719,12 +1719,14 @@ using FutureContinuationResult = template <typename T> inline Future<T> Promise<T>::getFuture() noexcept { + using namespace future_details; _sharedState->threadUnsafeIncRefCountTo(2); return Future<T>(boost::intrusive_ptr<SharedState<T>>(_sharedState.get(), /*add ref*/ false)); } template <typename T> inline void Promise<T>::setFrom(Future<T>&& future) noexcept { + using namespace future_details; setImpl([&](boost::intrusive_ptr<SharedState<T>>&& sharedState) { future.propagateResultTo(sharedState.get()); }); @@ -1743,6 +1745,7 @@ template <typename T> template <typename T> inline SharedSemiFuture<T> Future<T>::share() && noexcept { + using namespace future_details; if (!_immediate) return SharedSemiFuture<T>(std::move(_shared)); diff --git a/src/mongo/util/options_parser/SConscript b/src/mongo/util/options_parser/SConscript index ce5083bd1e8..03c7882bfe1 100644 --- a/src/mongo/util/options_parser/SConscript +++ b/src/mongo/util/options_parser/SConscript @@ -5,7 +5,7 @@ Import("env") env = env.Clone() optsEnv = env.Clone() -optsEnv.InjectThirdPartyIncludePaths(libraries=['yaml']) +optsEnv.InjectThirdParty(libraries=['yaml']) optsEnv.Library( target='options_parser', |