1. 24 Jan, 2019 1 commit
    • Stepan Palamarchuk's avatar
      Change T_CHECK_TIMEOUT and T_CHECK_TIME_LT to fail tests instead of skipping them · c612fab5
      Stepan Palamarchuk authored
      Summary:
      Most of the tests that use this macro, use it to ensure proper behavior of time-related logic (i.e. timeout didn't fire too early/late). Skipping them, simply masks a failure. The underlying utility already takes care of lags due to scheduling, so whenever this check fails - means we have a bug.
      
      In particular, we have 3 tests for HHWheelTimer that are always skipped, because their tolerance is below the expected lag of HHWheelTimer (it always rounds up, so we should expect +1ms always).
      
      Reviewed By: vitaut
      
      Differential Revision: D13746558
      
      fbshipit-source-id: 78f954f52414e640af92e5bb50790135cdd89a92
      c612fab5
  2. 23 Jan, 2019 2 commits
    • Lara Lu's avatar
      fix coro example in readme · 8f7f677d
      Lara Lu authored
      Summary: was reading coro example and i think a line is missing
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D13788989
      
      fbshipit-source-id: ceb024a36ddd89369ee25f6632fce8d339c489cb
      8f7f677d
    • Yedidya Feldblum's avatar
      Tweak deletion of fbstring::operator= taking convertible-to char · 8946c3b5
      Yedidya Feldblum authored
      Summary: [Folly] Tweak deletion of `fbstring::operator=` taking convertible-to `char`.
      
      Reviewed By: Orvid
      
      Differential Revision: D13747744
      
      fbshipit-source-id: f254f13a15cb0e72120d1d02f4c8893a788e429a
      8946c3b5
  3. 22 Jan, 2019 4 commits
    • Adam Simpkins's avatar
      add a test case for SCOPE_FAIL with std::rethrow_exception() · 5f99ab65
      Adam Simpkins authored
      Summary:
      Make sure SCOPE_FAIL works with std::rethrow_exception().
      
      When compiled with older versions of gcc this code would fail due to a gcc
      bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62258
      The gcc bug was fixed in 4.9.4, 5.3, and the 6.0 branch.
      
      Reviewed By: meyering
      
      Differential Revision: D3280778
      
      fbshipit-source-id: 8fe1a9c1dc3ada61c8ebd7318538ae959b29a6b1
      5f99ab65
    • David Goldblatt's avatar
      ReadMostlyMainPtr: Add a stress test. · e9eae3ac
      David Goldblatt authored
      Summary:
      The other tests are either simple API tests for single-threaded cases, or a
      benchmark.
      
      Reviewed By: djwatson
      
      Differential Revision: D13678336
      
      fbshipit-source-id: 5aba91879d756097f42d245b5d318ad7c945dfeb
      e9eae3ac
    • Aaryaman Sagar's avatar
      Add unique_lock construction utility · fde4f26f
      Aaryaman Sagar authored
      Summary:
      Until C++17 constructor type deduction becomes a thing, we can use this
      instead to mimic unique_lock construction without having to specify the type
      of the mutex explicitly.
      
      ```
      auto lck = folly::make_unique_lock(mutex);
      
      // as opposed to
      
      auto lck = std::unique_lock<MutexType>{mutex};
      ```
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D10386999
      
      fbshipit-source-id: 0780a6d1769597a3888305248bcdf93a84c9f9ee
      fde4f26f
    • Xiao Shi's avatar
      document the non-standard compliance of `erase()` · d6ab7bcd
      Xiao Shi authored
      Summary: See F14.md changes.
      
      Reviewed By: nbronson
      
      Differential Revision: D13722323
      
      fbshipit-source-id: 70c68442cad56efc84bb29f0b694a7b71f837cbd
      d6ab7bcd
  4. 21 Jan, 2019 1 commit
    • Aaryaman Sagar's avatar
      Add unique_lock and lock_guard support for DistributedMutex · 541198dc
      Aaryaman Sagar authored
      Summary:
      This adds support for the Lockable concept for DistributedMutex through a
      unique_lock specialization.  There is also a corresponding lock_guard
      specialization.  This should cover 95% of usecases very well.  The other 5%
      should probably consider using std::unique_lock, std::lock_guard or
      folly::Synchronized
      
      Note that std::unique_lock and std::lock_guard can be specialized.  The
      standard does not explicitly prevent specializations for these classes as long
      as the specializations are dependent on user-defined classes.  This makes it
      ok for us to specialize these two interfaces for our folly mutexes.  See the
      quoted paragraph below
      
      Section §[namespace.std]
      
      > A program may add a template specialization for any standard library
      > template to namespace std only if the declaration depends on a user-defined
      > type and the specialization meets the standard library requirements for the
      > original template and is not explicitly prohibited.
      
      The generic lockable wrappers that implement the std::unique_lock and
      std::lock_guard interfaces are present in
      folly/synchronization/detail/ProxyLockable.h.  The specializations of
      std::unique_lock and std::lock_guard in namespace std use these
      implementations.  This allows us to stick with a simple specialization for our
      mutex, which is well-defined per the paragraph above
      
      Reviewed By: djwatson
      
      Differential Revision: D10377227
      
      fbshipit-source-id: 9f2c50ff5732714c83a79752f58c792e6b2a5e88
      541198dc
  5. 19 Jan, 2019 3 commits
    • Stepan Palamarchuk's avatar
      Use std::array instead of std::vector for bitmap · 0f1c675a
      Stepan Palamarchuk authored
      Summary: The size of the vector is essentially 4, there's no point of allocating it on heap. This improves locality and avoids unnecessary indirection.
      
      Reviewed By: jmswen
      
      Differential Revision: D13709524
      
      fbshipit-source-id: 76c80b835a73ec8f7f5096ae927292571d137596
      0f1c675a
    • Maged Michael's avatar
      Add test that LifoSemMPMCQueue::add does not throw when queue is not full · f08d42c0
      Maged Michael authored
      Summary:
      Add test to ThreadPoolTest that LifoSemMPMCQueue::add does not throw when queue is not full.
      
      The test fails before changing LifoSemMPMCQueue::add to use MPMCQueue::writeIfNotFull instead of MPMCQueue::write,and passes after the change.
      
      Reviewed By: djwatson
      
      Differential Revision: D13722155
      
      fbshipit-source-id: 09e296f18eba5c3a78734284b5e409cf006951cc
      f08d42c0
    • Maged Michael's avatar
      LifoSemMPMCQueue: Throw only when queue is full not when consumer is in progress. · d5be302c
      Maged Michael authored
      Summary:
      This change ensures that LifoSemMPMCQueue and PriorityLifoSemMPMCQueue do not throw unless the queue is full.
      
      Before this change it was possible for an add operation to throw even when the queue is not full, if a consumer operation is delayed while in progress.
      
      Example:
      Queue of size N.
      T1: Producer completes N add operations.
      T2: Consumer starts a take operation and gets delayed.
      T3: Consumer completes N-1 take operations.
      T1: Tries an add operation. If using MPMCQueue::write (which returns false) throws even though the queue is not full (has N-1 empty slots). If using MPMCQueue::writeIfNotFull() returns true after waiting for T2's take to complete.
      
      This is somewhat similar to BugD3527722.
      
      Reviewed By: djwatson
      
      Differential Revision: D13701978
      
      fbshipit-source-id: a799353c41d0dc6e673b5fe0ad2a64fd5440fbe8
      d5be302c
  6. 18 Jan, 2019 8 commits
    • Joe Loser's avatar
      Use <random> instead of boost/random (#1000) · 4ab37c83
      Joe Loser authored
      Summary:
      - Use `std::mt19937` instead of `boost::random::mt19937`.
      - Use `std::uniform_int_distribution` instead of `boost::uniform_int`.
      Pull Request resolved: https://github.com/facebook/folly/pull/1000
      
      Reviewed By: aary
      
      Differential Revision: D13729752
      
      Pulled By: yfeldblum
      
      fbshipit-source-id: 26828c157c458e56ce225af25e2a96890f0633ab
      4ab37c83
    • Yedidya Feldblum's avatar
      SingletonRelaxedCountable · d9e3b6cc
      Yedidya Feldblum authored
      Summary: [Folly] `SingletonRelaxedCountable`, a convenience API around `SingletonRelaxedCounter` for counting instances of a type.
      
      Reviewed By: ovoietsa
      
      Differential Revision: D13686867
      
      fbshipit-source-id: b2f7673e7e88c473337f66901c3e787d35eca6c6
      d9e3b6cc
    • Joe Loser's avatar
      Remove workaround for lack of std::atomic_init (#996) · 05c10a5b
      Joe Loser authored
      Summary:
      - Since GCC 5 and later has `std::atomic_init`, remove the workaround
        present in `Tearable.h` to default initialize atomic variables.
      - Default initialization of atomics do not work as you would expect. See
        http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0883r0.pdf
        for the explanation why.
      - To get around the default initialization issue, we just call
        `std::atomic_init` for each element in the array of atomics.
      Pull Request resolved: https://github.com/facebook/folly/pull/996
      
      Reviewed By: LeeHowes
      
      Differential Revision: D13648263
      
      Pulled By: yfeldblum
      
      fbshipit-source-id: 6f3c84089f9158bc5c0ad5efac13d49ef69f1770
      05c10a5b
    • Andrii Grynenko's avatar
      Basic co_bt gdb script for coro::Task · 960bd857
      Andrii Grynenko authored
      Summary:
      This is mostly a POC. It will probably fail in some cases, but it's better than nothing.
      Sample output:
        (gdb) co_bt this
        0x292d70 <zero()>
        0x293f50 <one()>
        0x295050 <two()>
        0x296150 <three()>
        0x297250 <folly::coro::TaskWithExecutor<int>::start() &&::{lambda(folly::Promise<int>, folly::coro::TaskWithExecutor<int>)#1}::operator()(folly::Promise<int>, folly::coro::TaskWithExecutor<int>) const>
      
      Reviewed By: jwiepert
      
      Differential Revision: D13727139
      
      fbshipit-source-id: bff98eb4f5eb2ebd73c880d3b525172782f87511
      960bd857
    • Aaryaman Sagar's avatar
      Backport std::bit_cast · 93173f5a
      Aaryaman Sagar authored
      Summary: Backport `std::bit_cast` from C++20.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13705428
      
      fbshipit-source-id: a4b284563be67bec3fe4ddb54fed299650458d30
      93173f5a
    • Alex Guzman's avatar
      Disable renegotiation in OpenSSL 1.1.x · b1fd4e1a
      Alex Guzman authored
      Summary: Adds option to wangle's SSLContextManager to disable renegotiation explicitly and makes folly's AsyncSSLSocket report rejected renegotiations from 1.1.x
      
      Reviewed By: siyengar
      
      Differential Revision: D13633405
      
      fbshipit-source-id: 2b0fc5af4a12795efb52795d64b18b7b6c87e334
      b1fd4e1a
    • Alex Guzman's avatar
      Don't call SSL_shutdown when SSL_accept is pending · 2ea73e0b
      Alex Guzman authored
      Summary: As it says on tin.
      
      Reviewed By: knekritz
      
      Differential Revision: D13144407
      
      fbshipit-source-id: 8fc69f9005ca54c2fb82b501547de2aaa892c1fa
      2ea73e0b
    • Caleb Marchent's avatar
      Build executor Cython extension (#992) · 2bacf890
      Caleb Marchent authored
      Summary:
      setup.py to create folly Cython bindings
      
      Minimum required to get fbthrift to compile in OSS, so only includes executor
      
      Cython requires that source files (pyx and pxd) are in a directory matching the extension name, to provide this a tree of symbolic links is created and the Cython compile happens in that directory.
      
        - Python3 > 3.6 available?
        - Cython installed?
      Pull Request resolved: https://github.com/facebook/folly/pull/992
      
      Reviewed By: simpkins
      
      Differential Revision: D13716102
      
      Pulled By: calebmarchent
      
      fbshipit-source-id: 5fb285b0b43e8b6d1774fa4b6f2525c327cbcc7e
      2bacf890
  7. 17 Jan, 2019 2 commits
    • Andrii Grynenko's avatar
      Add README · 96f51113
      Andrii Grynenko authored
      Reviewed By: lewissbaker
      
      Differential Revision: D13706612
      
      fbshipit-source-id: a7c604dbb9216430cc30d63a7fe78530afad585c
      96f51113
    • Andrii Grynenko's avatar
      Fix a race in TLRefCount · 8757861f
      Andrii Grynenko authored
      Summary:
      After count_.store was done it's possible that the thread performing collect observed the value, and then it successfully decremented the counter to 0 and destroyed TLRefCount. The rest of the code in update method then couldn't safely assume that the TLRefCount object is still alive.
      This fixes collect to actually wait for update to complete (if we detect that we actually captured the new value written by such update).
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D13696608
      
      fbshipit-source-id: bd1a69ea3cc005b90ff481705fdffb83d8a9077a
      8757861f
  8. 16 Jan, 2019 6 commits
    • Stepan Palamarchuk's avatar
      Use HHWheelTimer in the FiberManager · f7548ce4
      Stepan Palamarchuk authored
      Summary:
      Currently, fibers library has its own class for managing timeouts - TimeoutController. It's optimized for the case when the set of timeouts is fixed and its size is not large. However, it's not efficient when that's not the case (see the benchmark). Since we're starting to use fibers in Thrift, we'll need to make sure that the underlying timeouts management is efficient for unbounded cases.
      
      This kills `TimeoutController` and switches FiberManager to use `HHWheelTimer` from the underlying LoopController (which is in general EventBase).
      
      One important note is that `HHWheelTimer` is **not exact** it rounds up timeouts to the 10ms boundary, so this **will slightly change the behavior**.
      
      The results of FibersBenchmark before & after:
      
      Before:
      ```
      ============================================================================
      folly/fibers/test/FibersBenchmark.cpp           relative  time/iter  iters/s
      ============================================================================
      FiberManagerCancelledTimeouts_Single_300                    16.34ms    61.18
      FiberManagerCancelledTimeouts_Five                          17.54ms    57.00
      FiberManagerCancelledTimeouts_TenThousand                  252.06ms     3.97
      ============================================================================
      ```
      
      After:
      ```
      ============================================================================
      folly/fibers/test/FibersBenchmark.cpp           relative  time/iter  iters/s
      ============================================================================
      FiberManagerCancelledTimeouts_Single_300                    22.75ms    43.95
      FiberManagerCancelledTimeouts_Five                          21.12ms    47.34
      FiberManagerCancelledTimeouts_TenThousand                   19.13ms    52.27
      ============================================================================
      ```
      
      This shows that with HHWheelTimer, throughput is unaffected by the number of different values used.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D13613830
      
      fbshipit-source-id: 7b4662d308a9e1ef232672338a78b79efba46172
      f7548ce4
    • Nick Sukhanov's avatar
      Other approach to fix issues with double comparisons · 3364055a
      Nick Sukhanov authored
      Summary:
      So it seems that my previous approach doesn't solve the issue completely, we are still seeing these errors, because std::numeric_limits<T>::epsilon() precision is not enough. We can do a different epsilon i.e 1e-6 but it will probably create other problems when values are very big or very small.
      
      I've read about how to do a proper comparison here: https://www.boost.org/doc/libs/1_66_0/libs/test/doc/html/boost_test/testing_tools/extended_comparison/floating_point/floating_points_comparison_theory.html
      but this seems to bee too complicated and slow to introduce relative error comparisons here.
      
      So I decided that we shouldn't do this comparison for floating types at all, because it doesn't make much sense, because we are trying to capture integer overflow with these guards.
      
      Example:
      "E0116 06:30:24.439344 3368082 Histogram.h:233] Called: lhs: 3.999999999999005240 rhs:4.000000000000000000 eps: 0.000000000000000222 diff: 0.000000000000994760"
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13693535
      
      fbshipit-source-id: e3e7dafa4517612c63bc8e22b62eeeb053677cb8
      3364055a
    • Joe Loser's avatar
      Update README to reflect min supported GCC version (#997) · 49ec4f6d
      Joe Loser authored
      Summary:
      - Folly no longer guarantees support for GCC 4.9.
      - It is only tested with GCC 5.1 or later, so update the `README` to
        reflect that.
      Pull Request resolved: https://github.com/facebook/folly/pull/997
      
      Reviewed By: markisaa
      
      Differential Revision: D13648256
      
      Pulled By: yfeldblum
      
      fbshipit-source-id: c694ea0af0c63bd4ec16eb2a8a3e2d95b5801f4d
      49ec4f6d
    • Dan Melnic's avatar
      Allocate the IOBuf object and the SharedInfo in a single memory allocation · 92bb5d8e
      Dan Melnic authored
      Summary: Allocate the IOBuf object and the SharedInfo in a single memory allocation
      
      Reviewed By: yfeldblum, simpkins
      
      Differential Revision: D13580880
      
      fbshipit-source-id: cde0eb48c00b9310d0540edb4a9c2d64d6f44a5d
      92bb5d8e
    • Joe Loser's avatar
      Use _t variants of type traits (#994) · a8ada31a
      Joe Loser authored
      Summary:
      - Instead of wrapping a type trait with `_t` use the standard library's
        `_t` type trait variant. This is safe since Folly requires C++14,
        whereas previously the use of `_t` was supported prior to C++14.
      Pull Request resolved: https://github.com/facebook/folly/pull/994
      
      Reviewed By: vitaut
      
      Differential Revision: D13634598
      
      Pulled By: yfeldblum
      
      fbshipit-source-id: 09ed9fc1444f507b7422b690b36926cb57616e9e
      a8ada31a
    • David Goldblatt's avatar
      AtomicReadMostlyMainPtr: add a DCHECK. · 349b2329
      David Goldblatt authored
      Summary:
      Previously this was just a comment that we documented; but it's easy to check
      it directly.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13678337
      
      fbshipit-source-id: 24990a732a2cc0019e90e294603bb8254a5cbc37
      349b2329
  9. 15 Jan, 2019 5 commits
    • Andrew Hall's avatar
      Add free function accessor · cef3decf
      Andrew Hall authored
      Summary: Adds an accessor for the free function.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13648280
      
      fbshipit-source-id: ca92054b88b27569d6afec2ed4d1bd68351857cc
      cef3decf
    • Giuseppe Ottaviano's avatar
      Implement inverted layout in EliasFanoCoding · 01ed0e7d
      Giuseppe Ottaviano authored
      Summary: In some cases we want to prefetch the upper bits first.
      
      Reviewed By: philippv, luciang
      
      Differential Revision: D13663518
      
      fbshipit-source-id: c69fe4740fb96f3e9d448410cdf9c4a6edbb6c30
      01ed0e7d
    • Jason Fried's avatar
      improve optionals and futures. · 6890c57a
      Jason Fried authored
      Summary:
      Add and assign to options bindings.
      Add a isReady to future bindings
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13667465
      
      fbshipit-source-id: 8522ef59d7d262cc13dc9f9940c37b7a0b65870c
      6890c57a
    • Andrii Grynenko's avatar
      Use dummy KeepAlive for nested Tasks · c01f0afd
      Andrii Grynenko authored
      Reviewed By: lewissbaker
      
      Differential Revision: D13658986
      
      fbshipit-source-id: af03f4e2edea93371fc37773f2fea152f7c589f8
      c01f0afd
    • Yedidya Feldblum's avatar
      Exclude folly/external/ from clang-format · 5c8439f9
      Yedidya Feldblum authored
      Summary: [Folly] Exclude `folly/external/` from `clang-format`.
      
      Reviewed By: igorsugak
      
      Differential Revision: D13666741
      
      fbshipit-source-id: cdf95ea85f7f21ca580888aa44983b1fb405fc09
      5c8439f9
  10. 14 Jan, 2019 8 commits
    • Andrii Grynenko's avatar
      Use Executor::KeepAlive in coro::Task · 7c6897aa
      Andrii Grynenko authored
      Reviewed By: lewissbaker
      
      Differential Revision: D13657174
      
      fbshipit-source-id: afdda6abf02cb9e10b8696e1d81e9c2881521788
      7c6897aa
    • Lewis Baker's avatar
      Add folly::CancellationToken · 25374a6a
      Lewis Baker authored
      Summary:
      Adds a general-purpose CancellationToken abstraction that can be used to build APIs that allow the caller to pass in a CancellationToken that the caller can later use to communicate a request to cancel the operation.
      
      An operation can either poll for cancellation by calling the isCancellationRequested() method or can register for notification of a cancellation request by attaching a callback to the CancellationToken using the CancellationCallback class.
      
      The caller first constructs a CancellationSource, which allows them to request cancellation, and uses the CancellationSource to obtain CancellationToken objects which it can then pass into cancellable functions.
      
      This implementation is based on the reference implementation for the  interrupt_token/stop_token abstraction proposed for C++20.
      
      ```
      void polling_operation(folly::CancellationToken ct)
      {
        while (!ct.isCancellationRequested())
        {
          do_work();
        }
      }
      
      void blocking_operation(folly::CancellationToken ct)
      {
        folly::Baton baton;
      
        // Register a callback.
        folly::CancellationCallback cb{ct, [&] { baton.post(); }};
      
        // Blocks until cancelled.
        baton.wait();
      }
      
      void caller()
      {
        CancellationSource src;
        std::thread t1{ [&] {
          polling_operation(src.getToken());
          } };
        std::thread t2{ [&] {
          blocking_operation(src.getToken());
          } };
        std::this_thread::sleep_for(1s);
        src.requestCancellation();
        t1.join();
        t2.join();
      }
      ```
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D10522066
      
      fbshipit-source-id: 11ad3c104eda6650d11081485509981c9b1ea110
      25374a6a
    • Nick Sukhanov's avatar
      Added comparison with tolerance for doubles. · 51635047
      Nick Sukhanov authored
      Summary:
      We were generating a lot of errors because of false positives when compare double.
      
      This diffs is an attempt to fix this introducing comparison with tolerance for floating types.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13639839
      
      fbshipit-source-id: a81381384495c26ee176620a5f61b5c6109cf8b8
      51635047
    • Nathan Bronson's avatar
      packaging for farmhash · 6b34b1b7
      Nathan Bronson authored
      Summary:
      This diff updates the unmodified checkin of farmhash in
      folly/external/farmhash to be compatible with the folly namespaces,
      build system, and unit tests, and exposes it via folly/hash/FarmHash.h.
      The primary entry point is the function folly::hash::farmhash::Hash.
      
      Changes to the original farmhash code have been kept as small as possible
      while still removing the tests from the main hash implementation; many
      opportunities for cleanup have been skipped.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13469230
      
      fbshipit-source-id: 48dfe7d4e7d7f02ed5552b4e9e92dbad27592e45
      6b34b1b7
    • Yedidya Feldblum's avatar
      Cut unused sender_requires_from · 01f7795b
      Yedidya Feldblum authored
      Summary:
      [Folly] Cut unused `sender_requires_from`.
      
      Addresses shadowing violation under gcc5.
      
      ```
      folly/experimental/pushmi/o/extension_operators.h: In lambda function:
      folly/experimental/pushmi/o/extension_operators.h:236:381: error: declaration of 'auto:4 id' shadows a parameter [-Werror=shadow-local]
      folly/experimental/pushmi/o/extension_operators.h:236:227: note: shadowed declaration is here```
      
      Reviewed By: kirkshoop
      
      Differential Revision: D13648907
      
      fbshipit-source-id: 369bf3d0edce1065a5fe1dc2b1c20c7cdb25a0b4
      01f7795b
    • Yedidya Feldblum's avatar
      Fix folly/Poly-inl.h under gcc8 with -Wplacement-new · ed83e5fd
      Yedidya Feldblum authored
      Summary:
      [Folly] Fix `folly/Poly-inl.h` under gcc8 with `-Wplacement-new`.
      
      ```
      In file included from folly/Poly.h:1169,
                       from folly/test/PolyTest.cpp:19:
      folly/Poly-inl.h: In instantiation of 'folly::detail::PolyVal<I>::PolyVal(T&&) [with T = {anonymous}::Big_t<int>; typename std::enable_if<folly::detail::ModelsInterface<T, I>::value, int>::type <anonymous> = 0; I = folly::poly::ISemiRegular]':
      folly/Poly.h:1131:34:   required from here
      folly/Poly-inl.h:59:42: error: placement new constructing an object of type 'U' {aka '{anonymous}::Big_t<int>'} and size '40' in a region of type 'std::aligned_storage_t<16>' {aka 'std::aligned_storage<16, 16>::type'} and size '16' [-Werror=placement-new=]
      ```
      
      Reviewed By: ericniebler
      
      Differential Revision: D13648512
      
      fbshipit-source-id: 3076e7df1022dd4c3bdcc048edbfb30e8f6a99ed
      ed83e5fd
    • Yedidya Feldblum's avatar
      Fix folly/experimental/pushmi/ under gcc8 with -Wshadow · 5d53b331
      Yedidya Feldblum authored
      Summary: [Folly] Fix `folly/experimental/pushmi/` under gcc8 with `-Wshadow`.
      
      Reviewed By: ericniebler
      
      Differential Revision: D13648409
      
      fbshipit-source-id: 2d46c3a5fa3587e954cb842c2207dceb01958008
      5d53b331
    • Yedidya Feldblum's avatar
      Fix use-before-deduction in folly/experimental/pushmi/ · 9e17ee2e
      Yedidya Feldblum authored
      Summary:
      [Folly] Fix use-before-deduction in `folly/experimental/pushmi/` under gcc8.
      
      ```
      folly/experimental/pushmi/test/FlowTest.cpp: In instantiation of 'ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens)::<lambda(auto:11)>::Data::Data(Stopper) [with auto:11 = folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >; MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; Stopper = <type error>]':
      folly/experimental/pushmi/test/FlowTest.cpp:165:34:   required from 'ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)> [with auto:11 = folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >]'
      folly/experimental/pushmi/detail/functional.h:34:33:   required by substitution of 'template<class F, class ... As> decltype ((F&&)(f)((As&(folly::pushmi::invoke_fn::operator()::as))...)) folly::pushmi::invoke_fn::operator()(F&&, As&& ...) const [with F = ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>&; As = {folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >}]'
      folly/experimental/pushmi/detail/functional.h:49:228:   required by substitution of 'template<class C_> static constexpr decltype (folly::pushmi::concepts::detail::gcc_bugs((& C_::Requires_<<lambda(auto:11)>&, flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > > >))) folly::pushmi::InvocableConcept::Eval<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>&, folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > > >::impl<C_>(int) [with C_ = folly::pushmi::InvocableConcept]'
      folly/experimental/pushmi/detail/functional.h:49:649:   required from 'constexpr folly::pushmi::InvocableConcept::Eval<F, Args>::operator bool() const [with F = ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>&; Args = {folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >}]'
      folly/experimental/pushmi/detail/functional.h:49:1400:   required from 'constexpr const bool folly::pushmi::Invocable<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>&, folly::pushmi::flow_receiver<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > > >'
      folly/experimental/pushmi/flow_single_sender.h:148:82:   [ skipping 10 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
      folly/experimental/pushmi/detail/functional.h:34:33:   required by substitution of 'template<class F, class ... As> decltype ((F&&)(f)((As&(folly::pushmi::invoke_fn::operator()::as))...)) folly::pushmi::invoke_fn::operator()(F&&, As&& ...) const [with F = folly::pushmi::detail::submit_fn::fn<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >&; As = {folly::pushmi::flow_single_sender<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>, folly::pushmi::trampolineEXF>&}]'
      folly/experimental/pushmi/detail/functional.h:49:228:   required by substitution of 'template<class C_> static constexpr decltype (folly::pushmi::concepts::detail::gcc_bugs((& C_::Requires_<fn<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >&, flow_single_sender<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>, folly::pushmi::trampolineEXF>&>))) folly::pushmi::InvocableConcept::Eval<folly::pushmi::detail::submit_fn::fn<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >&, folly::pushmi::flow_single_sender<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>, folly::pushmi::trampolineEXF>&>::impl<C_>(int) [with C_ = folly::pushmi::InvocableConcept]'
      folly/experimental/pushmi/detail/functional.h:49:649:   required from 'constexpr folly::pushmi::InvocableConcept::Eval<F, Args>::operator bool() const [with F = folly::pushmi::detail::submit_fn::fn<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >&; Args = {folly::pushmi::flow_single_sender<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>, folly::pushmi::trampolineEXF>&}]'
      folly/experimental/pushmi/detail/concept_def.h:485:12:   required by substitution of 'template<class In, class Op, int (* _pushmi_concept_unique_25)[128], typename std::enable_if<(_pushmi_concept_unique_25 || (bool)((Sender<typename std::decay<_Tp>::type> && Invocable<Op&, In>))), int>::type <anonymous> > decltype(auto) folly::pushmi::operator|(In&&, Op) [with In = folly::pushmi::flow_single_sender<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:11)>, folly::pushmi::trampolineEXF>&; Op = folly::pushmi::detail::submit_fn::fn<folly::pushmi::on_value_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(int)> >, folly::pushmi::on_error_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:18)> >, folly::pushmi::on_done_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda()> >, folly::pushmi::on_starting_fn<ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]::<lambda(auto:19)> > >; int (* _pushmi_concept_unique_25)[128] = 0; typename std::enable_if<(_pushmi_concept_unique_25 || (bool)((Sender<typename std::decay<_Tp>::type> && Invocable<Op&, In>))), int>::type <anonymous> = 0]'
      folly/experimental/pushmi/test/FlowTest.cpp:208:7:   required from 'void ConcurrentFlowSingleSender::cancellation_test(std::chrono::_V2::system_clock::time_point, MakeTokens) [with MakeTokens = ConcurrentFlowSingleSender_EarlySharedCancellation_Test::TestBody()::<lambda(auto:21&, auto:22&)>; std::chrono::_V2::system_clock::time_point = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]'
      folly/experimental/pushmi/test/FlowTest.cpp:249:4:   required from here
      folly/experimental/pushmi/test/FlowTest.cpp:160:39: error: use of 'tokens' before deduction of 'auto'
      ```
      
      Reviewed By: ericniebler
      
      Differential Revision: D13648392
      
      fbshipit-source-id: 6ad0b4f60704e6eb93417e347b4b081e2c230661
      9e17ee2e