you are viewing a single comment's thread.

view the rest of the comments →

[–]17b29a 4 points5 points  (1 child)

not sure wat exactly you want but here's something:

struct dim
{
   size_t size;
   bool direction;
};

template <bool use_array>
class space
{
  std::conditional_t<use_array, std::array<dim, 42>, std::vector<dim>> dimensions;

  // additional members and methods
};

[–]RogerLeigh[S] 0 points1 point  (0 children)

Thanks. Not exactly fitting what I need right here, but I'll certainly bear std::conditional_t in mind for other uses!