Enable signal extension automatically when using g++ >= 7.1 and -std=c++1z or -std=c++17 is used

0.8
Bruno Van de Velde 2017-08-29 14:58:18 +02:00
parent e537fa8f3e
commit 33e8cbb339
1 changed files with 14 additions and 0 deletions

View File

@ -41,6 +41,20 @@
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Enable the signal extension on compilers that can compile the code
// Minimum required compiler version:
// - GCC: 7.1
// - Clang: Unsupported
// - VC++: Unsupported
#if (__GNUC__ > 7) || ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 1)) // gcc >= 7.1
#if (__cplusplus >= 201703L) && (__cpp_if_constexpr >= 201606) && (__cpp_deduction_guides >= 201606) // only when -std=c++1z or -std=c++17 is used
#define TGUI_ENABLE_SIGNAL_EXTENSION
#endif
#endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
namespace tgui
{
class Widget;