Skip to content

Commit 7ab98de

Browse files
r-barnesmeta-codesync[bot]
authored andcommitted
Migrate remaining folly::void_t callers to std::void_t
Summary: Replace `folly::void_t` with `std::void_t` in the remaining leaf callers outside of `folly` itself, and drop `fbsystrace`'s private verbatim copy of folly's `void_t` in favor of the standard one. See the base of this stack for why `std::void_t` is a behavior-preserving replacement: the [CWG 1558](http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1558) defect motivating folly's implementation has been resolved and is implemented correctly by GCC, Clang, and MSVC. `FBIsNullaryCallableButNotObjCBlock.h` only mentioned `folly::void_t` in a comment; the reference is updated for accuracy. `#include <folly/Traits.h>` is dropped from `RouteHandleTestUtil.h` and `TypedIdentifierTest.cpp`, which no longer use anything from it. Differential Revision: D115143902 fbshipit-source-id: 8c29c3895a60cc8b75332624411a8297ca075e78
1 parent 7e20016 commit 7ab98de

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

mcrouter/lib/test/RouteHandleTestUtil.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
#include <memory>
1111
#include <string>
12+
#include <type_traits>
1213
#include <vector>
1314

1415
#include <folly/Optional.h>
15-
#include <folly/Traits.h>
1616
#include <folly/fibers/FiberManager.h>
1717
#include <folly/fibers/SimpleLoopController.h>
1818
#include <folly/fibers/WhenN.h>
@@ -346,7 +346,7 @@ struct RecordingRoute {
346346
template <typename T>
347347
struct has_app_error<
348348
T,
349-
folly::void_t<decltype(std::declval<T>().appSpecificErrorCode_ref())>>
349+
std::void_t<decltype(std::declval<T>().appSpecificErrorCode_ref())>>
350350
: std::true_type {};
351351

352352
template <
@@ -364,9 +364,7 @@ struct RecordingRoute {
364364
template <typename T, typename = void>
365365
struct has_exptime : std::false_type {};
366366
template <typename T>
367-
struct has_exptime<
368-
T,
369-
folly::void_t<decltype(std::declval<T>().exptime_ref())>>
367+
struct has_exptime<T, std::void_t<decltype(std::declval<T>().exptime_ref())>>
370368
: std::true_type {};
371369

372370
template <

0 commit comments

Comments
 (0)