With C++20, we've gained templated lambdas, great! []<class T>(){}; Is it possible to call a lambda callback with a template parameter,
C++ 20 modules guaranteed backward compatible so modules can import headers. And Visual Studio introduced header file import modules,is this stardard or just a
What magic generator should I define to make the code below work? #include <experimental/generator> std::experimental::generator<int> generateInts(
I am trying to use C++ concepts in order to write a type trait that will produce a different type depending on whether its template argument is a fundamental ty
I am trying to use C++20 Concepts to constrain an interface. In this interface, I want a function signature to only use references. For some reason, I can't do
The following function is valid (as of C++20): void foo() { constexpr const int b { 123 }; constexpr const auto l1 = [](int a) { return b * a; }; (v
I'm trying to understand what problems C++20 concepts are solving and how exactly they are helpful to the end user. I understand that it helps
Is it currently possible to constrain a class template that rejects type argument which is the specialization of the class template itself without using static_
I am trying to print Eigen::Array or Eigen::Matrix with c++20 format, instead of Eigen::IOFormat. I would like to control the precision and alignment of element
I'm using time_point the first time. I want to parse datetime from string and found a difference when returning back to string from 1 hour. std::chrono::system_
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