We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e36aa1 commit 7d949eeCopy full SHA for 7d949ee
llvm/include/llvm/Support/FormatVariadicDetails.h
@@ -66,13 +66,10 @@ template <class T> class has_FormatProvider {
66
typedef void (*Signature_format)(const Decayed &, llvm::raw_ostream &,
67
StringRef);
68
69
- template <typename U>
70
- static char test(SameType<Signature_format, &U::format> *);
71
-
72
- template <typename U> static double test(...);
+ template <typename U> using check = SameType<Signature_format, &U::format>;
73
74
- static bool const value =
75
- (sizeof(test<llvm::format_provider<Decayed>>(nullptr)) == 1);
+ static constexpr bool value =
+ llvm::is_detected<check, llvm::format_provider<Decayed>>::value;
76
};
77
78
// Test if raw_ostream& << T -> raw_ostream& is findable via ADL.
0 commit comments