mirror of
https://github.com/fmtlib/fmt.git
synced 2025-04-16 05:42:19 +00:00
Use trailing return type instead of deduction
C++11 does not support deduction of return type.
This commit is contained in:
parent
db86e8d5d3
commit
f45f70af09
@ -3199,10 +3199,10 @@ template <typename It, typename Char>
|
|||||||
struct formatter<arg_join<It, Char>, Char>:
|
struct formatter<arg_join<It, Char>, Char>:
|
||||||
formatter<typename std::iterator_traits<It>::value_type, Char> {
|
formatter<typename std::iterator_traits<It>::value_type, Char> {
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const arg_join<It, Char> &value, FormatContext &ctx) {
|
auto format(const arg_join<It, Char> &value, FormatContext &ctx) -> decltype(ctx.begin()) {
|
||||||
typedef formatter<typename std::iterator_traits<It>::value_type, Char> base;
|
typedef formatter<typename std::iterator_traits<It>::value_type, Char> base;
|
||||||
auto it = value.begin;
|
auto it = value.begin;
|
||||||
auto out = ctx.begin();
|
auto out = ctx.begin();
|
||||||
if (it != value.end) {
|
if (it != value.end) {
|
||||||
out = base::format(*it++, ctx);
|
out = base::format(*it++, ctx);
|
||||||
while (it != value.end) {
|
while (it != value.end) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user