This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
operator<< and operator>> for unspecified I/O manipulatorsSection: 31.7.7 [std.manip], 31.7.8 [ext.manip], 31.7.9 [quoted.manip] Status: New Submitter: Jiang An Opened: 2025-09-05 Last modified: 2025-10-21
Priority: 4
View other active issues in [std.manip].
View all other issues in [std.manip].
View all issues with New status.
Discussion:
Currently, it is unspecified whether any of operator<< or operator>>
for the "unspecified" return type of an I/O manipulating function is SFINAE-friendly.
#include <iostream>
#include <iomanip>
int main()
{
std::cout << std::setfill(L'*');
}
It seems better to eliminate such implementation divergence. Perhaps it's also better to require them to be SFINAE-friendly to reduce potential conflicts with user-provided operators.
If it's intended to allow implementation divergence, perhaps we should clarify the intent.[2025-10-21; Reflector poll.]
Set priority to 4 after reflector poll.
"Does it matter in practice? If the type is unspecified, it's fine for misuse to be non-portable."
"Would like a diagnostic, don't care about SFINAE. Not clear to me that the current
setfill wording disallows the mixed-character-type case at all ..."
"NAD, not been a problem for a quarter of a century."
Proposed resolution: