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

boost::fusion::vector_tie(args...) Error #206

Closed
agerlach opened this issue May 13, 2016 · 7 comments
Closed

boost::fusion::vector_tie(args...) Error #206

agerlach opened this issue May 13, 2016 · 7 comments

Comments

@agerlach
Copy link

Denis, I am trying to migrate my develop environment from OSX to Ubuntu, but I am having problems getting my symbolic examples (#202, #203) to compile on the Ubuntu side. Your symbolic example compiles fine. The compiler spits back many errors like:

/usr/local/include/boost/fusion/container/generation/detail/preprocessed/vector_tie10.hpp:47:5: note: template argument deduction/substitution failed:
In file included from /src/main.cpp:160:0:
/vexcl/vexcl/generator.hpp:678:46: note: candidate expects 2 arguments, 18 provided
boost::fusion::vector_tie(args...),

Is this a boost & c++11 issue? I tried both apt-get install libboost-all-dev and manually compiling boost 1.56 via the following with the same results:

$ ./bootstrap.sh --with-toolset=gcc --prefix=/usr/local
$ ./b2 -j4 toolset=gcc variant=release link=shared threading=multi address-model=64 cxxflags=-std=c++11 install

Do you have any suggestions?

@ddemidov
Copy link
Owner

Could you please provide a full example to try?

@ddemidov
Copy link
Owner

This could be related: http://stackoverflow.com/questions/2547787/boost-fusion-strange-problem-depending-on-number-of-elements-on-a-vector. Namely, boost::fusion may have a limit on the maximum number of arguments that may need to be increased.

@agerlach
Copy link
Author

I just tried printing out BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY both in OSX and Ubuntu and they both print 6, so I don't think that's the issue. I didn't expect such a quick response! I need to call it quits for the day, I'll look at it more early next week. Thanks.

@ddemidov
Copy link
Owner

A possible workaround would be to use the new runtime interface from #205.

@agerlach
Copy link
Author

I tried adding #define BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY 25 per your link, but I get the same errors. I am still working through this, but I noticed a discrepancy in the results returned depending on what runtime interface is used. I will submit this as a new issue.

@agerlach
Copy link
Author

agerlach commented May 16, 2016

Upgrading from Boost 1.56 to 1.60 fixes this issue. I am working on putting an example together for you that demonstrates this.

@ddemidov
Copy link
Owner

ddemidov commented May 17, 2016

I can reproduce this with boost 1.56. The problem is that fusion::vector_tie is defined for up to 10 parameters in 1.56. Since then, they replaced the definition of vector_tie to use c++11 variadic templates. Anyway, 23da8da gets rid of fusion::vector_tie in implementation of the generated kernel, so you should be able to use boost 1.56 again if you need to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants