Renaming a template class to make it more specific

Hello

I would like to rename a std::array<uint8_t, size_t> as Buffer<size_t> (i.e. the renamed type's element type is always uint8_t)

I was thinking of something like the following but I cannot get it to work:

 
  using Buffer<size_t> = std::array<uint8_t, size_t>


Thanks
https://en.cppreference.com/w/cpp/language/type_alias

Creating an alias template requires a bit more work than simply having a using statement.
1
2
template <size_t N>
  using buffer = std::array<uint8_t, N>;
Topic archived. No new replies allowed.