Здравствуйте, Pavel Chikulaev, Вы писали:
PC>Здравствуйте, VNG, Вы писали:
PC><snipped>
PC>Спасибо!!
Незачто!
PC>[/c]
PC>(Кстати этот код идиотизм — от code bloat не спасает, зато разрешает всё...)
Согласен.
PC>Лечится это дела заменой его на
PC>PC> template<class _Ty>
PC> struct auto_ptr_ref
PC> { // proxy reference for auto_ptr copying
PC> auto_ptr_ref(auto_ptr<_Ty>& _Right)
PC> : _Ref(_Right)
PC> { // construct from compatible auto_ptr
PC> }
PC> auto_ptr<_Ty>& _Ref; // reference to constructor argument
PC> };
PC>
Не лечится. Так не будет компилироваться код:
std::auto_ptr<int> ptr(new int(0));
ptr = new int(1);
... << RSDN@Home 1.1.4 stable rev. 510>>