How can mem_fun_ref be used without function templates?
<p>I'm trying to use mem_fun_ref to send a reference to a member function of an object to another function, but I get <code>error C2064: term does not evaluate to a function taking 0 arguments.</code></p>

<p>I didn't reflect this in the example, but I need to send the mem_fun_ref_t to a virtual function, which is why I didn't just make Flip a function template that takes a simple function object.</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;functional&gt;

class Coin
{
public:
    Coin() {}
    std::string Flip ()
    {
        srand(23);
        int side = rand() % 2 + 1;

        std::string result = "";
        if (side == 1)
            result = "heads.";
        else
            result = "tails.";
        return result;
    }
};



std::string Flip(std::mem_fun_ref_t&lt;std::string, Coin&gt; flip)
{
    return flip();
}



int main()
{
    std::cout &lt;&lt; "Flipping a coin..." &lt;&lt; std::endl;
    std::string output = Flip(std::mem_fun_ref&lt;std::string, Coin&gt;(&amp;Coin::Flip));
    std::cout &lt;&lt; "The coin came up " &lt;&lt; output &lt;&lt; std::endl;
    return 0;
}
</code></pre>
