#pragma once #include "fwd.h" #include "deque.h" #include "vector.h" #include "utility.h" #include #include template class TQueue: public std::queue { using TBase = std::queue; public: using TBase::TBase; inline explicit operator bool() const noexcept { return !this->empty(); } inline void clear() { this->c.clear(); } inline S& Container() { return this->c; } inline const S& Container() const { return this->c; } }; template class TPriorityQueue: public std::priority_queue { using TBase = std::priority_queue; public: using TBase::TBase; inline explicit operator bool() const noexcept { return !this->empty(); } inline void clear() { this->c.clear(); } inline S& Container() { return this->c; } inline const S& Container() const { return this->c; } };