comparison dw.hpp @ 2972:5727036821bd

C++: Don't bother with lambdas unless using GCC5.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 20 Mar 2023 23:30:01 +0000
parents 2d9521396112
children ac880987a2c4
comparison
equal deleted inserted replaced
2971:67a1d12cb079 2972:5727036821bd
15 #define DW_NULL nullptr 15 #define DW_NULL nullptr
16 #else 16 #else
17 #define DW_NULL NULL 17 #define DW_NULL NULL
18 #endif 18 #endif
19 19
20 // Support Lambdas on C++11, Visual C 2015 or GCC 4.5 20 // Support Lambdas on C++11, Visual C 2015 or GCC 5
21 #if defined(DW_CPP11) || (defined(_MSC_VER) && _MSC_VER >= 1900) || \ 21 #if defined(DW_CPP11) || (defined(_MSC_VER) && _MSC_VER >= 1900) || \
22 (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4))) 22 (defined(__GNUC__) && __GNUC__ > 4)
23 #define DW_LAMBDA 23 #define DW_LAMBDA
24 #include <functional> 24 #include <functional>
25 #endif 25 #endif
26 26
27 // Attempt to allow compilation on GCC older than 4.7 27 // Attempt to allow compilation on GCC older than 4.7