One of the corners of C++20 concepts is that there are certain situations in which you have to write requires requires. For instance, this example from [expr.prim.req]/3:
c++14 introduced generic lambdas that made it possible to write following:It is very clear that this generic lambda func works just like a templated function func would work.
According to section [time.cal.wd.overview]/1 of the C++ standard:weekday represents a day of the week in the civil calendar. It normally holds values in the range 0 to 6, corresponding to Sunday through Saturday, but it may hold non-negative values outside this range.
Some C++ implementations (for instance, battery-powered embedded devices) may have no use or no way for tracking the current date and time.
I noticed that most if not all containers now require their ::iterator type to satisfy LegacySomethingIterator instead of SomethingIterator.
When refining concepts, the way it is consistently done in the standard is to fully write out the concept being refined. For instance, in [concepts.integral], SignedIntegral refines Integral like so:
Related to questions How do I check for C++11 support? and What is the value of __cplusplus for C++17?
The last draft of the c++ standard introduces the so-called "customization point objects" ([customization.point.object]), which are widely used by the ranges library.
According to the last meeting of the ISO C++ Commitee, bit-cast will be introduced in C++20 standard.
I often use SFINAE to remove a function from the overload set if the function body does not make sense(i.e. does not compile). Would it be possible to add to C++ a simple require statement?