Main Content

Array container type

Description

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

Category: Code Generation > Code Style

Settings

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

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

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo recommendation

Related Topics