Quantcast
Viewing latest article 3
Browse Latest Browse All 4

Answer by chrisaycock for Why do I have to access template base class members through the this pointer?

The x is hidden during the inheritance. You can unhide via:

template <typename T>class derived : public base<T> {public:    using base<T>::x;             // added "using" statement    int f() { return x; }};

Viewing latest article 3
Browse Latest Browse All 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>