10 #ifndef META_DISK_VECTOR_H_
11 #define META_DISK_VECTOR_H_
13 #include <type_traits>
33 static_assert(std::is_integral<T>::value || std::is_floating_point<T>::value
34 || std::is_base_of<util::numeric, T>::value,
35 "disk_vector templated types must be integral types");
96 const T&
at(uint64_t idx)
const;
101 uint64_t
size()
const;
106 class iterator :
public std::iterator<std::random_access_iterator_tag, T>
123 iterator(uint64_t idx, T* data) : idx_{idx}, data_{data}
144 std::swap(*
this, other);
187 return !(*
this == other);
205 return idx_ < other.
idx_;
211 return idx_ > other.
idx_;
217 return idx_ <= other.
idx_;
223 return idx_ >= other.
idx_;
230 iterator
begin()
const;
235 iterator
end()
const;
257 using std::runtime_error::runtime_error;