Add support for passing nullptr to wx pseudo-vararg functions
Allow passing literal nullptr as an argument corresponding to "%p" in the format string. See https://github.com/wxWidgets/wxWidgets/pull/1251 Closes #18355.
This commit is contained in:
@@ -249,6 +249,13 @@ void VarArgTestCase::ArgsValidation()
|
||||
wxString::Format("a string(%s,%s), ptr %p, int %i",
|
||||
wxString(), "foo", "char* as pointer", 1);
|
||||
|
||||
#if __cplusplus >= 201103 || wxCHECK_VISUALC_VERSION(10)
|
||||
// Unfortunately we can't check the result as different standard libraries
|
||||
// implementations format it in different ways, so just check that it
|
||||
// compiles.
|
||||
wxString::Format("null pointer is %p", nullptr);
|
||||
#endif
|
||||
|
||||
// Microsoft has helpfully disabled support for "%n" in their CRT by
|
||||
// default starting from VC8 and somehow even calling
|
||||
// _set_printf_count_output() doesn't help here, so don't use "%n" at all
|
||||
|
Reference in New Issue
Block a user