| 2851 | /// @brief Implements IterableContainer and provides iterable std::priority_queue class |
| 2852 | template<typename T, typename Container = std::vector<T>, typename Comparator = std::less<typename Container::value_type>> |
| 2853 | class IterablePriorityQueue : public IterableContainer<T, Container>, |
| 2854 | public std::priority_queue<T, Container, Comparator> { |
| 2855 | public: |
| 2856 | IterablePriorityQueue(std::priority_queue<T, Container, Comparator> queue_) { |
| 2857 | std::size_t count_ = 0; |
| 2858 | while (++count_ < base::consts::kMaxLogPerContainer && !queue_.empty()) { |
| 2859 | this->push(queue_.top()); |
| 2860 | queue_.pop(); |
| 2861 | } |
| 2862 | } |
| 2863 | private: |
| 2864 | inline Container& getContainer(void) { |
| 2865 | return this->c; |
| 2866 | } |
| 2867 | }; |
| 2868 | /// @brief Implements IterableContainer and provides iterable std::queue class |
| 2869 | template<typename T, typename Container = std::deque<T>> |
| 2870 | class IterableQueue : public IterableContainer<T, Container>, public std::queue<T, Container> { |
nothing calls this directly
no outgoing calls
no test coverage detected