In "c" version there are xxx_ARRAY_CAPACITY_ constants
In "c++" generated code such information is currently lost
for c++17 and above we use std::vector - there is no max size/capacity notion at the vector class;
except c++14 where we use cetl::VariableLengthArray (instead of std::vector) which has max_size() analog;
for static array fields we use std::array, so the size/capacity is there.
[x] Introduce <Type>::_traits_::ArrayCapacity struct with nested static constexpr std::size_t <field> = <ARRAY_CAPACITY>; for each array kind field. For consistency include static array fields as well. If there are no such fields in a type then struct ArrayCapacity won't be present at all.
[x] Extend unit c++ tests (the test_constant.cpp with corresponding asserts.
In "c" version there are
xxx_ARRAY_CAPACITY_
constantsIn "c++" generated code such information is currently lost
std::vector
- there is no max size/capacity notion at the vector class;cetl::VariableLengthArray
(instead of std::vector) which hasmax_size()
analog;std::array
, so the size/capacity is there.[x] Introduce
<Type>::_traits_::ArrayCapacity
struct with nestedstatic constexpr std::size_t <field> = <ARRAY_CAPACITY>;
for each array kind field. For consistency include static array fields as well. If there are no such fields in a type thenstruct ArrayCapacity
won't be present at all.[x] Extend unit c++ tests (the
test_constant.cpp
with corresponding asserts.