Function pointer as template argument?
<p>Is it possible to pass a function pointer as a template argument without using a typedef?</p>

<pre><code>template&lt;class PF&gt;
class STC {
    PF old;
    PF&amp; ptr;
public:
    STC(PF pf, PF&amp; p)
        : old(*p), ptr(p) 
    {
        p = pf;
    }
    ~STC() {
        ptr = old;
    }
};

void foo() {}
void foo2() {}

int main() {
    void (*fp)() = foo;
    typedef void (*vfpv)();
    STC&lt;vfpv&gt; s(foo2, fp); // possible to write this line without using the typedef?
}
</code></pre>
