And I am currently getting an error with the *_3 part, stating "Illegal indirection".
I am trying to basically call the save_container function with the 4th arugment bound to save a non-pointer, so I would like to dereference the 3rd argument (which in this case would be an Eq_slot*).
Do I need to create a different save_multiline type function to save pointers in order to do this or is there another thing I do to make this work? (Possibly boost::lambda?)
#include <iostream>
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
void f(char i, char j, char k, char l)
{
std::cout << i << ' ' << j << ' ' << k << ' ' << l << std::endl;
}
int main()
{
usingnamespace boost::lambda;
char k = 'k';
bind(f, _1, _2, *_3, 'l')('i', 'j', &k);
}
My guess is that boost::bind can only permute the arguments and perform substitutions with expressions that do not depend on the arguments. I personally have no experience with neither lambda, nor bind.