From 356d04f62398d99dbcd4bc89a35941b4020c8f04 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Sun, 4 Jun 2017 12:04:28 -0700 Subject: [PATCH] Don't explicitly disable the C++1y-extensions warning in ForEach-inl and WhenN-inl Summary: We are fully on C++14 now, so these warnings should never be firing. Reviewed By: yfeldblum Differential Revision: D5179124 fbshipit-source-id: 31c6ddbce5c45b60fe73990f49d65ac95d17fe87 --- folly/fibers/ForEach-inl.h | 7 ------- folly/fibers/WhenN-inl.h | 14 -------------- 2 files changed, 21 deletions(-) diff --git a/folly/fibers/ForEach-inl.h b/folly/fibers/ForEach-inl.h index 10a7f981..b6f06247 100644 --- a/folly/fibers/ForEach-inl.h +++ b/folly/fibers/ForEach-inl.h @@ -49,10 +49,6 @@ inline void forEach(InputIterator first, InputIterator last, F&& f) { std::exception_ptr e; Baton baton; -#ifdef __clang__ -#pragma clang diagnostic push // ignore generalized lambda capture warning -#pragma clang diagnostic ignored "-Wc++1y-extensions" -#endif auto taskFunc = [&tasksTodo, &e, &f, &baton](size_t id, FuncType&& func) { return [ id, @@ -72,9 +68,6 @@ inline void forEach(InputIterator first, InputIterator last, F&& f) { } }; }; -#ifdef __clang__ -#pragma clang diagnostic pop -#endif auto firstTask = first; ++first; diff --git a/folly/fibers/WhenN-inl.h b/folly/fibers/WhenN-inl.h index 160301c1..66b30042 100644 --- a/folly/fibers/WhenN-inl.h +++ b/folly/fibers/WhenN-inl.h @@ -53,10 +53,6 @@ collectN(InputIterator first, InputIterator last, size_t n) { await([first, last, context](Promise promise) mutable { context->promise = std::move(promise); for (size_t i = 0; first != last; ++i, ++first) { -#ifdef __clang__ -#pragma clang diagnostic push // ignore generalized lambda capture warning -#pragma clang diagnostic ignored "-Wc++1y-extensions" -#endif addTask([ i, context, f = std::move(*first) ]() { try { auto result = f(); @@ -74,9 +70,6 @@ collectN(InputIterator first, InputIterator last, size_t n) { context->promise->setValue(); } }); -#ifdef __clang__ -#pragma clang diagnostic pop -#endif } }); @@ -114,10 +107,6 @@ collectN(InputIterator first, InputIterator last, size_t n) { await([first, last, context](Promise promise) mutable { context->promise = std::move(promise); for (size_t i = 0; first != last; ++i, ++first) { -#ifdef __clang__ -#pragma clang diagnostic push // ignore generalized lambda capture warning -#pragma clang diagnostic ignored "-Wc++1y-extensions" -#endif addTask([ i, context, f = std::move(*first) ]() { try { f(); @@ -135,9 +124,6 @@ collectN(InputIterator first, InputIterator last, size_t n) { context->promise->setValue(); } }); -#ifdef __clang__ -#pragma clang diagnostic pop -#endif } }); -- 2.34.1