I note that many algorithms can be used with ranges allowing the use of members of custom types, rather than needing lambda functions. So, am curious whether st
I have a class used to work with disk data consisting of an enum class and vector<char> sized based on the enum. The enum is an invariant for each object
Can g++ (gcc) 11.1 be used on Debian Bullseye? Debian 11 (bullseye) is soon to be released, and I am interested in a compiler with C++20 and modules support. De
I have read this question and tried to replicate the answer with the following code: #include <iostream> #include <syncstream> #include <thread&g
I have read this question and tried to replicate the answer with the following code: #include <iostream> #include <syncstream> #include <thread&g
Essentially, is there a shorter/cleaner way to define Alphabet than using a bunch of std::same_as/std::is_same? struct A {}; struct B {}; struct C {}; ... temp
Consider this code, running on a Linux system (Compiler Explorer link): #include <filesystem> #include <cstdio> int main() { try {
Using the msvc with the /std::c++20 flag on, I can't seem to get the wait call compiled. simple example: #include<future> std::future<int> fut = st
I do not know if this is the expected behavior of boost::asio::co_spawn (I did check the docs 1.78.0...), but if i call (e.g. co_spawn(ctx, ..., detached)) from
Since C++20 the standard library uses the spaceship operator to implement comparison for strings and vectors (according to this video). I am worried that this c
TL;DR: GCC 11.2.0 (image f7ea55625e09) + C++20 + <vector>'s std::vector<anything> cause useless output. How to get out something I can work with? Co
I'm trying to write a function async_read_string_n to asynchronously read a string of exactly n bytes from a socket with Boost.Asio 1.78 (and GCC 11.2). This is
I wanted to try out to c++20 coroutines together with asio. In a simple test three are coroutines which would be executed on a asio::thread_pool with 4 threads.
Now that the C++20 ranges implementation is actually here and released under GCC 10.2, I would like to know how to convert a ranges view back to an actual conta
I was hoping that auto myPairs = make_unique_for_overwrite<pair<uint64_t, void*>[]>(arraySize); would give me uninitialized memory for my pairs. I
This is a followup on the answers for placement new on a class with reference field. Calling std::vector<A>::data() on type A that has reference or const
I need a way to identify a unique combination of template types that gives me an easily indexable identifier. I have the following class: #include <cstdint&g
Clang and MSVC already supports Modules TS from unfinished C++20 standard. Can I build my modules based project with CMake or other build system and how? I tri
C++20 added char8_t and std::u8string for UTF-8. However, there is no UTF-8 version of std::cout and OS APIs mostly expect char and execution character set. So
C++20 added char8_t and std::u8string for UTF-8. However, there is no UTF-8 version of std::cout and OS APIs mostly expect char and execution character set. So