Skip to content
Snippets Groups Projects
Commit d2f522ef authored by Jan Trávníček's avatar Jan Trávníček
Browse files

some fixes in ptr_vector

parent 7bc88463
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,8 @@ public: ...@@ -59,7 +59,8 @@ public:
insert ( cbegin ( ), first, last ); 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 ); insert ( cbegin ( ), count, value );
} }
   
...@@ -91,7 +92,8 @@ public: ...@@ -91,7 +92,8 @@ public:
return *this; return *this;
} }
   
void assign ( size_type count, const T& value ) { template < class R >
void assign ( size_type count, const R & value ) {
clear ( ); clear ( );
insert ( cbegin ( ), count, value ); insert ( cbegin ( ), count, value );
} }
...@@ -140,14 +142,6 @@ public: ...@@ -140,14 +142,6 @@ public:
return * m_data.back ( ); 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 { iterator begin ( ) noexcept {
return dereferencer ( m_data.begin ( ) ); return dereferencer ( m_data.begin ( ) );
} }
...@@ -240,7 +234,7 @@ public: ...@@ -240,7 +234,7 @@ public:
   
template < class R, class ... Args > template < class R, class ... Args >
iterator emplace_set ( const_iterator pos, Args && ... 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 > template < class R >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment