Files
2025-10-25 03:02:53 +03:00

98 lines
2.7 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[floatfield.manip]
# 31 Input/output library [[input.output]](./#input.output)
## 31.5 Iostreams base classes [[iostreams.base]](iostreams.base#floatfield.manip)
### 31.5.5 ios_base manipulators [[std.ios.manip]](std.ios.manip#floatfield.manip)
#### 31.5.5.4 floatfield manipulators [floatfield.manip]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L2750)
Each function specified in this subclause
is a designated addressable function ([[namespace.std]](namespace.std "16.4.5.2.1Namespace std"))[.](#1.sentence-1)
[🔗](#lib:fixed)
`ios_base& fixed(ios_base& str);
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L2760)
*Effects*: Callsstr.setf(ios_base::fixed, ios_base::floatfield)[.](#2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L2765)
*Returns*: str[.](#3.sentence-1)
[🔗](#lib:scientific)
`ios_base& scientific(ios_base& str);
`
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L2776)
*Effects*: Callsstr.setf(ios_base::scientific, ios_base::floatfield)[.](#4.sentence-1)
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L2781)
*Returns*: str[.](#5.sentence-1)
[🔗](#lib:hexfloat)
`ios_base& hexfloat(ios_base& str);
`
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L2792)
*Effects*: Calls str.setf(ios_base::fixed | ios_base::scientific,
ios_base::floatfield)[.](#6.sentence-1)
[7](#7)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L2797)
*Returns*: str[.](#7.sentence-1)
[8](#8)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L2802)
[*Note [1](#note-1)*:
ios_base::hex cannot be used to specify
a hexadecimal floating-point format,
because it is not part of ios_base::floatfield (Table [137](ios.fmtflags#tab:ios.fmtflags.const "Table 137: fmtflags constants"))[.](#8.sentence-1)
— *end note*]
[🔗](#lib:defaultfloat)
`ios_base& defaultfloat(ios_base& str);
`
[9](#9)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L2816)
*Effects*: Calls str.unsetf(ios_base::floatfield)[.](#9.sentence-1)
[10](#10)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L2820)
*Returns*: str[.](#10.sentence-1)