Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
template <template <typename, typename> class Base, typename Character>
static int __cdecl common_vfprintf(
unsigned __int64 const options,
FILE* const stream,
Character const* const format,
_locale_t const locale,
va_list const arglist
) throw()
{
typedef output_processor<
Character,
stream_output_adapter<Character>,
Base<Character, stream_output_adapter<Character>>
> processor_type;
_VALIDATE_RETURN(stream != nullptr, EINVAL, -1);
_VALIDATE_RETURN(format != nullptr, EINVAL, -1);
return __acrt_lock_stream_and_call(stream, [&]() -> int
{
__acrt_stdio_temporary_buffering_guard const buffering(stream);
_LocaleUpdate locale_update(locale);
processor_type processor(
stream_output_adapter<Character>(stream),
options,
format,
locale_update.GetLocaleT(),
arglist);
return processor.process();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.