marcossilvadecastro / googlemock

Automatically exported from code.google.com/p/googlemock
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Is it possible to mock function template methods? #168

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Given class

class Foo : public IFoo
{
    virtual void foo1();
    virtual void foo2();

    template <typename T>
    void foo3();
};

Is it possible to mock function template method foo3?

Original issue reported on code.google.com by duncan.r...@thomsonreuters.com on 24 Jun 2014 at 2:38

GoogleCodeExporter commented 9 years ago
no. It's not virtual.
You'd need some kind of type-erased variant type to virtualize it.

Original comment by billydon...@google.com on 24 Jun 2014 at 2:51