language: C++ 4.7.2 (gcc-4.7.2)
date: 456 days 0 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
 
struct A
{
    void f() { std::cout << "A::f()" << std::endl; }
};
 
struct B : A
{
    void f(int) { std::cout << "B::f(int)" << std::endl; }
};
 
int main() {
        B b;
        b.f(10);  //ok
        b.A::f(); //ok - explicitly selecting the hidden function using scope resolution
        return 0;
}