Skip to content

Commit 867585c

Browse files
committed
Remove now-unused fly::detail::BasicFormatTraits
1 parent 2b27531 commit 867585c

File tree

1 file changed

+0
-68
lines changed

1 file changed

+0
-68
lines changed

fly/types/string/detail/string_traits.hpp

-68
Original file line numberDiff line numberDiff line change
@@ -108,72 +108,4 @@ struct BasicStringTraits
108108
inline static constexpr bool is_string_like_v = is_string_like<T>::value;
109109
};
110110

111-
/**
112-
* Traits for basic properties of format parameters.
113-
*
114-
* @author Timothy Flynn ([email protected])
115-
* @version February 5, 2021
116-
*/
117-
struct BasicFormatTraits
118-
{
119-
/**
120-
* Trait to determine if a specialization of fly::Formatter<T, CharType> is defined for a type,
121-
* and implements a format(T, FormatContext) method.
122-
*/
123-
template <typename FormatContext, typename T>
124-
using formatter =
125-
decltype(std::declval<typename FormatContext::template formatter_type<T>>().format(
126-
std::declval<T>(),
127-
std::declval<FormatContext>));
128-
129-
template <typename FormatContext, typename T>
130-
using has_formatter = fly::is_declared<formatter, FormatContext, T>;
131-
132-
template <typename FormatContext, typename T>
133-
static inline constexpr bool has_formatter_v = has_formatter<FormatContext, T>::value;
134-
135-
/**
136-
* Trait to classify a type as a pointer (excluding C-string types).
137-
*/
138-
template <typename T, typename U = std::remove_cvref_t<T>>
139-
using is_pointer = std::conjunction<
140-
std::disjunction<std::is_pointer<U>, std::is_null_pointer<U>>,
141-
std::negation<detail::is_like_supported_string<T>>>;
142-
143-
template <typename T>
144-
static inline constexpr bool is_pointer_v = is_pointer<T>::value;
145-
146-
/**
147-
* Trait to classify a type as an integer, excluding boolean types.
148-
*/
149-
template <typename T, typename U = std::remove_cvref_t<T>>
150-
using is_integral = std::conjunction<std::is_integral<U>, std::negation<std::is_same<U, bool>>>;
151-
152-
template <typename T>
153-
static inline constexpr bool is_integral_v = is_integral<T>::value;
154-
155-
/**
156-
* Trait to classify a type as an integer, excluding character and boolean types.
157-
*/
158-
template <typename T>
159-
using is_integer = std::conjunction<is_integral<T>, std::negation<is_supported_character<T>>>;
160-
161-
template <typename T>
162-
static inline constexpr bool is_integer_v = is_integer<T>::value;
163-
164-
/**
165-
* Trait to classify a type as a user-defined type.
166-
*/
167-
template <typename T, typename U = std::remove_cvref_t<T>>
168-
using is_user_defined = std::negation<std::disjunction<
169-
detail::is_like_supported_string<T>,
170-
is_pointer<T>,
171-
is_integral<T>,
172-
std::is_floating_point<T>,
173-
std::is_same<T, bool>>>;
174-
175-
template <typename T>
176-
static inline constexpr bool is_user_defined_v = is_user_defined<T>::value;
177-
};
178-
179111
} // namespace fly::detail

0 commit comments

Comments
 (0)