Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Karsten1987/53c587aa956f095c1e909d3853b457de to your computer and use it in GitHub Desktop.

Select an option

Save Karsten1987/53c587aa956f095c1e909d3853b457de to your computer and use it in GitHub Desktop.
FixedSizeVector
from here: https://stackoverflow.com/a/28878360/4583130
template <class T, class A = std::allocator<T>>
struct FixedVector : private std::vector<T, A>
{
using FixedVector::vector::vector;
using FixedVector::vector::operator=;
using FixedVector::vector::get_allocator;
using FixedVector::vector::at;
using FixedVector::vector::front;
using FixedVector::vector::back;
using FixedVector::vector::data;
using FixedVector::vector::begin;
using FixedVector::vector::cbegin
using FixedVector::vector::end;
using FixedVector::vector::cend;
using FixedVector::vector::empty;
using FixedVector::vector::size;
using FixedVector::vector::operator[];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment