| 162 | |
| 163 | template <class Base, class T> |
| 164 | class TPointerBase: public TPointerCommon<Base, T> { |
| 165 | public: |
| 166 | inline T& operator*() const noexcept { |
| 167 | Y_ASSERT(this->AsT()); |
| 168 | |
| 169 | return *(this->AsT()); |
| 170 | } |
| 171 | |
| 172 | inline T& operator[](size_t n) const noexcept { |
| 173 | Y_ASSERT(this->AsT()); |
| 174 | |
| 175 | return (this->AsT())[n]; |
| 176 | } |
| 177 | }; |
| 178 | |
| 179 | /* |
| 180 | * void*-like pointers do not have operator* |