| 147 | |
| 148 | template< size_t idx > |
| 149 | auto_type replace( U* r ) // strong |
| 150 | { |
| 151 | BOOST_STATIC_ASSERT( idx < N ); |
| 152 | |
| 153 | this->enforce_null_policy( r, "Null pointer in 'ptr_array::replace()'" ); |
| 154 | |
| 155 | auto_type res( static_cast<U*>( this->base()[idx] ) ); // nothrow |
| 156 | this->base()[idx] = r; // nothrow |
| 157 | return boost::ptr_container::move(res); // nothrow |
| 158 | } |
| 159 | |
| 160 | template< size_t idx, class V > |
| 161 | auto_type replace( std::auto_ptr<V> r ) |