Skip to content

Commit e154d95

Browse files
committed
Use __cplusplus header to enable C++11 language features
1 parent 2207348 commit e154d95

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

websocketpp/common/cpp11.hpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@
4141
#endif
4242

4343

44-
#ifdef _WEBSOCKETPP_CPP11_STL_
45-
// This flag indicates that all of the C++11 language features are available
46-
// to us.
44+
#if defined(_WEBSOCKETPP_CPP11_STL_) || __cplusplus >= 201103L
45+
// _WEBSOCKETPP_CPP11_STL_ is a flag from the build system that forces
46+
// WebSocket++ into C++11 mode. __cplusplus is a define set by the compiler
47+
// if it has full support for C++11 language features. If either are set use
48+
// C++11 language features
4749
#ifndef _WEBSOCKETPP_NOEXCEPT_TOKEN_
4850
#define _WEBSOCKETPP_NOEXCEPT_TOKEN_ noexcept
4951
#endif

0 commit comments

Comments
 (0)