Skip to content
Commit fe742189 authored by Peter Bigot's avatar Peter Bigot Committed by Carles Cufi
Browse files

sys: util.h: remove template implementation of ARRAY_SIZE



This was added because GNU G++ doesn't support the built-in function
used to produce a compile-time error when invalid parameters are
passed to the macro imlementation.  The template implementation does
not work on declarations like this:

  mytype array[] = { ... }

because it requires an explicit size for the template parameter.

Remove the template specialization, and support C++ with a version of
the macro that doesn't involve references to undefined builtins.

Signed-off-by: default avatarPeter Bigot <peter.bigot@nordicsemi.no>
parent 727f8e08
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment