Sujet : Re: We have a new standard!
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.c++Date : 02. Jan 2025, 22:40:15
Autres entêtes
Organisation : None to speak of
Message-ID : <87ttagsxmo.fsf@nosuchdomain.example.com>
References : 1 2 3 4
User-Agent : Gnus/5.13 (Gnus v5.13)
David Brown <
david.brown@hesbynett.no> writes:
[...]
IMHO the real mistake for iostreams for formatted output was making
them modal - IO manipulators are a /terrible/ idea.
Agreed.
The type system
and overloading should have been used instead, so that we would write
:
>
cout << hex(x);
>
instead of
>
cout << hex << x << dec;
Note that the latter sets cout to decimal mode, not to whatever mode it
had before.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */