Skip to content
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

LIBFLATARRAY_REGISTER_SOA does not work with class templates having more than one template parameter #4

Open
gentryx opened this issue Jan 1, 2016 · 1 comment
Assignees
Milestone

Comments

@gentryx
Copy link
Owner

gentryx commented Jan 1, 2016

Hi,

i tried to use LibFlatArray with a class template which has more than one template parameter and it didn't compile. A simple example can be found here: https://gist.github.com/anonymous/b188cd1459c1b6d5ca6f

The error message is: error: macro "LIBFLATARRAY_REGISTER_SOA" passed 3 arguments, but takes just 2 LIBFLATARRAY_REGISTER_SOA(Cell<4, 1>, ((double)(sum))((double)(value)))

Since it works fine with just one template parameter, the issue might be related to the comma inside Cell<4, 1>.

Originally reported by @shifty91

Moved from https://bitbucket.org/gentryx/libflatarray/issues/16/libflatarray_register_soa-does-not-work

@gentryx gentryx added this to the 0.3.0 milestone Jan 1, 2016
@gentryx gentryx self-assigned this Jan 1, 2016
@gentryx
Copy link
Owner Author

gentryx commented Jan 1, 2016

This issue could potentially be resolved by wrapping the class name in parentheses. But that would still require the user to explicitly list all template instantiations, which is tedious and cumbersome. I'd prefer a solution which leaves the template parameters open (after all, all the macro does is to define some further templates, adding more parameters should work). I'll look into this.

@gentryx gentryx changed the title https://bitbucket.org/gentryx/libflatarray/issues/16/libflatarray_register_soa-does-not-work LIBFLATARRAY_REGISTER_SOA does not work with class templates having more than one template parameter Jan 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant