2802fa4e6d
In C99 the construct (T){init-list} is called a compound literal, and is an lvalue. In C++ it is simply a cast expression to non-rvalue type, which is a prvalue. In both languages the expression is a temporary, but in C99 taking its address is well-defined while in C++ it is an error diagnosed as "taking address of temporary". Headers that may be used in C++ application code must avoid invalid expressions. Replace all uses of &(T){init-list} in headers with the functionally equivalent but C++-legal (T[]){{init-list}}. Signed-off-by: Peter A. Bigot <pab@pabigot.com> |
||
---|---|---|
.. | ||
json.h | ||
jwt.h |