Home

On 8 10 , 11 53 , "Alf P. Steinbach" <al...@start.no> wrote:
> An explicit constructor must be called explictly.
> You don't call it explicitly, so how can you expect it to be called?

So, you mean if I define a explicit copy constructor, there can not be
any temporary object in my code, right?


> Apart from that, first, you really don't want to use reinterpret_cast as
> you do above, and secondly, the templated constructor isn't a copy
> constructor -- a "copy constructor" is by definition not templated.

The templated constructor is used for type casting from Derived<U> to
Derived<T>.

Thanks for your informative tips.
Big thanks goes to you.

previous
next

Re: Python 3K or Python 2.9?
Re: static member object initialization
Re: Chaining programs with pipe
help, I'll go crazy
Re: Segmentation fault..
Kidprotect
Mam Marzenie
Fundacja Iskierka
Rodzic Po Ludzku
Fundacja Sloneczko