Main Content

Array container type


Specify the container type for arrays in the generated code. Choose either C-style array or std::array.

Category: Code Generation > Code Style


Default: C-style array

C-style array

The code generator generates array containers by using C-style arrays. For example:

real_T const_val[4] = { 1.0, 2.0, 3.0, 4.0 } ;

std::array is a template class that represents fixed-size arrays. If you choose this option, the code generator generates array containers by using std::array. For example:

std::array<real_T, 4> const_val = { { 1.0, 2.0, 3.0, 4.0 } };

Command-Line Information

Parameter: ArrayContainerType
Type: character vector
Value: 'C-style array' |'std::array'
Default: 'C-style array'

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo recommendation

Related Topics