2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 17:12:22 +00:00
Files
python/pyste/example/virtual.h
Bruno da Silva de Oliveira 29d537571b - Unit tests for the examples
[SVN r17987]
2003-03-19 02:47:29 +00:00

26 lines
308 B
C++

namespace virtual_ {
struct C
{
public:
virtual int f()
{
return f_abs();
}
const char* get_name()
{
return name();
}
protected:
virtual int f_abs() = 0;
private:
virtual const char* name() { return "C"; }
};
int call_f(C& c) { return c.f(); }
}