C++ how future::wait_until(time) handles multiple clocks?
std::future::wait_until(time) converts time to a standard clock, and thus implicitly assumes that all clocks run at the same pace.
std::future::wait_until(time) converts time to a standard clock, and thus implicitly assumes that all clocks run at the same pace.
Standard C++ is still lacking standardized future continuation. Boost has “experimental” implementation that is 11 years old. In the meantime, at least three major proposals were brought before the standard committee, but none made it into the standard. Current proposal is 190 printed pages long. The earliest it can become standard is C++26, and even that is not guaranteed. Such glacial speed of change results in a lot of confusion and feature lag behind other languages. C# had continuations since 2010, and JavaScript since 2015 (EC6). While C++ 11 was relatively on par with the industry when introducing futures, current C++ is quite behind the crowd. “Experimental” code should not stick around for over a decade in any library, and especially in a semi-standard library like Boost. There must be a way to solve problems faster.
C++ syntax is notoriously complex and full of gotchas both for compilers and for humans. I don’t know what was the reasoning in selecting the syntax for template deduction guides […]
Fold expressions, starting with C++ 17, provide succinct, if somewhat unorthodox, syntax for processing of parameter packs. Printing a pack to standard output Suppose, I want to write a function […]
std::optional and std::variant are attractive alternatives to raw pointers and unions, but they come with a caveat: when you create an optional/variant from a “real” value, a copy will be […]
Conan is a package manager for C++. It has a concept of profiles where different settings are specified, including OS, compiler and compiler version. [settings] os=linux compiler=clang version=16 I was […]
This is a continuation of the series about C++ rvalue references. First post, second post, third post. Rvalue references are unique, because if you have a variable of type T&&, […]
This is a continuation of the C++ series, previous post here. When I was working on the move semantics example, I ran into two familiar, yet forgotten “features” of C++ […]
This is a continuation of my previous post about rvalue references. As you may know, official C++ specification is not free: it costs upwards of $100, which, I dare to […]
This week-end I looked at C++ rvalue references and move semantics. Here’s the code, the good stuff is in matrix.h. Rvalue references seem useful, but way too treacherous. Any programming construct that raises […]