108 template <
typename Type,
typename Sequence =std::vector<Type>,
109 typename Compare =::std::less<
typename Sequence::value_type> >
113 template <
typename Type,
typename Sequence,
typename Compare>
151 template <
typename Type,
typename Sequence,
typename Compare>
165 typedef typename container_type::pointer
pointer;
178 const Sequence& =Sequence());
180 template <
typename InputIterator>
183 const Compare& =Compare(),
184 const Sequence& =Sequence());
189 priority_deque(
const Sequence& seq,
const bool constructed =
false);
232 bool empty (
void)
const {
return sequence_.empty();};
244 void clear (
void) { sequence_.clear(); };
250 template <
typename InputIterator>
252 void merge (InputIterator first, InputIterator last);
254 template <
typename SourceContainer>
256 void merge (
const SourceContainer& source) {
merge(source.begin(), source.end()); }
311 template <
typename T,
typename S,
typename C>
313 : sequence_(seq), compare_(comp)
318 template <
typename T,
typename S,
typename C>
336 template <
typename T,
typename S,
typename C>
337 template <
typename InputIterator>
339 const C&
comp,
const S& seq)
340 : sequence_(seq), compare_(comp)
342 sequence_.insert(sequence_.end(), first, last);
354 template <
typename T,
typename Sequence,
typename Compare>
356 sequence_.push_back(value);
367 template <
typename T,
typename Sequence,
typename Compare>
372 "Empty priority deque has no maximal element. Reference undefined.");
374 return (it == sequence_.end()) ? sequence_.front() : *it;
382 template <
typename T,
typename Sequence,
typename Compare>
387 "Empty priority deque has no minimal element. Reference undefined.");
388 return sequence_.front();
398 template <
typename T,
typename Sequence,
typename Compare>
401 "Empty priority deque has no maximal element. Removal impossible.");
403 sequence_.pop_back();
412 template <
typename T,
typename Sequence,
typename Compare>
415 "Empty priority deque has no minimal element. Removal undefined.");
417 sequence_.pop_back();
430 template <
typename T,
typename S,
typename C>
431 template <
typename InputIterator>
433 sequence_.insert(sequence_.end(), first, last);
445 template <
typename T,
typename S,
typename C>
447 sequence_.swap(other.sequence_);
458 template <
typename T,
typename S,
typename C>
478 template <
typename T,
typename S,
typename C>
484 (index < end() -
begin()),
"Iterator out of bounds; can't set element.");
486 *(sequence_.begin() + index) = value;
497 template <
typename T,
typename Sequence,
typename Compare>
501 (index < end() -
begin()),
"Iterator out of bounds; can't erase element.");
503 sequence_.pop_back();