mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-08 11:01:33 +00:00
Fix undeclared 'typeof' when compiling with -std=c++11
This commit is contained in:
parent
9cf1365b18
commit
4742cf0e69
2 changed files with 18 additions and 0 deletions
|
@ -833,8 +833,17 @@ template<typename T> T strip_cv_quals_for_mutex(const T&);
|
|||
template<typename T> T strip_cv_quals_for_mutex(volatile T&);
|
||||
template<typename T> T strip_cv_quals_for_mutex(const volatile T&);
|
||||
|
||||
#if (__cplusplus == 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CXX11__)
|
||||
|
||||
#define AUTO_LOCK( mutex ) \
|
||||
AUTO_LOCK_( decltype(::strip_cv_quals_for_mutex(mutex)), mutex )
|
||||
|
||||
#else
|
||||
|
||||
#define AUTO_LOCK( mutex ) \
|
||||
AUTO_LOCK_( typeof(::strip_cv_quals_for_mutex(mutex)), mutex )
|
||||
|
||||
#endif
|
||||
|
||||
#else // GNUC
|
||||
|
||||
|
|
|
@ -833,8 +833,17 @@ template<typename T> T strip_cv_quals_for_mutex(const T&);
|
|||
template<typename T> T strip_cv_quals_for_mutex(volatile T&);
|
||||
template<typename T> T strip_cv_quals_for_mutex(const volatile T&);
|
||||
|
||||
#if (__cplusplus == 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CXX11__)
|
||||
|
||||
#define AUTO_LOCK( mutex ) \
|
||||
AUTO_LOCK_( decltype(::strip_cv_quals_for_mutex(mutex)), mutex )
|
||||
|
||||
#else
|
||||
|
||||
#define AUTO_LOCK( mutex ) \
|
||||
AUTO_LOCK_( typeof(::strip_cv_quals_for_mutex(mutex)), mutex )
|
||||
|
||||
#endif
|
||||
|
||||
#else // GNUC
|
||||
|
||||
|
|
Loading…
Reference in a new issue