Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions llvm/include/llvm/Support/FormatVariadicDetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,10 @@ template <class T> class has_FormatProvider {
typedef void (*Signature_format)(const Decayed &, llvm::raw_ostream &,
StringRef);

template <typename U>
static char test(SameType<Signature_format, &U::format> *);

template <typename U> static double test(...);
template <typename U> using check = SameType<Signature_format, &U::format>;

static bool const value =
(sizeof(test<llvm::format_provider<Decayed>>(nullptr)) == 1);
static constexpr bool value =
llvm::is_detected<check, llvm::format_provider<Decayed>>::value;
};

// Test if raw_ostream& << T -> raw_ostream& is findable via ADL.
Expand Down
Loading