make implicit capture explicit

This commit is contained in:
Markus Werle 2020-05-07 12:14:56 +02:00
parent 1c86a99e8f
commit 818f65e30a

View File

@ -1467,9 +1467,10 @@ template <typename OutputIt, typename Char, typename UInt> struct int_writer {
void on_dec() { void on_dec() {
auto num_digits = count_digits(abs_value); auto num_digits = count_digits(abs_value);
out = write_int(out, num_digits, get_prefix(), specs, [=](iterator it) { out =
return format_decimal<Char>(it, abs_value, num_digits); write_int(out, num_digits, get_prefix(), specs, [=, this](iterator it) {
}); return format_decimal<Char>(it, abs_value, num_digits);
});
} }
void on_hex() { void on_hex() {
@ -1478,9 +1479,11 @@ template <typename OutputIt, typename Char, typename UInt> struct int_writer {
prefix[prefix_size++] = specs.type; prefix[prefix_size++] = specs.type;
} }
int num_digits = count_digits<4>(abs_value); int num_digits = count_digits<4>(abs_value);
out = write_int(out, num_digits, get_prefix(), specs, [=](iterator it) { out =
return format_uint<4, Char>(it, abs_value, num_digits, specs.type != 'x'); write_int(out, num_digits, get_prefix(), specs, [=, this](iterator it) {
}); return format_uint<4, Char>(it, abs_value, num_digits,
specs.type != 'x');
});
} }
void on_bin() { void on_bin() {
@ -1489,9 +1492,10 @@ template <typename OutputIt, typename Char, typename UInt> struct int_writer {
prefix[prefix_size++] = static_cast<char>(specs.type); prefix[prefix_size++] = static_cast<char>(specs.type);
} }
int num_digits = count_digits<1>(abs_value); int num_digits = count_digits<1>(abs_value);
out = write_int(out, num_digits, get_prefix(), specs, [=](iterator it) { out =
return format_uint<1, Char>(it, abs_value, num_digits); write_int(out, num_digits, get_prefix(), specs, [=, this](iterator it) {
}); return format_uint<1, Char>(it, abs_value, num_digits);
});
} }
void on_oct() { void on_oct() {
@ -1501,9 +1505,10 @@ template <typename OutputIt, typename Char, typename UInt> struct int_writer {
// is not greater than the number of digits. // is not greater than the number of digits.
prefix[prefix_size++] = '0'; prefix[prefix_size++] = '0';
} }
out = write_int(out, num_digits, get_prefix(), specs, [=](iterator it) { out =
return format_uint<3, Char>(it, abs_value, num_digits); write_int(out, num_digits, get_prefix(), specs, [=, this](iterator it) {
}); return format_uint<3, Char>(it, abs_value, num_digits);
});
} }
enum { sep_size = 1 }; enum { sep_size = 1 };