[PATCH] D132319: [ADT] Replace `void_t` equivalent with `std::void_t`
Joe Loser via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 20 16:56:09 PDT 2022
jloser created this revision.
jloser added reviewers: rriddle, zturner, scott.linder, dblaikie.
Herald added a project: All.
jloser requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Use `std::void_t` instead of defining our own equivalent in `STLExtras.h` now
that C++17 is available for use.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132319
Files:
llvm/include/llvm/ADT/STLExtras.h
Index: llvm/include/llvm/ADT/STLExtras.h
===================================================================
--- llvm/include/llvm/ADT/STLExtras.h
+++ llvm/include/llvm/ADT/STLExtras.h
@@ -77,12 +77,11 @@
};
namespace detail {
-template <typename...> using void_t = void;
template <class, template <class...> class Op, class... Args> struct detector {
using value_t = std::false_type;
};
template <template <class...> class Op, class... Args>
-struct detector<void_t<Op<Args...>>, Op, Args...> {
+struct detector<std::void_t<Op<Args...>>, Op, Args...> {
using value_t = std::true_type;
};
} // end namespace detail
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132319.454261.patch
Type: text/x-patch
Size: 630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220820/405a366a/attachment.bin>
More information about the llvm-commits
mailing list