#include <folly/Likely.h>
#include <folly/Portability.h>
#include <folly/Preprocessor.h>
-#include <folly/Traits.h> // for construct_in_place_t
+#include <folly/Traits.h> // for in_place_t
#include <folly/Unit.h>
#define FOLLY_EXPECTED_ID(X) FB_CONCATENATE(FB_CONCATENATE(Folly, X), __LINE__)
/**
* Lets you construct non-movable types in-place. Use the constexpr
- * instance `construct_in_place` as the first argument.
+ * instance `in_place` as the first argument.
*/
template <typename... Args>
- explicit Synchronized(construct_in_place_t, Args&&... args)
+ explicit Synchronized(in_place_t, Args&&... args)
: datum_(std::forward<Args>(args)...) {}
/**
return {};
}
-// For backwards compatibility:
-using construct_in_place_t = in_place_t;
-
-inline traits_detail::InPlaceTag construct_in_place(
- traits_detail::InPlaceTag = {}) {
- return {};
-}
-
/**
* Initializer lists are a powerful compile time syntax introduced in C++11
* but due to their often conflicting syntax they are not used by APIs for
};
template <class Mutex> void testInPlaceConstruction() {
- // This won't compile without construct_in_place
- folly::Synchronized<NotCopiableNotMovable> a(
- folly::construct_in_place, 5, "a"
- );
+ // This won't compile without in_place
+ folly::Synchronized<NotCopiableNotMovable> a(folly::in_place, 5, "a");
}
}
}