Author Topic: Update coding style wiki  (Read 1866 times)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3255
Update coding style wiki
« on: January 13, 2022, 06:18:40 pm »
i would like to update the coding style wiki page about new c++ standards:

What minimal c++ standard do we allow?
C++11? C++17?

What about range based for loops?
What about the auto keyword?

prefer std container over wxWidgets container?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1115
Re: Update coding style wiki
« Reply #1 on: January 13, 2022, 07:20:32 pm »
IMHO range for are very useful.

The auto keyword was systematically rejected by Obfuscated (I do not like it, either).

wxWidgets containers are being slowly converted to thin wrappers of std containers, and the final step is making wxUSE_STL = 1 by default, so IMHO std containers are the way to go except when interfacing to wxWidgets. A similar case is wxString, devs recommend using std::string and convert it to wxString when interfacing with the library.