[llvm] 99694a5 - [ADT] Replace `void_t` equivalent with `std::void_t`

Joe Loser via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 21 09:38:12 PDT 2022


Author: Joe Loser
Date: 2022-08-21T10:37:38-06:00
New Revision: 99694a5d1df4ebe83eb4863f14c6354c115ca1d8

URL: https://github.com/llvm/llvm-project/commit/99694a5d1df4ebe83eb4863f14c6354c115ca1d8
DIFF: https://github.com/llvm/llvm-project/commit/99694a5d1df4ebe83eb4863f14c6354c115ca1d8.diff

LOG: [ADT] Replace `void_t` equivalent with `std::void_t`

Use `std::void_t` instead of defining our own equivalent in `STLExtras.h` now
that C++17 is available for use.

Differential Revision: https://reviews.llvm.org/D132319

Added: 
    

Modified: 
    llvm/include/llvm/ADT/STLExtras.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
index 4a72e9be2b5b..3d914d71bcd3 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -77,12 +77,11 @@ template <typename T> struct make_const_ref {
 };
 
 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


        


More information about the llvm-commits mailing list