From 3533997873869a44932bb0c3f8ce42c0cc5043f3 Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Fri, 2 Sep 2016 10:09:30 -0300 Subject: [PATCH] Usage of C++11 final keyword. --- src/common/common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common/common.h b/src/common/common.h index 72657d555a9..2d153b560a5 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -74,6 +74,10 @@ #include "fb_macros.h" #include "fb_types.h" +#if (__cplusplus >= 201103L) +#define CPP_11 +#endif + /***************************************************** * Linux platforms *****************************************************/ @@ -886,6 +890,9 @@ void GDS_breakpoint(int); #endif // Check for "final" keyword support +#ifdef CPP_11 +#define FB_FINAL final +#else #ifdef __GNUC__ #if ((__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ >= 5)) #define FB_FINAL __final @@ -895,6 +902,7 @@ void GDS_breakpoint(int); #ifndef FB_FINAL #define FB_FINAL #endif +#endif #define FB_UNUSED(value) do { if (value) {} } while (false) #define FB_UNUSED_VAR(value) (void) value