Comment 1 for bug 642347

Revision history for this message
Dmitry Pankratov (dremon) wrote :

Isolated test case (fails to compile on the assert statement):

#include <cassert>

template <typename A>
struct Base {
    template <typename T, typename V>
    void foo(T* target, void (V::*method)())
    {
        assert(dynamic_cast<T*>(target));
    }
};

struct C { void foo() {} };

int main()
{
    C c;
    Base<int>().foo(&c, &C::foo);
    return 0;
}