【C++】template 統合スレ -- STL/Boost/Loki, etc.
■ このスレッドは過去ログ倉庫に格納されています
001812
NGNGttp://www.kuzbass.ru/docs/isocpp/lib-utilities.html#lib.auto.ptr
↑には、
>template<class Y> auto_ptr(auto_ptr<Y>&) throw();
>Requires: Y* can be implicitly converted to X*.
>template<class Y> auto_ptr& operator=(auto_ptr<Y>& a) throw();
>Requires: Y* can be implicitly converted to X*. The expression delete get() is well formed.
っていうインターフェースがあるようで、
auto_ptrの規格は、>>12の最初のコードが
コンパイルできるように配慮されているように見えます。
同時に、余計な変換手段に見えるインターフェースもありますが・・・。
■ このスレッドは過去ログ倉庫に格納されています