MyGUI / mygui

Fast, flexible and simple GUI.
http://mygui.info/
Other
713 stars 205 forks source link

Upgrade to C++20? #251

Closed Assumeru closed 1 year ago

Assumeru commented 1 year ago

I was wondering if you'd be open to switching MyGUI to C++20, @Altren.

I'd like to switch out usages of const std::string& for std::string_view (C++17) which is significantly more interesting with heterogeneous map lookups (C++20) but putting it all behind version checks like in #241 would be a massive hassle.

If there's any chance of getting it merged, I'm interested in upping the C++ version and implementing string_view support across the board.

Altren commented 1 year ago

I'm definitely good with switching to C++17, but I do have some concerns about C++20. For example Apple Clang compiler have not very good support of it. Could you explain what's would be the difference if we use C++17 or C++20 versions of the code.

Assumeru commented 1 year ago

I was thinking of https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0919r3.html when I said 20, but looking at it again that's only relevant for unordered containers which MyGUI barely even uses.

C++17 seems like it should be good enough.