language: C++ 4.7.2 (gcc-4.7.2)
date: 400 days 19 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 <iostream>
 
void foo()
{
    std::cout << "global foo()" << std::endl;
}
 
struct A {
    void foo()
    {
    std::cout << "A::foo()" << std::endl;
    }
};
 
template <typename T>
struct B : public T {
    void call()
    {
        foo();
    }
};
 
int main(int argc, char **argv )
{
    B<A> b;
    b.call();
    return 0;
}