[fltk.coredev] Consider using std::vector (C++98 / C++11)

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Consider using std::vector (C++98 / C++11) Albrecht Schlosser 05:32 Jul 15 top right image
 
Isn't it time to think about using simple std::container types in FLTK?

I've seen the necessity of using vectors in some situations (patches), particularly useful would be

- std::vector<int>
- std::vector<Fl_Widget *>

I'm not asking to rewrite existing code, just to add such containers where useful. The potential new widget Fl_Flex (https://github.com/osen/FL_Flex) would be an example but I know of at least one patch that suggested using a vector.

I don't know about real compatibility issues with old (maybe embedded) systems and such. Do we still need to take care or can we "move our code base a little forward" WRT more modern C++ standards? According to https://www.cplusplus.com/reference/vector/vector/ class vector is defined in C++98 with some additions in C++11.

If not (and I think one valid reason is enough, like a veto), then I suggest to add some similar classes for internal usage rather than inventing the wheel over and over again. I could search and give some examples but I don't want to do this now.

All comments would be appreciated, not only from FLTK devs. Thanks.

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/6a1d9208-9cf0-28b6-bdf1-853ae2db9345%40online.de.
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2021 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.