diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp @@ -24,6 +24,7 @@ #include #include +#include "test_format_context.h" #include "test_macros.h" enum class color { black, red, gold }; @@ -46,7 +47,8 @@ auto out = std::back_inserter(result); using FormatCtxT = std::basic_format_context; - auto format_ctx = std::__format_context_create(out, std::make_format_args(arg)); + std::basic_format_context format_ctx = + test_format_context_create(out, std::make_format_args(arg)); formatter.format(arg, format_ctx); assert(result == expected); } diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.bool.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.bool.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.bool.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.bool.pass.cpp @@ -24,6 +24,7 @@ #include #include +#include "test_format_context.h" #include "test_macros.h" #include "make_string.h" @@ -43,8 +44,8 @@ auto out = std::back_inserter(result); using FormatCtxT = std::basic_format_context; - auto format_ctx = std::__format_context_create( - out, std::make_format_args(arg)); + std::basic_format_context format_ctx = + test_format_context_create(out, std::make_format_args(arg)); formatter.format(arg, format_ctx); assert(result == expected); } diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.c_string.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.c_string.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.c_string.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.c_string.pass.cpp @@ -22,6 +22,7 @@ #include #include +#include "test_format_context.h" #include "test_macros.h" #include "make_string.h" @@ -42,8 +43,8 @@ using FormatCtxT = std::basic_format_context; auto* arg = const_cast(a); - auto format_ctx = std::__format_context_create( - out, std::make_format_args(arg)); + std::basic_format_context format_ctx = + test_format_context_create(out, std::make_format_args(arg)); formatter.format(arg, format_ctx); assert(result == expected); } diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char.pass.cpp @@ -23,6 +23,7 @@ #include #include +#include "test_format_context.h" #include "test_macros.h" #include "make_string.h" @@ -42,8 +43,8 @@ auto out = std::back_inserter(result); using FormatCtxT = std::basic_format_context; - auto format_ctx = std::__format_context_create( - out, std::make_format_args(arg)); + std::basic_format_context format_ctx = + test_format_context_create(out, std::make_format_args(arg)); formatter.format(arg, format_ctx); assert(result == expected); } diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp @@ -22,6 +22,7 @@ #include #include +#include "test_format_context.h" #include "test_macros.h" #include "make_string.h" @@ -57,7 +58,8 @@ // Note not too found of this hack Str* data = reinterpret_cast(const_cast(buffer.c_str())); - auto format_ctx = std::__format_context_create(out, std::make_format_args(*data)); + std::basic_format_context format_ctx = + test_format_context_create(out, std::make_format_args(*data)); formatter.format(*data, format_ctx); assert(result == expected); } diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.const_char_array.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.const_char_array.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.const_char_array.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.const_char_array.pass.cpp @@ -23,6 +23,7 @@ #include #include +#include "test_format_context.h" #include "test_macros.h" #include "make_string.h" @@ -59,8 +60,8 @@ // Note not too found of this hack Str* data = reinterpret_cast(buffer.c_str()); - auto format_ctx = std::__format_context_create( - out, std::make_format_args(*data)); + std::basic_format_context format_ctx = + test_format_context_create(out, std::make_format_args(*data)); formatter.format(*data, format_ctx); assert(result == expected); } diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp @@ -34,6 +34,7 @@ #include #include +#include "test_format_context.h" #include "test_macros.h" #include "make_string.h" @@ -52,7 +53,8 @@ auto out = std::back_inserter(result); using FormatCtxT = std::basic_format_context; - auto format_ctx = std::__format_context_create(out, std::make_format_args(arg)); + std::basic_format_context format_ctx = + test_format_context_create(out, std::make_format_args(arg)); formatter.format(arg, format_ctx); if (expected.empty()) { diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp @@ -29,6 +29,7 @@ #include #include +#include "test_format_context.h" #include "test_macros.h" #include "make_string.h" @@ -48,7 +49,8 @@ auto out = std::back_inserter(result); using FormatCtxT = std::basic_format_context; - auto format_ctx = std::__format_context_create(out, std::make_format_args(arg)); + std::basic_format_context format_ctx = + test_format_context_create(out, std::make_format_args(arg)); formatter.format(arg, format_ctx); if (expected.empty()) { diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp @@ -31,6 +31,7 @@ #include #include +#include "test_format_context.h" #include "test_macros.h" #include "make_string.h" @@ -50,8 +51,8 @@ auto out = std::back_inserter(result); using FormatCtxT = std::basic_format_context; - auto format_ctx = std::__format_context_create( - out, std::make_format_args(arg)); + std::basic_format_context format_ctx = + test_format_context_create(out, std::make_format_args(arg)); formatter.format(arg, format_ctx); assert(result == expected); } diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.string.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.string.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.string.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.string.pass.cpp @@ -24,6 +24,7 @@ #include #include +#include "test_format_context.h" #include "test_macros.h" #include "make_string.h" @@ -50,7 +51,7 @@ using FormatCtxT = std::basic_format_context; ArgumentT arg = a; - auto format_ctx = std::__format_context_create( + std::basic_format_context format_ctx = test_format_context_create( out, std::make_format_args(std::forward(arg))); formatter.format(arg, format_ctx); assert(result == expected); diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.unsigned_integral.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.unsigned_integral.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.unsigned_integral.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.unsigned_integral.pass.cpp @@ -31,6 +31,7 @@ #include #include +#include "test_format_context.h" #include "test_macros.h" #include "make_string.h" @@ -50,8 +51,8 @@ auto out = std::back_inserter(result); using FormatCtxT = std::basic_format_context; - auto format_ctx = std::__format_context_create( - out, std::make_format_args(arg)); + std::basic_format_context format_ctx = + test_format_context_create(out, std::make_format_args(arg)); formatter.format(arg, format_ctx); assert(result == expected); } diff --git a/libcxx/test/support/test_format_context.h b/libcxx/test/support/test_format_context.h --- a/libcxx/test/support/test_format_context.h +++ b/libcxx/test/support/test_format_context.h @@ -24,6 +24,8 @@ * this file. */ +#include "test_macros.h" + #if TEST_STD_VER < 20 #error "The format header requires at least C++20" #endif