diff options
Diffstat (limited to 'sca-cpp/trunk/kernel/config.hpp')
-rw-r--r-- | sca-cpp/trunk/kernel/config.hpp | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/sca-cpp/trunk/kernel/config.hpp b/sca-cpp/trunk/kernel/config.hpp index f700829fa5..5b447e116b 100644 --- a/sca-cpp/trunk/kernel/config.hpp +++ b/sca-cpp/trunk/kernel/config.hpp @@ -34,10 +34,36 @@ /** * Platform configuration and debug functions. */ - namespace tuscany { +/** + * Attribute used to mark unused parameters. + */ +#ifndef unused +#define unused __attribute__ ((unused)) +#endif + +/** + * Compiler feature detection. + */ +#ifdef __clang__ + +#if __has_feature(cxx_lambdas) +#define HAS_CXX0X_LAMBDAS 1 +#endif + +#else + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4) +#define HAS_CXX0X_LAMBDAS 1 +#endif + +#endif + +/** + * Debug utilities. + */ #ifdef WANT_MAINTAINER_MODE /** @@ -46,7 +72,7 @@ namespace tuscany //#define WANT_MAINTAINER_WATCH /** - * Increment / decrement a debug counter. + * Increment/decrement a debug counter. */ bool debug_inc(long int& c) { c++; @@ -65,12 +91,5 @@ bool debug_dec(long int& c) { #endif -/** - * Attribute used to mark unused parameters. - */ -#ifndef unused -#define unused __attribute__ ((unused)) -#endif - } #endif /* tuscany_config_hpp */ |