#include <iostream>
#include <string>
#include <boost/bind.hpp>
void foo(std::string const& dummy)
{
std::cout << "Yo: " << dummy << std::endl;
}
int main()
{
int* test;
std::string bar("platypus");
(boost::bind(&foo, bar))(test, test, test, test, test, test, test, test);
}
When run, it prints out, "Yo: platypus." It appears to completely ignore extra parameters. I'd expect to get a compile error. I accidentally introduced a bug into my code this way.