Initial c++17 cleanups#361
Conversation
Since TGUI now requires C++17 we can just use std::clamp().
Since C++17 is now required, [[nodiscard]] is part of the language and the TGUI_NODISCARD macro is no longer needed, so remove it.
C++17 is now the required minimum, so stop refering to C++14.
626e399 to
3f695a6
Compare
|
Hmm, this apparently fails while building a C++20 module. I must admit that that is not something I have any experience with.. If you have an easy fix that would be great, otherwise I'll dig into it over the next couple of days. |
…n them, but their use is now deprecated
|
For the c++20 modules, all classes and global functions must be explicitly marked for export in Even though TGUI code should no longer use TGUI_NODISCARD or tgui::clamp anywhere, custom widgets in user code might still be using them. So I'm keeping them available to keep backwards compatibility. |
Since C++17 is now required, we can use the return value of vector::emplace_back
Hi Texus
Here are a few initial C++17 cleanup patches for you.
There's much more in the pipeline but I don't have time to do more than this tonight, so I thought I'd just submit what I had done so far - more will come in future PR's.