According to P1236R1, now integer types are defined with numbers, no longer with bits.Instead of defining the meaning of "bit", which the standard is still lacking, C++ chooses not to do that but defines those types in the term of range exponent instead.
It seems to me that aggregate initialization (of suitable types) is not considered a constructor that you can actually call (except a few cases.)
How does one use concepts in if constexpr?Given the example below, what would one give to if constexpr to return 1 in case T meets the requirements of integral and else 0?
On cppreference (4) the converting constructor is described as follows:Converting constructor. Constructs a variant holding the alternative type T_j that would be selected by overload resolution for the expression F(std::forward<T>(t)) if there was an overload of imaginary function F(T_i) for every T_i from Types... in scope at the same time,...
What is C++20's string literal operator template? Cppreference's example in this respect is quite concise and not very clear to me:
GCC9 already implements std::is_constant_evaluated. I played a little bit with it, and I realized it is somewhat tricky. Here’s my test:
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.