-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solve ambiguity problems #14
Comments
The issue of overloading ambiguity occurs if we have an overloaded function with the same parameters. This can happen, e.g., for scalar execution, since the register_type is the same as the imask_type for uint8_t.
To solve this problem, we can use SFINAE like the following (see commit 6e42c4f):
First, we must determine how to represent the parameters passed into the free function. This can be done by adding a type definition (param_tuple_t) to the implementation-struct storing the parameter type information in a std::tuple (see Change 1). As this solution seems to work, it has some caveats. 2. It only works for 1 overload. 3. It introduces a ton of preprocessor macros. |
As we allow function overloading through
functor_name
we can end up in a situation where the same function signature is generated twice (e.g., for scalar definition + mask/imask primitives, since the mask type equals the imask type).Currently, we work around that issue by leaving out the offending definitions. However, this seems to be bad practice.
Thus, we need a better solution.
The text was updated successfully, but these errors were encountered: