diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/elna/boot/symbol.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/elna/boot/symbol.h b/include/elna/boot/symbol.h index c9ba88a..f9905c1 100644 --- a/include/elna/boot/symbol.h +++ b/include/elna/boot/symbol.h @@ -762,6 +762,22 @@ namespace elna::boot const std::vector<type>& arguments); /** + * Walks a declared parameter type and an actual argument type in parallel, + * binding a parameter the first time it is met and leaving every later + * occurrence to the ordinary assignability check. Both sides are resolved + * at every step, so a transparent instantiation is seen through and only a + * record-referent one is compared as an instantiation. + * + * \param parameters Type parameters of the generic procedure. + * \param bindings Bound type arguments, indexed like \p parameters. + * \param declared Declared parameter type. + * \param actual Actual argument type. + * \return Whether the declared and actual types match in shape. + */ + bool bind_arguments(const std::vector<type>& parameters, std::vector<type>& bindings, + const type& declared, const type& actual); + + /** * Resolves a type to the view layout and codegen see, in which an * instantiation is its generic's referent with the arguments dropped. * |
