Skip to content

Commit

Permalink
formatter::parse() returns a pointer/iterator, so it can just use aut…
Browse files Browse the repository at this point in the history
…o as the return
  • Loading branch information
danakj committed Jun 4, 2023
1 parent 9e915a7 commit 2cd7a01
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion subspace/choice/choice.h
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ struct fmt::formatter<
Tags...>;

template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return ctx.begin();
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/choice/choice_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ enum class Order {
template <class Char>
struct fmt::formatter<Order, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return ctx.begin();
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/containers/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ struct tuple_element<I, ::sus::containers::Array<T, N>> {
template <class T, size_t N, class Char>
struct fmt::formatter<::sus::containers::Array<T, N>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand Down
4 changes: 2 additions & 2 deletions subspace/containers/slice.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ using ::sus::iter::__private::end;
template <class T, class Char>
struct fmt::formatter<::sus::containers::Slice<T>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand Down Expand Up @@ -336,7 +336,7 @@ sus__format_to_stream(sus::containers, Slice, T);
template <class T, class Char>
struct fmt::formatter<::sus::containers::SliceMut<T>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/containers/vec.h
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ template <class... Ts>
template <class T, class Char>
struct fmt::formatter<::sus::containers::Vec<T>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/marker/unsafe.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ constexpr inline auto unsafe_fn = UnsafeFnMarker();
template <class Char>
struct fmt::formatter<::sus::marker::UnsafeFnMarker, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return ctx.begin();
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/mem/nonnull.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ constexpr inline __private::NonNullMarker<T> nonnull(T& t) {
template <class T, class Char>
struct fmt::formatter<::sus::mem::NonNull<T>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/num/__private/float_methods_impl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct std::equal_to<::sus::num::_self> {
template <class Char>
struct fmt::formatter<::sus::num::_self, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/num/__private/signed_integer_methods_impl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ struct std::equal_to<::sus::num::_self> {
template <class Char>
struct fmt::formatter<::sus::num::_self, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/num/__private/unsigned_integer_methods_impl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ struct std::equal_to<::sus::num::_self> {
template <class Char>
struct fmt::formatter<::sus::num::_self, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand Down
8 changes: 4 additions & 4 deletions subspace/ops/range.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ class [[sus_trivial_abi]] RangeFull final {
template <class T, class Char>
struct fmt::formatter<::sus::ops::Range<T>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand All @@ -442,7 +442,7 @@ sus__format_to_stream(sus::ops, Range, T);
template <class T, class Char>
struct fmt::formatter<::sus::ops::RangeFrom<T>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand All @@ -467,7 +467,7 @@ sus__format_to_stream(sus::ops, RangeFrom, T);
template <class T, class Char>
struct fmt::formatter<::sus::ops::RangeTo<T>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand All @@ -492,7 +492,7 @@ sus__format_to_stream(sus::ops, RangeTo, T);
template <class T, class Char>
struct fmt::formatter<::sus::ops::RangeFull<T>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/option/option.h
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ struct std::equal_to<::sus::option::Option<T>> {
template <class T, class Char>
struct fmt::formatter<::sus::option::Option<T>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_.parse(ctx);
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/result/result.h
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ struct std::equal_to<::sus::result::Result<T, E>> {
template <class T, class E, class Char>
struct fmt::formatter<::sus::result::Result<T, E>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return underlying_ok_.parse(ctx);
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/string/__private/any_formatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ auto format_void(auto out) {
template <class Char>
struct VoidFormatter {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return ctx.begin();
}
template <class T, class FormatContext>
Expand Down
2 changes: 1 addition & 1 deletion subspace/string/__private/bytes_formatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ auto format_bytes(auto out, fmt::string_view bytes) {
template <class Char>
struct BytesFormatter {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return ctx.begin();
}

Expand Down
2 changes: 1 addition & 1 deletion subspace/tuple/tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ struct tuple_element<0, ::sus::tuple_type::Tuple<T, Types...>> {
template <class... Types, class Char>
struct fmt::formatter<::sus::tuple_type::Tuple<Types...>, Char> {
template <class ParseContext>
constexpr decltype(auto) parse(ParseContext& ctx) {
constexpr auto parse(ParseContext& ctx) {
return ctx.begin();
}

Expand Down

0 comments on commit 2cd7a01

Please sign in to comment.