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

continue on tuning ptr_vector

parent d2f522ef
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ public:
using reference = value_type &;
using const_reference = const value_type &;
using pointer = T *;
using const_pointer = T * const;
using const_pointer = const T *;
 
using iterator = dereferencing_iterator < typename std::vector < T * >::iterator >;
using const_iterator = dereferencing_iterator < typename std::vector < T * >::const_iterator >;
......@@ -50,8 +50,9 @@ public:
insert ( cbegin ( ), std::move ( init ) );
}
 
template < class R >
explicit ptr_vector ( size_type count ) {
resize ( count );
resize < R > ( count );
}
 
template < class InputIt >
......@@ -294,9 +295,9 @@ public:
insert ( cend ( ), std::forward < R > ( value ) );
}
 
template < class ... Args >
template < class R = T, class ... Args >
reference emplace_back ( Args && ... args ) {
return * emplace ( cend ( ), std::forward < Args > ( args ) ... );
return * emplace < R > ( cend ( ), std::forward < Args > ( args ) ... );
}
 
void pop_back ( ) {
......
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