// Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // instantiations of iomanip #include _STD_BEGIN static void __cdecl rsfun(ios_base& iostr, ios_base::fmtflags mask) { // reset specified format flags iostr.setf(ios_base::_Fmtzero, mask); } static void __cdecl sifun(ios_base& iostr, ios_base::fmtflags mask) { // set specified format flags iostr.setf(ios_base::_Fmtmask, mask); } static void __cdecl sbfun(ios_base& iostr, int base) { // set base iostr.setf(base == 8 ? ios_base::oct : base == 10 ? ios_base::dec : base == 16 ? ios_base::hex : ios_base::_Fmtzero, ios_base::basefield); } static void __cdecl spfun(ios_base& iostr, streamsize prec) { // set precision iostr.precision(prec); } static void __cdecl swfun(ios_base& iostr, streamsize wide) { // set width iostr.width(wide); } _MRTIMP2 _Smanip __cdecl resetiosflags( ios_base::fmtflags mask) { // manipulator to reset format flags return _Smanip(&rsfun, mask); } _MRTIMP2 _Smanip __cdecl setiosflags(ios_base::fmtflags mask) { // manipulator to set format flags return _Smanip(&sifun, mask); } _MRTIMP2 _Smanip __cdecl setbase(int base) { // manipulator to set base return _Smanip(&sbfun, base); } _MRTIMP2 _Smanip __cdecl setprecision(streamsize prec) { // manipulator to set precision return _Smanip(&spfun, prec); } _MRTIMP2 _Smanip __cdecl setw(streamsize wide) { // manipulator to set width return _Smanip(&swfun, wide); } _STD_END