Re: Give multi-child containers a convenience Container::add(std::initializer_list) [and maybe ctor] ?



Another idea for the pile:

struct GridAttachItem {
  Gtk::Widget& widget;
  int x;
  int y;
  int w;
  int h;
};

void Grid::attach( std::initializer_list<GridAttachItem> );


This illustrates another point, that the inability to have containers of references is subverted if the reference is part of a struct/class (since then there is a way to disambiguate by name, whether you want the element itself, or what it refers to)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]