Quantcast
Channel: warning: base class should be explictily initialized in the copy constructor - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by Kindread for warning: base class should be explictily initialized...

For any derived class, the base class needs to be constructed whenever the derived class is. If your base class doesn't have a default ( 0 argument ) constructor, you will have to specify how to...

View Article



Answer by Vlad from Moscow for warning: base class should be explictily...

If you explicitly define a copy constructor of a derived class and do not call in the ctor list the copy constructor of the base class then the compiler itself will call the default constructor for the...

View Article

Answer by arne for warning: base class should be explictily initialized in...

You're not initializing the base class in the copy constructor. Try this:Matrix(const Matrix & that) : Elements<Elements<T, N>, M>(that) { /* ... */}The initializer list of the derived...

View Article

warning: base class should be explictily initialized in the copy constructor

I'm writing a matrix class for CUDA processing. I've written a vector class (henceforth known as Elements) and used that for the matrix base.Here is the template definition:template <typename T,...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images

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