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

Investigate if get_nth can return the original type. #15

Closed
Roflincopter opened this issue Mar 10, 2014 · 1 comment
Closed

Investigate if get_nth can return the original type. #15

Roflincopter opened this issue Mar 10, 2014 · 1 comment

Comments

@Roflincopter
Copy link
Owner

I have the feeling I can improve upon the get_nth function in the static dispatch. making returning variants and applying visitors. This way I can couple vieuw to certain data types for instance the length/duration field in the dmp-library. This should not be a flat string with seconds but should be converted by Qt into a duration like representation. This can only be done if I have some original knowledge of the type. Boost fusion still knows the type but i throw it away when getting the nth member for convenience.

@Roflincopter
Copy link
Owner Author

Well this is not possible, We thought about it, but we have a runtime constant as a parameter and there is no way we can turn this in to a compile time constant before we enter the body. So there is no way to use this in the return type of our system. Therefore making it return the actual type is impossible. But to maintain flexibility the method now returns a boost::any. This might change to a boost::variant.

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