Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c++20]

C++20 is the target for the version of C++ after C++17. This tag should be used (along with the C++ tag) for questions about C++ features on track for C++20.

6
votes
1answer
51 views

Max function with variable number of arguments

I find it irritating that in standard C++ I can't do std::max(a, b) = x when it's possible and that it can't handle more than 2 arguments. For the second concern I ...
6
votes
1answer
130 views

C++20 standard compatible vector

I decided to write my own vector class template for learning purposes. My main goal was a correct interpretation of C++20 standard (as of n4810). I took some liberties and decided to use concepts ...
7
votes
1answer
131 views

C++17 <span> implementation

C++20 added the span library under the header <span>. As voluntary exercise (not homework!), I spent approximately 1.5 ...
6
votes
2answers
242 views

Generic way to remove all duplicates from a not-sorted container

Here's an interesting article called "How to Remove Elements from a Sequence Container in C++". At some point, the author also explains how to remove duplicates from a container, but only with the ...
2
votes
1answer
409 views

C++ multithread pool class

I have addressed the critique for this post and resubmitted it for iterative review; C++20 multithread pool class. This is an iteration from a prior post; C++ thread pool class. Class for creating ...
7
votes
2answers
180 views

C++2a comparison-based topological sort algorithm

Here's my attempt at a C++2a Standard Library–friendly "topological sort" algorithm. There are several areas of interest here: The algorithm is comparison-based and in-place, just like ...
6
votes
1answer
440 views

Constexpr unit tests and asserts

I'm trying out some different programming styles to experiment with the new C++ concepts. Within the experiment I was looking into how constexpr could be helpful ...