language: C++ 4.7.2 (gcc-4.7.2)
date: 175 days 23 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <set>
 
struct Base
{
    virtual int F(int);
};
 
struct Derived : public Base
{
    int F(int);
};
 
template<typename Type, typename Return, typename Parameter, Return (Type::*)(Parameter)> struct W
{
};
 
int main(int argc, char **argv)
{
        typedef std::set<int> setint;
 
        std::pair<setint::iterator, bool> (setint::*p_1)(const setint::value_type &) = &setint::insert;
        W<setint, std::pair<setint::iterator, bool>, const setint::value_type &, &setint::insert> w_1;
 
    int (Derived::*p_2)(int) = &Derived::F;
        W<Derived, int, int, &Derived::F> w_2;
 
        return 0;
}