| 653 | } |
| 654 | |
| 655 | FunctionTable::Function* FunctionTable::find( |
| 656 | const Args& args, |
| 657 | const std::map<std::string, array>& kwargs) { |
| 658 | auto n_inputs = args.size() + kwargs.size(); |
| 659 | auto it = table.find(n_inputs); |
| 660 | if (it == table.end()) { |
| 661 | return nullptr; |
| 662 | } |
| 663 | |
| 664 | for (auto& fun : it->second) { |
| 665 | if (match(args, kwargs, fun)) { |
| 666 | return &fun; |
| 667 | } |
| 668 | } |
| 669 | |
| 670 | return nullptr; |
| 671 | } |
| 672 | |
| 673 | FunctionExporter::FunctionExporter( |
| 674 | const std::string& file, |