diff --git a/alib2std/src/extensions/ptr_vector.hpp b/alib2std/src/extensions/ptr_vector.hpp index 20815361afec1f974b07794cdd968a3c5a390c47..d08a994c5ea32b09f6192bae585b270047045119 100644 --- a/alib2std/src/extensions/ptr_vector.hpp +++ b/alib2std/src/extensions/ptr_vector.hpp @@ -59,7 +59,8 @@ public: insert ( cbegin ( ), first, last ); } - ptr_vector ( size_type count, const T& value ) { + template < class R > + ptr_vector ( size_type count, const R & value ) { insert ( cbegin ( ), count, value ); } @@ -91,7 +92,8 @@ public: return *this; } - void assign ( size_type count, const T& value ) { + template < class R > + void assign ( size_type count, const R & value ) { clear ( ); insert ( cbegin ( ), count, value ); } @@ -140,14 +142,6 @@ public: return * m_data.back ( ); } - /* T * const * data ( ) noexcept { - return m_data.data ( ); - } - - T const * const * data ( ) const noexcept { - return m_data.data ( ); - } */ - iterator begin ( ) noexcept { return dereferencer ( m_data.begin ( ) ); } @@ -240,7 +234,7 @@ public: template < class R, class ... Args > iterator emplace_set ( const_iterator pos, Args && ... args ) { - return set ( pos, new R ( std::forward < R > ( args ) ... ) ); + return set ( pos, new R ( std::forward < Args > ( args ) ... ) ); } template < class R >