From: Christopher Dykes Date: Sun, 4 Jun 2017 19:04:28 +0000 (-0700) Subject: Don't explicitly disable the C++1y-extensions warning in ForEach-inl and WhenN-inl X-Git-Tag: v2017.06.05.00^0 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=356d04f62398d99dbcd4bc89a35941b4020c8f04;p=folly.git 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 --- 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 } });