T
Triple-DES
Submitted for your consideration:
#include <functional>
struct C { void f(const int&) {} };
template <typename F>
void call(F f)
{
f(123);
}
int main()
{
using namespace std;
C c;
call ( bind1st(mem_fun( &C::f), &c) );
}
This seemingly fails on most implementations because the library
attempts to form a reference to a reference. Is it possible to bind
this function using only the C++03 standard library utilities?
#include <functional>
struct C { void f(const int&) {} };
template <typename F>
void call(F f)
{
f(123);
}
int main()
{
using namespace std;
C c;
call ( bind1st(mem_fun( &C::f), &c) );
}
This seemingly fails on most implementations because the library
attempts to form a reference to a reference. Is it possible to bind
this function using only the C++03 standard library utilities?