Effects: Behaves as a formatted output function (
[ostream.formatted.reqmts])
of 
os, except that:
- failure to generate output is reported as specified below, and
- any exception thrown by the call to vformat is propagated
without regard to the value of os.exceptions() and
without turning on ios_base::badbit in the error state of os.
  
After constructing a sentry object,
the function initializes an automatic variable via
string out = vformat(os.getloc(), fmt, args);
 
If the function is 
vprint_unicode and
os is a stream that refers to a terminal capable of displaying Unicode
which is determined in an implementation-defined manner,
writes 
out to the terminal using the native Unicode API;
if 
out contains invalid code units,
the behavior is undefined and
implementations are encouraged to diagnose it
.If the native Unicode API is used,
the function flushes 
os before writing 
out.Otherwise (if 
os is not such a stream or
the function is 
vprint_nonunicode),
inserts the character sequence
[
out.begin(), out.end()) into 
os.If writing to the terminal or inserting into 
os fails,
calls 
os.setstate(ios_base::badbit)
(which may throw 
ios_base::failure)
.