Sujet : Re: We have a new standard!
De : already5chosen (at) *nospam* yahoo.com (Michael S)
Groupes : comp.lang.c++Date : 01. Jan 2025, 17:25:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250101182527.00004b2f@yahoo.com>
References : 1
User-Agent : Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
On 27 Dec 2024 14:47:51 GMT
ram@zedat.fu-berlin.de (Stefan Ram) wrote:
According to one web site, C++23 (ISO/IEC 14882:2024) was released
October 19, 2024.
(Sorry if it was mentioned here then, and I just did not notice!)
>
I tried std::print both with gcc 14.2 and with clang 19.1.6 under
Windows/msys2 (ucrt variant of x86-64 toolsests). It works as
advertised.
That is, an Windows 7 in default console windows it works as advertised
for as long as you had chosen a font that supports all languages that
you want to see. A default (Lucudia Console) was not good enough for my
mix of languages, but (less elegantly looking) Currier New did the job.
Supposedly, on newer versions of Windows it will work with default
fonts as well.
For those who want to try it: new version of compiler is not enough,
you have to install new C++ libraries (in my case,
mingw-w64-ucrt-x86_64-libc++). And don't forget to specify -lstdc++exp
during linking.
Now to why, despite said above, I wouldn't use std::print() in its
current incarnation neither in production nor in hobby programs:
because compilation is too slow. ~4 seconds on the old home PC. I
didn't try on newer machines yet, but would be surprised if any of them
beats 2 seconds. Which is way above my threshold of inconvenience.
Nevertheless, it is a step in right direction.
Introduction of format() already showed that C++ committee is aware of
of the fact that "Stroustrup streams" are crap not only relatively to
format/printing facilities of more modern languages, but relatively
to what we have in C as well. std::print() proves that committee is not
only aware of the fact, but finally willing to consider fixes.