11#ifndef __AUDACITY_WX_ARRAY_STRING_EX__
12#define __AUDACITY_WX_ARRAY_STRING_EX__
20 using wxArrayString::wxArrayString;
23 template<
typename Iterator >
26 this->reserve( std::distance( start, finish ) );
27 while( start != finish )
28 this->push_back( *start++ );
31 template<
typename T >
34 this->reserve( this->
size() + items.size() );
35 for (
const auto &item : items )
36 this->push_back( item );
48 if (
this != &other ) {
55 using wxArrayString::insert;
57 template<
typename T >
58 iterator
insert( const_iterator pos, std::initializer_list< T > items )
60 const auto index = pos - ((
const wxArrayString*)
this)->begin();
61 this->wxArrayString::Insert( {}, index, items.size() );
62 auto result = this->
begin() + index, iter = result;
63 for (
auto pItem = items.begin(), pEnd = items.end();
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
wxArrayStringEx(Iterator start, Iterator finish)
wxArrayStringEx(wxArrayString &&other)
The move operations can take arguments of the base class wxArrayString.
wxArrayStringEx & operator=(wxArrayString &&other)
The move operations can take arguments of the base class wxArrayString.
wxArrayStringEx()=default
iterator insert(const_iterator pos, std::initializer_list< T > items)
wxArrayStringEx(std::initializer_list< T > items)
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
const char * begin(const char *str) noexcept