6 const std::vector<java_generic_parametert> ¶meters,
7 std::vector<reference_typet> types)
10 const auto first_param_it =
12 std::size_t container_index;
17 std::size_t param_index = 0;
23 result.second,
"Some type parameters are already mapped but not all");
28 container_index = first_param_it->second.container_index;
29 std::size_t param_index = 0;
35 "Some type parameters are already mapped but not all");
37 param_it->second.container_index == container_index,
38 "Not all type parameters are assigned to same container");
40 param_it->second.param_index == param_index,
41 "Type parameters have been encountered in two different orders");
46 return container_index;
54 std::optional<reference_typet>
60 std::stack<std::vector<reference_typet>> &stack =
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
std::vector< std::stack< std::vector< reference_typet > > > container_to_specializations
The list of containers and, for each one, the stack of lists of specializations.
std::size_t insert(const std::vector< java_generic_parametert > ¶meters, std::vector< reference_typet > types)
Insert a specialization for each type parameters of a container.
std::unordered_map< irep_idt, container_paramt > param_to_container
A map from parameter names to container_paramt instances.
void pop(std::size_t container_index)
Pop the top of the specialization stack for a given container.
Reference that points to a java_generic_parameter_tagt.
#define PRECONDITION(CONDITION)
The index of the container and the type parameter inside that container.