Embedded Template Library  1.0
flat_multiset.h
Go to the documentation of this file.
1 
3 /******************************************************************************
4 The MIT License(MIT)
5 
6 Embedded Template Library.
7 https://github.com/ETLCPP/etl
8 https://www.etlcpp.com
9 
10 Copyright(c) 2015 jwellbelove
11 
12 Permission is hereby granted, free of charge, to any person obtaining a copy
13 of this software and associated documentation files(the "Software"), to deal
14 in the Software without restriction, including without limitation the rights
15 to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
16 copies of the Software, and to permit persons to whom the Software is
17 furnished to do so, subject to the following conditions :
18 
19 The above copyright notice and this permission notice shall be included in all
20 copies or substantial portions of the Software.
21 
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
25 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 SOFTWARE.
29 ******************************************************************************/
30 
31 #ifndef ETL_FLAT_MULTISET_INCLUDED
32 #define ETL_FLAT_MULTISET_INCLUDED
33 
34 #include "platform.h"
36 #include "pool.h"
37 #include "placement_new.h"
38 
39 #if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && ETL_USING_STL
40  #include <initializer_list>
41 #endif
42 
43 #undef ETL_FILE
44 #define ETL_FILE "4"
45 
46 //*****************************************************************************
52 //*****************************************************************************
53 
54 namespace etl
55 {
56  //***************************************************************************
60  //***************************************************************************
61  template <typename T, typename TKeyCompare = etl::less<T> >
62  class iflat_multiset : private etl::ireference_flat_multiset<T, TKeyCompare>
63  {
64  private:
65 
67  typedef typename refset_t::lookup_t lookup_t;
68  typedef etl::ipool storage_t;
69 
70  public:
71 
72  typedef T key_type;
73  typedef T value_type;
74  typedef TKeyCompare key_compare;
75  typedef value_type& reference;
76  typedef const value_type& const_reference;
77 #if ETL_CPP11_SUPPORTED
78  typedef value_type&& rvalue_reference;
79 #endif
80  typedef value_type* pointer;
81  typedef const value_type* const_pointer;
82  typedef size_t size_type;
83 
84  typedef typename refset_t::iterator iterator;
86 
87  typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
88  typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
89  typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
90 
91  public:
92 
93  //*********************************************************************
96  //*********************************************************************
98  {
99  return refset_t::begin();
100  }
101 
102  //*********************************************************************
105  //*********************************************************************
107  {
108  return refset_t::begin();
109  }
110 
111  //*********************************************************************
114  //*********************************************************************
116  {
117  return refset_t::end();
118  }
119 
120  //*********************************************************************
123  //*********************************************************************
125  {
126  return refset_t::end();
127  }
128 
129  //*********************************************************************
132  //*********************************************************************
134  {
135  return refset_t::cbegin();
136  }
137 
138  //*********************************************************************
141  //*********************************************************************
143  {
144  return refset_t::cend();
145  }
146 
147  //*********************************************************************
150  //*********************************************************************
151  reverse_iterator rbegin()
152  {
153  return refset_t::rbegin();
154  }
155 
156  //*********************************************************************
159  //*********************************************************************
160  const_reverse_iterator rbegin() const
161  {
162  return refset_t::rbegin();
163  }
164 
165  //*********************************************************************
168  //*********************************************************************
169  reverse_iterator rend()
170  {
171  return refset_t::rend();
172  }
173 
174  //*********************************************************************
177  //*********************************************************************
178  const_reverse_iterator rend() const
179  {
180  return refset_t::rend();
181  }
182 
183  //*********************************************************************
186  //*********************************************************************
187  const_reverse_iterator crbegin() const
188  {
189  return refset_t::crbegin();
190  }
191 
192  //*********************************************************************
195  //*********************************************************************
196  const_reverse_iterator crend() const
197  {
198  return refset_t::crend();
199  }
200 
201  //*********************************************************************
207  //*********************************************************************
208  template <typename TIterator>
209  void assign(TIterator first, TIterator last)
210  {
211 #if defined(ETL_DEBUG)
212  difference_type d = etl::distance(first, last);
213  ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multiset_full));
214 #endif
215 
216  clear();
217 
218  while (first != last)
219  {
220  insert(*first++);
221  }
222  }
223 
224  //*********************************************************************
228  //*********************************************************************
229  ETL_OR_STD::pair<iterator, bool> insert(const_reference value)
230  {
231  ETL_OR_STD::pair<iterator, bool> result(end(), false);
232 
233  ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
234 
235  iterator i_element = etl::lower_bound(begin(), end(), value, compare);
236 
237  value_type* pvalue = storage.allocate<value_type>();
238  ::new (pvalue) value_type(value);
239  ETL_INCREMENT_DEBUG_COUNT
240  result = refset_t::insert_at(i_element, *pvalue);
241 
242  return result;
243  }
244 
245 #if ETL_CPP11_SUPPORTED
246  //*********************************************************************
250  //*********************************************************************
251  ETL_OR_STD::pair<iterator, bool> insert(rvalue_reference value)
252  {
253  ETL_OR_STD::pair<iterator, bool> result(end(), false);
254 
255  ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
256 
257  iterator i_element = etl::lower_bound(begin(), end(), value, compare);
258 
259  value_type* pvalue = storage.allocate<value_type>();
260  ::new (pvalue) value_type(etl::move(value));
261  ETL_INCREMENT_DEBUG_COUNT
262  result = refset_t::insert_at(i_element, *pvalue);
263 
264  return result;
265  }
266 #endif
267 
268  //*********************************************************************
273  //*********************************************************************
274  iterator insert(iterator position, const_reference value)
275  {
276  return insert(value).first;
277  }
278 
279 #if ETL_CPP11_SUPPORTED
280  //*********************************************************************
285  //*********************************************************************
286  iterator insert(iterator position, rvalue_reference value)
287  {
288  return insert(etl::move(value)).first;
289  }
290 #endif
291 
292  //*********************************************************************
298  //*********************************************************************
299  template <class TIterator>
300  void insert(TIterator first, TIterator last)
301  {
302  while (first != last)
303  {
304  insert(*first++);
305  }
306  }
307 
308  //*************************************************************************
310  //*************************************************************************
311  template <typename T1>
312  ETL_OR_STD::pair<iterator, bool> emplace(const_reference value)
313  {
314  return insert(value);
315  }
316 
317  //*************************************************************************
319  //*************************************************************************
320 #if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT
321  template <typename ... Args>
322  ETL_OR_STD::pair<iterator, bool> emplace(Args && ... args)
323  {
324  ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
325 
326  // Create it.
327  value_type* pvalue = storage.allocate<value_type>();
328  ::new (pvalue) value_type(etl::forward<Args>(args)...);
329 
330  iterator i_element = lower_bound(*pvalue);
331 
332  ETL_INCREMENT_DEBUG_COUNT
333  return ETL_OR_STD::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
334  }
335 #else
336  //*************************************************************************
338  //*************************************************************************
339  template <typename T1>
340  ETL_OR_STD::pair<iterator, bool> emplace(const T1& value1)
341  {
342  ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
343 
344  // Create it.
345  value_type* pvalue = storage.allocate<value_type>();
346  ::new (pvalue) value_type(value1);
347 
348  iterator i_element = lower_bound(*pvalue);
349 
350  ETL_INCREMENT_DEBUG_COUNT
351  return ETL_OR_STD::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
352  }
353 
354  //*************************************************************************
356  //*************************************************************************
357  template <typename T1, typename T2>
358  ETL_OR_STD::pair<iterator, bool> emplace(const T1& value1, const T2& value2)
359  {
360  ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
361 
362  // Create it.
363  value_type* pvalue = storage.allocate<value_type>();
364  ::new (pvalue) value_type(value1, value2);
365 
366  iterator i_element = lower_bound(*pvalue);
367 
368  ETL_INCREMENT_DEBUG_COUNT
369  return ETL_OR_STD::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
370  }
371 
372  //*************************************************************************
374  //*************************************************************************
375  template <typename T1, typename T2, typename T3>
376  ETL_OR_STD::pair<iterator, bool> emplace(const T1& value1, const T2& value2, const T3& value3)
377  {
378  ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
379 
380  // Create it.
381  value_type* pvalue = storage.allocate<value_type>();
382  ::new (pvalue) value_type(value1, value2, value3);
383 
384  iterator i_element = lower_bound(*pvalue);
385 
386  ETL_INCREMENT_DEBUG_COUNT
387  return ETL_OR_STD::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
388  }
389 
390  //*************************************************************************
392  //*************************************************************************
393  template <typename T1, typename T2, typename T3, typename T4>
394  ETL_OR_STD::pair<iterator, bool> emplace(const T1& value1, const T2& value2, const T3& value3, const T4& value4)
395  {
396  ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
397 
398  // Create it.
399  value_type* pvalue = storage.allocate<value_type>();
400  ::new (pvalue) value_type(value1, value2, value3, value4);
401 
402  iterator i_element = lower_bound(*pvalue);
403 
404  ETL_INCREMENT_DEBUG_COUNT
405  return ETL_OR_STD::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
406  }
407 #endif
408 
409  //*********************************************************************
413  //*********************************************************************
414  size_t erase(const_reference key)
415  {
416  ETL_OR_STD::pair<iterator, iterator> range = equal_range(key);
417 
418  if (range.first == end())
419  {
420  return 0;
421  }
422  else
423  {
424  size_t d = etl::distance(range.first, range.second);
425  erase(range.first, range.second);
426  return d;
427  }
428  }
429 
430  //*********************************************************************
433  //*********************************************************************
434  void erase(iterator i_element)
435  {
436  etl::destroy_at(etl::addressof(*i_element));
437  storage.release(etl::addressof(*i_element));
438  refset_t::erase(i_element);
439  ETL_DECREMENT_DEBUG_COUNT
440  }
441 
442  //*********************************************************************
448  //*********************************************************************
449  void erase(iterator first, iterator last)
450  {
451  iterator itr = first;
452 
453  while (itr != last)
454  {
456  storage.release(etl::addressof(*itr));
457  ++itr;
458  ETL_DECREMENT_DEBUG_COUNT
459  }
460 
461  refset_t::erase(first, last);
462  }
463 
464  //*************************************************************************
466  //*************************************************************************
467  void clear()
468  {
470  {
471  storage.release_all();
472  }
473  else
474  {
475  iterator itr = begin();
476 
477  while (itr != end())
478  {
480  storage.release(etl::addressof(*itr));
481  ++itr;
482  }
483  }
484 
485  ETL_RESET_DEBUG_COUNT
486  refset_t::clear();
487  }
488 
489  //*********************************************************************
493  //*********************************************************************
494  iterator find(const_reference key)
495  {
496  return refset_t::find(key);
497  }
498 
499  //*********************************************************************
503  //*********************************************************************
504  const_iterator find(const_reference key) const
505  {
506  return refset_t::find(key);
507  }
508 
509  //*********************************************************************
513  //*********************************************************************
514  size_t count(const_reference key) const
515  {
516  return refset_t::count(key);
517  }
518 
519  //*********************************************************************
523  //*********************************************************************
524  iterator lower_bound(const_reference key)
525  {
526  return refset_t::lower_bound(key);
527  }
528 
529  //*********************************************************************
533  //*********************************************************************
534  const_iterator lower_bound(const_reference key) const
535  {
536  return refset_t::lower_bound(key);
537  }
538 
539  //*********************************************************************
543  //*********************************************************************
544  iterator upper_bound(const_reference key)
545  {
546  return refset_t::upper_bound(key);
547  }
548 
549  //*********************************************************************
553  //*********************************************************************
554  const_iterator upper_bound(const_reference key) const
555  {
556  return refset_t::upper_bound(key);
557  }
558 
559  //*********************************************************************
563  //*********************************************************************
564  ETL_OR_STD::pair<iterator, iterator> equal_range(const_reference key)
565  {
566  return refset_t::equal_range(key);
567  }
568 
569  //*********************************************************************
573  //*********************************************************************
574  ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(const_reference key) const
575  {
576  return refset_t::equal_range(key);
577  }
578 
579  //*************************************************************************
581  //*************************************************************************
583  {
584  if (&rhs != this)
585  {
586  assign(rhs.cbegin(), rhs.cend());
587  }
588 
589  return *this;
590  }
591 
592 #if ETL_CPP11_SUPPORTED
593  //*************************************************************************
595  //*************************************************************************
597  {
598  move_container(etl::move(rhs));
599 
600  return *this;
601  }
602 #endif
603 
604  //*************************************************************************
607  //*************************************************************************
608  size_type size() const
609  {
610  return refset_t::size();
611  }
612 
613  //*************************************************************************
616  //*************************************************************************
617  bool empty() const
618  {
619  return refset_t::empty();
620  }
621 
622  //*************************************************************************
625  //*************************************************************************
626  bool full() const
627  {
628  return refset_t::full();
629  }
630 
631  //*************************************************************************
634  //*************************************************************************
635  size_type capacity() const
636  {
637  return refset_t::capacity();
638  }
639 
640  //*************************************************************************
643  //*************************************************************************
644  size_type max_size() const
645  {
646  return refset_t::max_size();
647  }
648 
649  //*************************************************************************
652  //*************************************************************************
653  size_t available() const
654  {
655  return refset_t::available();
656  }
657 
658  protected:
659 
660  //*********************************************************************
662  //*********************************************************************
663  iflat_multiset(lookup_t& lookup_, storage_t& storage_)
664  : refset_t(lookup_),
665  storage(storage_)
666  {
667  }
668 
669 #if ETL_CPP11_SUPPORTED
670  //*************************************************************************
673  //*************************************************************************
674  void move_container(iflat_multiset&& rhs)
675  {
676  if (&rhs != this)
677  {
678  this->clear();
679 
682 
683  // Add all of the elements.
684  while (first != last)
685  {
686  this->insert(etl::move(*first++));
687  }
688  }
689  }
690 #endif
691 
692  private:
693 
694  // Disable copy construction.
696 
697  storage_t& storage;
698 
699  TKeyCompare compare;
700 
702  ETL_DECLARE_DEBUG_COUNT
703 
704  //*************************************************************************
706  //*************************************************************************
707 #if defined(ETL_POLYMORPHIC_FLAT_MULTISET) || defined(ETL_POLYMORPHIC_CONTAINERS)
708  public:
709  virtual ~iflat_multiset()
710  {
711  }
712 #else
713  protected:
715  {
716  }
717 #endif
718  };
719 
720  //***************************************************************************
726  //***************************************************************************
727  template <typename T, typename TKeyCompare>
729  {
730  return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
731  }
732 
733  //***************************************************************************
739  //***************************************************************************
740  template <typename T, typename TKeyCompare>
742  {
743  return !(lhs == rhs);
744  }
745 
746  //***************************************************************************
752  //***************************************************************************
753  template <typename T, const size_t MAX_SIZE_, typename TCompare = etl::less<T> >
754  class flat_multiset : public etl::iflat_multiset<T, TCompare>
755  {
756  public:
757 
758  static const size_t MAX_SIZE = MAX_SIZE_;
759 
760  //*************************************************************************
762  //*************************************************************************
764  : etl::iflat_multiset<T, TCompare>(lookup, storage)
765  {
766  }
767 
768  //*************************************************************************
770  //*************************************************************************
772  : iflat_multiset<T, TCompare>(lookup, storage)
773  {
774  this->assign(other.cbegin(), other.cend());
775  }
776 
777 #if ETL_CPP11_SUPPORTED
778  //*************************************************************************
780  //*************************************************************************
782  : etl::iflat_multiset<T, TCompare>(lookup, storage)
783  {
784  if (&other != this)
785  {
786  this->move_container(etl::move(other));
787  }
788  }
789 #endif
790 
791  //*************************************************************************
796  //*************************************************************************
797  template <typename TIterator>
798  flat_multiset(TIterator first, TIterator last)
799  : iflat_multiset<T, TCompare>(lookup, storage)
800  {
801  this->assign(first, last);
802  }
803 
804 #if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && ETL_USING_STL
805  //*************************************************************************
807  //*************************************************************************
808  flat_multiset(std::initializer_list<T> init)
809  : iflat_multiset<T, TCompare>(lookup, storage)
810  {
811  this->assign(init.begin(), init.end());
812  }
813 #endif
814 
815  //*************************************************************************
817  //*************************************************************************
819  {
820  this->clear();
821  }
822 
823  //*************************************************************************
825  //*************************************************************************
827  {
828  if (&rhs != this)
829  {
830  this->assign(rhs.cbegin(), rhs.cend());
831  }
832 
833  return *this;
834  }
835 
836 #if ETL_CPP11_SUPPORTED
837  //*************************************************************************
839  //*************************************************************************
841  {
842  if (&rhs != this)
843  {
844  this->move_container(etl::move(rhs));
845  }
846 
847  return *this;
848  }
849 #endif
850 
851  private:
852 
853  typedef typename etl::iflat_multiset<T, TCompare>::value_type node_t;
854 
855  // The pool of nodes.
857 
858  // The vector that stores pointers to the nodes.
860  };
861 
862  //*************************************************************************
864  //*************************************************************************
865 #if ETL_CPP17_SUPPORTED && ETL_NOT_USING_STLPORT && ETL_USING_STL
866  template <typename T, typename... Ts>
867  flat_multiset(T, Ts...)
868  ->flat_multiset<etl::enable_if_t<(etl::is_same_v<T, Ts> && ...), T>, 1U + sizeof...(Ts)>;
869 #endif
870 }
871 
872 #undef ETL_FILE
873 
874 #endif
Definition: reference_flat_multiset.h:73
Definition: reference_flat_multiset.h:221
Definition: reference_flat_multiset.h:123
Definition: reference_flat_multiset.h:103
iterator upper_bound(parameter_t key)
Definition: reference_flat_multiset.h:647
size_t count(parameter_t key) const
Definition: reference_flat_multiset.h:615
iterator begin()
Definition: reference_flat_multiset.h:327
reverse_iterator rbegin()
Definition: reference_flat_multiset.h:381
size_t erase(parameter_t key)
Definition: reference_flat_multiset.h:517
bool empty() const
Definition: reference_flat_multiset.h:695
ETL_OR_STD::pair< iterator, bool > insert_at(iterator i_element, reference value)
Definition: reference_flat_multiset.h:751
reverse_iterator rend()
Definition: reference_flat_multiset.h:399
size_t available() const
Definition: reference_flat_multiset.h:731
iterator find(parameter_t key)
Definition: reference_flat_multiset.h:567
size_type size() const
Definition: reference_flat_multiset.h:686
ETL_OR_STD::pair< iterator, iterator > equal_range(parameter_t key)
Definition: reference_flat_multiset.h:667
bool full() const
Definition: reference_flat_multiset.h:704
void clear()
Clears the reference_flat_multiset.
Definition: reference_flat_multiset.h:557
iterator end()
Definition: reference_flat_multiset.h:345
iterator lower_bound(parameter_t key)
Definition: reference_flat_multiset.h:627
size_type capacity() const
Definition: reference_flat_multiset.h:713
const_reverse_iterator crbegin() const
Definition: reference_flat_multiset.h:417
const_reverse_iterator crend() const
Definition: reference_flat_multiset.h:426
const_iterator cend() const
Definition: reference_flat_multiset.h:372
size_type max_size() const
Definition: reference_flat_multiset.h:722
const_iterator cbegin() const
Definition: reference_flat_multiset.h:363
#define ETL_ASSERT(b, e)
Definition: error_handler.h:290
void clear()
Clears the flat_multiset.
Definition: flat_multiset.h:467
iterator lower_bound(const_reference key)
Definition: flat_multiset.h:524
const_reverse_iterator crbegin() const
Definition: flat_multiset.h:187
const_iterator end() const
Definition: flat_multiset.h:124
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range(const_reference key) const
Definition: flat_multiset.h:574
const_reverse_iterator rbegin() const
Definition: flat_multiset.h:160
const_reverse_iterator rend() const
Definition: flat_multiset.h:178
const_iterator upper_bound(const_reference key) const
Definition: flat_multiset.h:554
flat_multiset()
Constructor.
Definition: flat_multiset.h:763
iflat_multiset(lookup_t &lookup_, storage_t &storage_)
Constructor.
Definition: flat_multiset.h:663
iterator begin()
Definition: flat_multiset.h:97
ETL_OR_STD::pair< iterator, bool > emplace(const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
Emplaces a value to the set.
Definition: flat_multiset.h:394
void erase(iterator first, iterator last)
Definition: flat_multiset.h:449
void insert(TIterator first, TIterator last)
Definition: flat_multiset.h:300
iterator find(const_reference key)
Definition: flat_multiset.h:494
const_iterator cend() const
Definition: flat_multiset.h:142
iterator upper_bound(const_reference key)
Definition: flat_multiset.h:544
void assign(TIterator first, TIterator last)
Definition: flat_multiset.h:209
~iflat_multiset()
Internal debugging.
Definition: flat_multiset.h:714
iterator insert(iterator position, const_reference value)
Definition: flat_multiset.h:274
reverse_iterator rend()
Definition: flat_multiset.h:169
const_iterator lower_bound(const_reference key) const
Definition: flat_multiset.h:534
flat_multiset & operator=(const flat_multiset &rhs)
Assignment operator.
Definition: flat_multiset.h:826
const_iterator find(const_reference key) const
Definition: flat_multiset.h:504
bool empty() const
Definition: flat_multiset.h:617
~flat_multiset()
Destructor.
Definition: flat_multiset.h:818
const_reverse_iterator crend() const
Definition: flat_multiset.h:196
iflat_multiset & operator=(const iflat_multiset &rhs)
Assignment operator.
Definition: flat_multiset.h:582
flat_multiset(TIterator first, TIterator last)
Definition: flat_multiset.h:798
size_type max_size() const
Definition: flat_multiset.h:644
ETL_OR_STD::pair< iterator, bool > emplace(const_reference value)
Emplaces a value to the set.
Definition: flat_multiset.h:312
ETL_OR_STD::pair< iterator, iterator > equal_range(const_reference key)
Definition: flat_multiset.h:564
size_type capacity() const
Definition: flat_multiset.h:635
ETL_OR_STD::pair< iterator, bool > emplace(const T1 &value1, const T2 &value2, const T3 &value3)
Emplaces a value to the set.
Definition: flat_multiset.h:376
iterator end()
Definition: flat_multiset.h:115
ETL_OR_STD::pair< iterator, bool > insert(const_reference value)
Definition: flat_multiset.h:229
const_iterator begin() const
Definition: flat_multiset.h:106
const_iterator cbegin() const
Definition: flat_multiset.h:133
void erase(iterator i_element)
Definition: flat_multiset.h:434
reverse_iterator rbegin()
Definition: flat_multiset.h:151
bool full() const
Definition: flat_multiset.h:626
size_t erase(const_reference key)
Definition: flat_multiset.h:414
size_type size() const
Definition: flat_multiset.h:608
ETL_OR_STD::pair< iterator, bool > emplace(const T1 &value1, const T2 &value2)
Emplaces a value to the set.
Definition: flat_multiset.h:358
ETL_OR_STD::pair< iterator, bool > emplace(const T1 &value1)
Emplaces a value to the set.
Definition: flat_multiset.h:340
size_t available() const
Definition: flat_multiset.h:653
flat_multiset(const flat_multiset &other)
Copy constructor.
Definition: flat_multiset.h:771
size_t count(const_reference key) const
Definition: flat_multiset.h:514
Definition: flat_multiset.h:755
Definition: flat_multiset.h:63
etl::enable_if< etl::is_trivially_destructible< T >::value, void >::type destroy_at(T *)
Definition: memory.h:949
T * addressof(T &t)
Definition: memory.h:61
void release_all()
Release all objects in the pool.
Definition: pool.h:264
void release(const void *const p_object)
Definition: pool.h:255
T * allocate()
Definition: pool.h:129
Definition: pool.h:118
is_trivially_destructible
Definition: type_traits_generator.h:1171
Definition: vector.h:80
Definition: absolute.h:37
bool operator!=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:594
bool operator==(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:582
Definition: compare.h:52
iterator
Definition: iterator.h:422