#pragma once #include #include template class TSocketMap { public: T& Get(size_t idx) { if (idx < 128000) { if (V_.size() <= idx) { V_.resize(idx + 1); } return V_[idx]; } return H_[idx]; } private: TVector V_; THashMap H_; };