#pragma once #include #include template class SList : public std::list> { public: template SList

cast() const { SList

res; for (const auto& spEl : *this) res.push_back(std::dynamic_pointer_cast

(spEl)); return res; } std::shared_ptr dequeue() { if (this->empty()) return {}; auto spEl = this->front(); this->pop_front(); return spEl; } inline void enqueue(std::shared_ptr el) { this->push_back(el); } };