Yes, that's my thoughts too - and I made the same mistake. I just want to have the line of the error clarified.
--
Mats
Printable View
No, the setNext musn't take a pointer to const (const T*), because you can't demote to non-const w/o a cast (a bad cast).
You can take a const pointer (T* const), sure, but it doesn't really help.