From 8b124a7ddefbacea60d2e5d44e39eed4aa83bec5 Mon Sep 17 00:00:00 2001 From: Marcel Krems Date: Sun, 8 Sep 2013 10:29:46 +0200 Subject: Add detection for C++11 explicit conversion operators. Change-Id: Ib33049b538f072079c0f840bc10adf0899217199 Reviewed-by: Thiago Macieira --- src/corelib/global/qcompilerdetection.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/corelib/global/qcompilerdetection.h') diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 5b6639d56b..dbedfe5ddd 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -441,6 +441,7 @@ * N2346 Q_COMPILER_DEFAULT_MEMBERS * N2346 Q_COMPILER_DELETE_MEMBERS * N1986 Q_COMPILER_DELEGATING_CONSTRUCTORS + * N2437 Q_COMPILER_EXPLICIT_CONVERSIONS * N3206 N3272 Q_COMPILER_EXPLICIT_OVERRIDES (v0.9 and above only) * N1987 Q_COMPILER_EXTERN_TEMPLATES * N2540 Q_COMPILER_INHERITING_CONSTRUCTORS @@ -554,6 +555,9 @@ # if __has_feature(cxx_delegating_constructors) # define Q_COMPILER_DELEGATING_CONSTRUCTORS # endif +# if __has_feature(cxx_explicit_conversions) +# define Q_COMPILER_EXPLICIT_CONVERSIONS +# endif # if __has_feature(cxx_override_control) # define Q_COMPILER_EXPLICIT_OVERRIDES # endif @@ -639,6 +643,7 @@ # endif # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 /* C++11 features supported in GCC 4.5: */ +# define Q_COMPILER_EXPLICIT_CONVERSIONS # define Q_COMPILER_LAMBDA # define Q_COMPILER_RAW_STRINGS # endif -- cgit v1.2.3