Quick Q: Setting a vector equal to {}
Quick A: It is possible.
Recently on SO:
Setting a vector equal to {};
It's valid (since C++11).
std::vector
has an overloaded operator= takingstd::initializer_list
.
June 16-21, Sofia, Bulgaria
September 13-19, Aurora, CO, USA
October 25, Pavia, Italy
November 6-8, Berlin, Germany
November 16-21, Kona, HI, USA
By Adrien Hamelin | Feb 11, 2020 12:40 PM | Tags: basics
Quick A: It is possible.
Recently on SO:
Setting a vector equal to {};
It's valid (since C++11).
std::vector
has an overloaded operator= takingstd::initializer_list
.
By Adrien Hamelin | Feb 11, 2020 12:35 PM | Tags: intermediate
How do you do it?
Various Ways of Applying a Function to the Elements of a Collection in C++
by Jonathan Boccara
From the article:
Applying a function to each element of a collection of object is a basic use case of manipulating collections, in C++ or anywhere else for that matter...
By Adrien Hamelin | Feb 11, 2020 12:31 PM | Tags: c++20
Concepts continued.
C++20: Define the Concept Regular and SemiRegular
by Rainer Grimm
From the article:
When you want to define a concrete type that works well in the C++ ecosystem, you should define a type that "behaves link an int". Formally, your concrete type should be a regular type. In this post, I define the concepts Regular and SemiRegular...
By Corentin Jabot | Feb 7, 2020 11:45 AM | Tags: c++23
SG-11, the study group charged of all things concurrency and parallelism made forward progress and sent the proposal to LEWG - with the hope of landing a future revision in the C++23 draft. This is rather big news given that this work has been brewing for about a decade.
A Universal I/O Abstraction for C++
by Corentin Jabot
From the article:
The year is 2020 and even consummer CPUs feature double digits number of cores, storage offers 10GB/s read speeds and networks have to accommodate ever-growing traffic.
For a long time, the C++ committee seemed to think that either async file I/O didn’t make sense or was fundamentally irreconcilable with networking. This belief would lead to two inter-incompatible APIs in the standard, which would be a nightmare in term of usability (aka ASIO and AFIO).
It seems that there is finally a way to resolve these divides:
io_uring offers very high performance I/O which doesn’t discriminate on device type.
Sender Receiver provides the composable, low-cost, non-allocating abstraction while offering a simple mental model for asynchronous operations lifetime.
Coroutines make asynchronous i/o dead simple for the 99% use case.
Asynchronous Networking is nice.Asynchronous I/O is better.
AWAIT ALL THE THINGS!
By Jordi Mon Companys | Feb 7, 2020 02:27 AM | Tags: community
If you are into C and/or C++ package management, Conan Days in Madrid, Spain may be for you.
Conan Community and C/C++ build engineering and packaging enthusiasts
ConanDays, 2 days full of technical content for the whole Conan Community and C/C++ build engineering and packaging enthusiasts in Madrid, Spain, 19-20 March 2020.
By Adrien Hamelin | Feb 4, 2020 02:29 PM | Tags: c++20
Getting familiar with concepts.
C++20 Concepts
by omnigoat
From the article:
A quick syntax-based overview of C++20 Concepts, as they are in the standard (circa January 2020)...
By Adrien Hamelin | Feb 4, 2020 02:28 PM | Tags: community
Don't miss it!
C++ in 2020
by Jens Weller
From the article:
Now where the year is a few weeks old, lets see whats ahead for C++ in 2020!
I'll cover the Meeting C++ Community Survey, Conferences, Libraries & Releases, ISOCPP and C++20.
This blog post is based on a newsletter, which is based on a talk I gave at my User Group in Düsseldorf two weeks ago. Come and visit our meetings at the 3rd Wednesday of the month! My C++ User Group is also still looking for speakers in 2020, contact me if you're in town!
By Adrien Hamelin | Feb 4, 2020 02:26 PM | Tags: community
Check it out.
CLion starts 2020.1 Early Access Program: improvements to Clang-based tools and debugger, new font and editor theme, and more
by Anastasia Kazakova
From the article:
We’ve got a lot planned for 2020 and 2020.1 and now it’s time to start our regular Early Access Program!
EAP builds are free and give you a preview of the upcoming changes and enhancements. They might not be stable and might contain functionality that doesn’t make it to the final release. And if you decide to try these builds, please, inform us of any issues you run into or any inconveniences you experience as early as possible, so we have time to investigate and can try to address them before the release...
By Alex Fabijanic | Jan 31, 2020 05:32 AM | Tags: None
POCO Release 1.10.0 available
by POCO Team
About the release
Release 1.10 is a major feature release, introducing C++14 support and the new JWT (JSON Web Token) library, as well as the PostgreSQL connector for the Data library. Other notable features are NTLM authentication support in the Net library and TLS 1.3 support in the NetSSL library. Please see the POCO blog for more details, and CHANGELOG for the full list of 60+ changes.
By fj | Jan 31, 2020 05:20 AM | Tags: None
A taste of functional stack of effects.
Decorating with a side effect
by Krzysztof Ostrowski
From the article:
Logging is one of such overused features, that leads to costly side effects (consider distributed logging, a DLT, prevalent in automotive industry). This article describes a technique that is used to extract side effects brought by logging, and then compose with them back in a well defined manner.