[llvm] dd11c8f - Fix SFINAE in JSON.h constructor.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 07:39:06 PST 2020


Author: Justin Lebar
Date: 2020-02-11T07:38:42-08:00
New Revision: dd11c8fb0d07b346b8eaba5a023d58203c367041

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

LOG: Fix SFINAE in JSON.h constructor.

Summary:
This used std::enable_if without referencing ::type.  Changed to use
std::enable_if_t.

Subscribers: llvm-commits

Tags: #llvm

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

Added: 
    

Modified: 
    llvm/include/llvm/Support/JSON.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/JSON.h b/llvm/include/llvm/Support/JSON.h
index f0bab51ad4d9..ad746b62c2a3 100644
--- a/llvm/include/llvm/Support/JSON.h
+++ b/llvm/include/llvm/Support/JSON.h
@@ -354,7 +354,7 @@ class Value {
   }
   // Serializable types: with a toJSON(const T&)->Value function, found by ADL.
   template <typename T,
-            typename = typename std::enable_if<std::is_same<
+            typename = std::enable_if_t<std::is_same<
                 Value, decltype(toJSON(*(const T *)nullptr))>::value>,
             Value * = nullptr>
   Value(const T &V) : Value(toJSON(V)) {}


        


More information about the llvm-commits mailing list