Template casting operator

J

Jonathan Turkanis

Why? 'pf = pd' expression will result into the use of compiler-
generated assignment operator and a construction of a temporary
on the right side, no? It should be equivalent to

{ Vector<float> temp(pd); pf = temp; }

No special assignment operator is needed here.

Correct me if I am wrong.

You're not -- I was :(.

Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,246
Members
46,839
Latest member
MartinaBur

Latest Threads

Top