10 #ifndef LLVM_SUPPORT_FORMATVARIADIC_DETAILS_H
11 #define LLVM_SUPPORT_FORMATVARIADIC_DETAILS_H
16 #include <type_traits>
49 using Decayed =
typename std::decay<T>::type;
56 template <
typename U>
static double test(...);
59 (
sizeof(test<llvm::format_provider<Decayed>>(
nullptr)) == 1);
66 :
public std::integral_constant<
68 std::is_base_of<format_adapter,
69 typename std::remove_reference<T>::type>::value> {};
76 :
public std::integral_constant<
77 bool, !uses_format_member<T>::value && has_FormatProvider<T>::value> {
86 :
public std::integral_constant<bool,
87 !uses_format_member<T>::value &&
88 !uses_format_provider<T>::value> {};
91 typename std::enable_if<uses_format_member<T>::value,
T>::type
93 return std::forward<T>(Item);
97 typename std::enable_if<uses_format_provider<T>::value,
98 provider_format_adapter<T>>::type
103 template <
typename T>
104 typename std::enable_if<uses_missing_provider<T>::value,
105 missing_format_adapter<T>>::type
std::enable_if< uses_format_member< T >::value, T >::type build_format_adapter(T &&Item)
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.