cmakepp_lang/map/ctor
- cmakepp_lang/map/ctor.cpp_map_ctor(result)
Constructs a new Map instance with the specified state (if provided)
This function creates a new Map instance. The caller may provided one or more pairs of input to be used as the initial state. If provided, the pairs are assumed to be such that the first value is the key and the second value is the value to associate with that key. If no key-value pairs are provided the resulting map will be empty.
- Parameters:
result (desc) – Name for variable which will hold the new map.
*args – A list whose elements will be considered pairwise to be the initial key-value pairs populating the map.
- Returns:
_mc_result
will be set to the newly created Map instance.- Return type:
map
Error Checking
If CMakePP is run in debug mode this function will assert that it has been called with at least one argument, that this argument is of type
desc
, and that any additional arguments are of type(desc, str)
. If any of these assertions fail an error will be raised. These assertions are only performed if CMakePP is run in debug mode.- var CMAKEPP_LANG_DEBUG_MODE:
Used to determine if CMakePP is being run in debug mode.
- vartype CMAKEPP_LANG_DEBUG_MODE:
bool