Liste des Groupes | Revenir à cl c++ |
On 27 Dec 2024 14:47:51 GMTWhenever I recompile my program, the company-mandated security software will check it against viruses (again!) for 5 seconds at least. I have (almost) got used to it...
ram@zedat.fu-berlin.de (Stefan Ram) wrote:
According to one web site, C++23 (ISO/IEC 14882:2024) was releasedI tried std::print both with gcc 14.2 and with clang 19.1.6 under
October 19, 2024.
>
(Sorry if it was mentioned here then, and I just did not notice!)
>
>
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.Half of the slowness of both in C printf() and C++ streams comes from the locale support, which is often unneeded and would just slow things down. If I have understood correctly, std::print() does not use locale by default, so has a chance to be much faster. If so, then definitely this is a step in the 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.
Les messages affichés proviennent d'usenet.