From e154d955ecb6052c84b6994d48d563565900ab56 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Sun, 16 Mar 2014 09:26:51 -0500 Subject: [PATCH] Use __cplusplus header to enable C++11 language features --- websocketpp/common/cpp11.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/websocketpp/common/cpp11.hpp b/websocketpp/common/cpp11.hpp index 7c1ac43388..4b980efdd3 100644 --- a/websocketpp/common/cpp11.hpp +++ b/websocketpp/common/cpp11.hpp @@ -41,9 +41,11 @@ #endif -#ifdef _WEBSOCKETPP_CPP11_STL_ - // This flag indicates that all of the C++11 language features are available - // to us. +#if defined(_WEBSOCKETPP_CPP11_STL_) || __cplusplus >= 201103L + // _WEBSOCKETPP_CPP11_STL_ is a flag from the build system that forces + // WebSocket++ into C++11 mode. __cplusplus is a define set by the compiler + // if it has full support for C++11 language features. If either are set use + // C++11 language features #ifndef _WEBSOCKETPP_NOEXCEPT_TOKEN_ #define _WEBSOCKETPP_NOEXCEPT_TOKEN_ noexcept #endif