Skip to content

Commit 485ef98

Browse files
committed
Cleanup standard formatters
1 parent 1312b4a commit 485ef98

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

include/fmt/std.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,6 @@ auto write_escaped_alternative(OutputIt out, const T& v) -> OutputIt {
123123

124124
#if FMT_CPP_LIB_VARIANT
125125

126-
template <typename T>
127-
using variant_index_sequence =
128-
std::make_index_sequence<std::variant_size<T>::value>;
129-
130126
template <typename> struct is_variant_like_ : std::false_type {};
131127
template <typename... Types>
132128
struct is_variant_like_<std::variant<Types...>> : std::true_type {};
@@ -138,8 +134,8 @@ template <typename Variant, typename Char> class is_variant_formattable {
138134
check(std::index_sequence<Is...>);
139135

140136
public:
141-
static constexpr const bool value =
142-
decltype(check(variant_index_sequence<Variant>{}))::value;
137+
static constexpr const bool value = decltype(check(
138+
std::make_index_sequence<std::variant_size<Variant>::value>()))::value;
143139
};
144140

145141
#endif // FMT_CPP_LIB_VARIANT
@@ -318,7 +314,7 @@ template <size_t N, typename Char>
318314
struct formatter<std::bitset<N>, Char>
319315
: nested_formatter<basic_string_view<Char>, Char> {
320316
private:
321-
// This is functor because C++11 doesn't support generic lambdas.
317+
// This is a functor because C++11 doesn't support generic lambdas.
322318
struct writer {
323319
const std::bitset<N>& bs;
324320

0 commit comments

Comments
 (0)