5 #if __cplusplus < 201703L
9 namespace traffic_rules {
13 auto elem = registry.find(std::make_pair(location, participant));
15 if (elem == registry.end() && participant.compare(0, vehicle.size(), vehicle) == 0) {
19 if (elem != registry.end()) {
20 configuration[
"location"] = location;
21 configuration[
"participant"] = participant;
22 return elem->second(configuration);
24 throw InvalidInputError(
"No matching traffic rules found for location " + location +
", participant " + participant);
28 std::vector<std::string> rules;
30 return utils::transform(registry, [](
const auto& elem) {
return elem.first; });