[PATCH] D74381: Fix SFINAE in JSON.h constructor.

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 07:41:28 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGdd11c8fb0d07: Fix SFINAE in JSON.h constructor. (authored by jlebar).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74381/new/

https://reviews.llvm.org/D74381

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


Index: llvm/include/llvm/Support/JSON.h
===================================================================
--- llvm/include/llvm/Support/JSON.h
+++ llvm/include/llvm/Support/JSON.h
@@ -354,7 +354,7 @@
   }
   // 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)) {}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74381.243870.patch
Type: text/x-patch
Size: 577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200211/a8adef58/attachment.bin>


More information about the llvm-commits mailing list