🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.c++.misc
Article #1

Modern C++

#1
From: Student Project
Date: Fri, 29 Nov 2024 05:49
18 lines
1392 bytes
Which compiler is currently able to compile this two code snippets:

std::vector<int> v = {1, 2, 3, 4, 5};
std::println("{}", v);


Suppose you want it to be centered in a line of 40 characters, with 
underscore characters around it:

std::vector<int> v = {1, 2, 3, 4, 5};
std::println("{:_^40}", v);
// ____________[1, 2, 3, 4, 5]_____________


Source: 
<https://isocpp.org/blog/2024/11/having-fun-with-modern-cpp-daniel-lemire>

Thank you for reading this and possible solution.
Technical Details
Message-ID: <vibkqv$1m7d2$1@paganini.bofh.team>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <vibkqv$1m7d2$1@paganini.bofh.team>
Subject: Modern C++
Date: Fri, 29 Nov 2024 05:49:38 +0000
From: Student Project <student@invalid.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!not-for-mail
Newsgroups: comp.lang.c++,alt.comp.lang.c++.misc
Organization: To protect and to server
Mime-Version: 1.0
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 29 Nov 2024 05:52:31 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="1777058"; posting-host="oUS9mq3vau9wu0ueCXkkJg.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
Content-Language: tk
X-Notice: Filtered by postfilter v. 0.9.3