language: C++ 4.7.2 (gcc-4.7.2)
date: 617 days 22 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
struct Shape;
struct Circle;
struct Rectangle;
 
struct Shape
{
    virtual bool is_equal(const Shape& s) const { return false; };
};
 
struct Rectangle : Shape
{
    using Shape::is_equal;
    virtual bool is_equal(const Rectangle& r) const { return true; };
};
 
int main(void)
{
    Rectangle x;
    Shape y;
    return x.is_equal(y);
}