- 549 名前:デフォルトの名無しさん mailto:sage [2012/06/05(火) 21:48:37.88 ]
- うん。だって、xは非constだから、x.begin()は iterator begin() { return iterator(this); } を呼び出してる。
僕の見た限り、iterator を const_iterator に自動変換するコードはなさそうなのでそれでエラーになってる。 struct const_iterator_ { const_iterator_(const T* p) : ptr(p) {} template< typename T > const_iterator_( iterator_< T > const &it ) : ptr( it.ptr ) {} const T* ptr; }; これでいいんじゃないかな?
|

|