• Alexey Spiridonov's avatar
    Add a tag type for in-place construction · 7c4e381e
    Alexey Spiridonov authored
    Summary: Without this tag type, it's impossible to use `Synchronized` with types like:
    
    ```
    struct A {
      A(int, const char*);
      A(const A&) = delete;
      A& operator=(const A&) = delete;
      A(A&&) = delete;
      A& operator=(A&&) = delete;
    };
    ```
    
    In-place construction solves this problem. Usage:
    
    ```
    Synchronized a(construct_in_place, 5, "c");
    ```
    
    Reviewed By: nbronson
    
    Differential Revision: D2610071
    
    fb-gh-sync-id: 251fe8f8f6a2d7484dda64cf04dcacb998145230
    7c4e381e
SynchronizedTest.cpp 3.23 KB