mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-20 07:15:28 +00:00
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> |
||
---|---|---|
.. | ||
mesh | ||
services | ||
a2dp-codec.h | ||
a2dp.h | ||
addr.h | ||
att.h | ||
avdtp.h | ||
bluetooth.h | ||
buf.h | ||
conn.h | ||
controller.h | ||
crypto.h | ||
gap.h | ||
gatt.h | ||
hci_err.h | ||
hci_raw.h | ||
hci_vs.h | ||
hci.h | ||
hfp_hf.h | ||
l2cap.h | ||
mesh.h | ||
rfcomm.h | ||
sdp.h | ||
testing.h | ||
uuid.h |