diff --git a/include/fmt/format.h b/include/fmt/format.h index 0f0758b6..c100f6b9 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -172,12 +172,6 @@ FMT_END_NAMESPACE # define FMT_BUILTIN_CLZLL(n) __builtin_clzll(n) #endif -#if (__cplusplus > 201703L) -# define FMT_CAPTURE_THIS , this -#else -# define FMT_CAPTURE_THIS -#endif - // Some compilers masquerade as both MSVC and GCC-likes or otherwise support // __builtin_clz and __builtin_clzll, so only define FMT_BUILTIN_CLZ using the // MSVC intrinsics if the clz and clzll builtins are not available. @@ -1474,7 +1468,7 @@ template struct int_writer { void on_dec() { auto num_digits = count_digits(abs_value); out = write_int(out, num_digits, get_prefix(), specs, - [= FMT_CAPTURE_THIS](iterator it) { + [this, num_digits](iterator it) { return format_decimal(it, abs_value, num_digits); }); } @@ -1486,7 +1480,7 @@ template struct int_writer { } int num_digits = count_digits<4>(abs_value); out = write_int(out, num_digits, get_prefix(), specs, - [= FMT_CAPTURE_THIS](iterator it) { + [this, num_digits](iterator it) { return format_uint<4, Char>(it, abs_value, num_digits, specs.type != 'x'); }); @@ -1499,7 +1493,7 @@ template struct int_writer { } int num_digits = count_digits<1>(abs_value); out = write_int(out, num_digits, get_prefix(), specs, - [= FMT_CAPTURE_THIS](iterator it) { + [this, num_digits](iterator it) { return format_uint<1, Char>(it, abs_value, num_digits); }); } @@ -1512,7 +1506,7 @@ template struct int_writer { prefix[prefix_size++] = '0'; } out = write_int(out, num_digits, get_prefix(), specs, - [= FMT_CAPTURE_THIS](iterator it) { + [this, num_digits](iterator it) { return format_uint<3, Char>(it, abs_value, num_digits); }); }