aboutsummaryrefslogblamecommitdiffstats
path: root/util/generic/deque.h
blob: 2dabaf3177d692ae2fb32d472c5b92b73a02a95c (plain) (tree)
1
2
3
4
5
6
7
8
9
            
 
                
 

                              
                 
                           
 
                           
                                                             
                                                         
 
       
                       
 
                                            

                                                    
                              
  
#pragma once

#include "fwd.h"

#include <util/memory/alloc.h>

#include <deque>
#include <memory>
#include <initializer_list>

template <class T, class A>
class TDeque: public std::deque<T, TReboundAllocator<A, T>> {
    using TBase = std::deque<T, TReboundAllocator<A, T>>;

public:
    using TBase::TBase;

    inline yssize_t ysize() const noexcept {
        return (yssize_t)this->size();
    }

    inline explicit operator bool() const noexcept {
        return !this->empty();
    }
};