[PATCH] D74381: Fix SFINAE in JSON.h constructor.
Justin Lebar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 20:39:02 PST 2020
jlebar created this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This used std::enable_if without referencing ::type. Changed to use
std::enable_if_t.
Repository:
rG LLVM Github Monorepo
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.243731.patch
Type: text/x-patch
Size: 577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200211/06ca2214/attachment.bin>
More information about the llvm-commits
mailing list