*
* \note As with pointers, constness of an \c AutoDispose object does
* \b not apply to the stored \c _Tp object. If the stored \c _Tp object
- * should be immutable, you should use <tt>AutoDispose\<const _Tp\><\tt>.
+ * should be immutable, you should use <tt>AutoDispose\<const _Tp\></tt>.
*
* Pass a filename to the application and provide the appropriate
- * code to be exectued when the file is no longer needed:
+ * code to be executed when the file is no longer needed:
* \code
* struct FileCache
* {
: _pimpl( new Impl( value_type() ) )
{}
+ /** Ctor taking dispose function and using default constructed value. */
+ explicit AutoDispose( const Dispose & dispose_r )
+ : _pimpl( new Impl( value_type(), dispose_r ) )
+ {}
+
/** Ctor taking value and no dispose function. */
- AutoDispose( param_type value_r )
+ explicit AutoDispose( param_type value_r )
: _pimpl( new Impl( value_r ) )
{}
reference operator*() const
{ return _pimpl->_value; }
- /** Pointer to the \c _Tp object (asserted to be <tt>!= NULL<\tt>). */
+ /** Pointer to the \c _Tp object (asserted to be <tt>!= NULL</tt>). */
value_type * operator->() const
{ return & _pimpl->_value; }