Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.2.1
-
None
-
Usability
Description
The documentation says for boths "flags(fmtflags fmtfl)" and "setf(fmtflags fmtfl)" exactly the same, which is not true:
flags(fmtflags fmtfl);
Saves the format control information, then sets it to fmtfl and returns the previously saved value.
setf(fmtflags fmtfl);
Saves the format control information, then sets it to fmtfl and returns the previously saved value.
The documentation in the header file "ios_base.h" is indeed better. It states for flags:
> This function overwrites all the format flags with @a fmtfl.
while for setf it says:
> This function sets additional flags in format control. Flags that were previously set remain set.
BTW: The start of the sentences "Saves the format control information..." is confusing anyway and not necessary for anyone using this interface. It's enough to know that the function "returns the previously saved value".