0
Shared pointer with two template parameter
Hi Below is my shared pointer implementation: https://www.sololearn.com/en/compiler-playground/cckRLm8Eai3f I am confused about last line in main function. I thought it should give me compilation error as we needed to have copy constructor implemented taking two template parameters T and U. Why it is not throwing error? What is this enhancement? https://sololearn.com/compiler-playground/cckRLm8Eai3f/?ref=app
2 Answers
0
maybe you were thinking of
sharedptr<base> bdptr(dptr);
? This is not defined.
+ 1
Thanks. It's what I was missing.