diff --git a/folly/container/F14Map.h b/folly/container/F14Map.h index ccb0bde3f64..23aa356758d 100644 --- a/folly/container/F14Map.h +++ b/folly/container/F14Map.h @@ -631,7 +631,7 @@ class F14BasicMap { * @methodset Modifiers */ FOLLY_ALWAYS_INLINE iterator erase(const_iterator pos) { - return eraseInto(pos, [](key_type&&, mapped_type&&) {}); + return eraseInto(pos, variadic_noop); } /** @@ -641,23 +641,21 @@ class F14BasicMap { * that accepts const_iterator */ FOLLY_ALWAYS_INLINE iterator erase(iterator pos) { - return eraseInto(pos, [](key_type&&, mapped_type&&) {}); + return eraseInto(pos, variadic_noop); } /// Remove a range of elements. iterator erase(const_iterator first, const_iterator last) { - return eraseInto(first, last, [](key_type&&, mapped_type&&) {}); + return eraseInto(first, last, variadic_noop); } /// Remove a specific key. - size_type erase(key_type const& key) { - return eraseInto(key, [](key_type&&, mapped_type&&) {}); - } + size_type erase(key_type const& key) { return eraseInto(key, variadic_noop); } /// Remove a key, using a heterogeneous representation. template EnableHeterogeneousErase erase(K const& key) { - return eraseInto(key, [](key_type&&, mapped_type&&) {}); + return eraseInto(key, variadic_noop); } protected: @@ -1537,29 +1535,29 @@ class F14VectorMapImpl : public F14BasicMap EnableHeterogeneousVectorErase erase(K const& key) { - return eraseInto(key, [](key_type&&, mapped_type&&) {}); + return eraseInto(key, variadic_noop); } /** diff --git a/folly/container/F14Set.h b/folly/container/F14Set.h index da8de822f54..d78cfe146ae 100644 --- a/folly/container/F14Set.h +++ b/folly/container/F14Set.h @@ -403,23 +403,21 @@ class F14BasicSet { * @methodset Modifiers */ FOLLY_ALWAYS_INLINE iterator erase(const_iterator pos) { - return eraseInto(pos, [](value_type&&) {}); + return eraseInto(pos, variadic_noop); } /// Remove a range of elements. iterator erase(const_iterator first, const_iterator last) { - return eraseInto(first, last, [](value_type&&) {}); + return eraseInto(first, last, variadic_noop); } /// Remove a specific key. - size_type erase(key_type const& key) { - return eraseInto(key, [](value_type&&) {}); - } + size_type erase(key_type const& key) { return eraseInto(key, variadic_noop); } /// Remove a key, using a heterogeneous representation. template EnableHeterogeneousErase erase(K const& key) { - return eraseInto(key, [](value_type&&) {}); + return eraseInto(key, variadic_noop); } /** @@ -1170,20 +1168,20 @@ class F14VectorSetImpl : public F14BasicSet EnableHeterogeneousVectorErase erase(K const& key) { - return eraseInto(key, [](value_type&&) {}); + return eraseInto(key, variadic_noop); } template diff --git a/folly/futures/Future-inl.h b/folly/futures/Future-inl.h index d0ed99806f4..03ded55bb2c 100644 --- a/folly/futures/Future-inl.h +++ b/folly/futures/Future-inl.h @@ -854,7 +854,7 @@ SemiFuture SemiFuture::deferEnsure(F&& func) && { template SemiFuture SemiFuture::unit() && { - return std::move(*this).deferValue([](T&&) {}); + return std::move(*this).deferValue(variadic_noop); } template @@ -1273,7 +1273,7 @@ Future::thenErrorImpl( template Future Future::then() && { - return std::move(*this).thenValue([](T&&) {}); + return std::move(*this).thenValue(variadic_noop); } template @@ -2185,8 +2185,8 @@ SemiFuture SemiFuture::within( nestedExecutors.emplace_back(ctx->thisFuture.stealDeferredExecutor()); nestedExecutors.emplace_back(ctx->afterFuture.stealDeferredExecutor()); // Set trivial callbacks to treat the futures as consumed - ctx->thisFuture.setCallback_([](Executor::KeepAlive<>&&, Try&&) {}); - ctx->afterFuture.setCallback_([](Executor::KeepAlive<>&&, Try&&) {}); + ctx->thisFuture.setCallback_(variadic_noop); + ctx->afterFuture.setCallback_(variadic_noop); futures::detail::getDeferredExecutor(fut)->setNestedExecutors( std::move(nestedExecutors)); return fut;