The validity of lambda expression with omitted parameter list in C++23

Thanks for reminding me of how pointless this feature is. The correct answer is: no, that’s not a well-formed lambda. The grammar is defined in [expr.prim.lambda.general]: In our case, to start with we have: []<auto> noexcept requires true {}; [] is the lambda-introducer <auto> matches <template-parameter-list> and now we know we’re the 2nd kind lambda-expression. … Read more

What are the implications of constexpr floating-point math?

C++ imposes very few restrictions on the behavior of float and other floating-point types. This can lead to possible inconsistencies in the results, both between compilers, and between runtime/compile-time evaluation by the same compiler. Here is the tl;dr on it: At runtime In constant expressions Floating-point errors, like division by zero UB, but compilers may … Read more

Why is std::aligned_storage to be deprecated in C++23 and what to use instead?

Here are three excerpts from P1413R3: Background aligned_* are harmful to codebases and should not be used. At a high level: Using aligned_* invokes undefined behavior (The types cannot provide storage.) The guarantees are incorrect (The standard only requires that the type be at least as large as requested but does not put an upper … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)