|
|
От: |
rg45
|
|
| Дата: | 09.02.18 11:17 | ||
| Оценка: | 4 (2) +2 | ||
template <typename TOwner>
class Base
{
public:
// . . .
private:
TOwner& derived() {return static_cast<TOwner&>(*this); }
const TOwner& derived() const {return static_cast<const TOwner&>(*this); }
};
class Derived : public Base<Derived>
{
};