std::ios_base::flags(3)
π std::ios_base::flags(3) π
Okay so we're flipping through the C++ Standard Libary manual, section 3, and this page is the std::ios_base::flags glow-up. It's giving format flag headquarters energy, and honestly? iconic. β¨
π¦ NAME π¦
std::ios_base::flags β that's the function name, bestie. Literally std::ios_base::flags. No cap. π
πΈ Synopsis πΈ
fmtflags flags() const; (1)
fmtflags flags( fmtflags flags ); (2)
Manages format flags. π
- returns current formatting setting
- replaces current settings with given ones.
π Parameters π
flagsβ new formatting setting. It can be a combination of formatting flags constants.
β¨ Formatting flags β¨
decβ use decimal base for integer I/O: seestd::decoctβ use octal base for integer I/O: seestd::octhexβ use hexadecimal base for integer I/O: seestd::hexbasefieldβdec|oct|hex. Useful for masking operationsleftβ left adjustment (adds fill characters to the right): seestd::leftrightβ right adjustment (adds fill characters to the left): seestd::rightinternalβ internal adjustment (adds fill characters to the internal designated point): seestd::internaladjustfieldβleft|right|internal. Useful for masking operationsscientificβ generate floating point types using scientific notation, or hex notation if combined withfixed: seestd::scientificfixedβ generate floating point types using fixed notation, or hex notation if combined withscientific: seestd::fixedfloatfieldβscientific|fixed. Useful for masking operationsboolalphaβ insert and extractbooltype in alphanumeric format: seestd::boolalphashowbaseβ generate a prefix indicating the numeric base for integer output, require the currency indicator in monetary I/O: seestd::showbaseshowpointβ generate a decimal-point character unconditionally for floating-point number output: seestd::showpointshowposβ generate a+character for non-negative numeric output: seestd::showposskipwsβ skip leading whitespace before certain input operations: seestd::skipwsunitbufβ flush the output after each output operation: seestd::unitbufuppercaseβ replace certain lowercase letters with their uppercase equivalents in certain output operations: seestd::uppercase
π Return value π
It hands back the formatting flags before the call to the function. So you get the old vibe check result, basically. π
π Example π
This section is incomplete Reason: no example
π«Ά See also π«Ά
setfβ sets specific format flag (public member function)unsetfβ clears specific format flag (public member function)
π Category π
- Todo no example
xoxo, bestie π β this page came from http://cppreference.com, dated 2024.06.10, and it's the std::ios_base::flags(3) page. Slay. π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms