Skip to content

Commit

Permalink
Adding a __has_feature extension definition for use in other projects
Browse files Browse the repository at this point in the history
  • Loading branch information
codemercenary committed Jul 31, 2014
1 parent 1dee298 commit cc79062
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions contrib/C++11/cpp11.h
Expand Up @@ -21,6 +21,10 @@
// If Boost.Thread is used, we want it to provide the new name for its <future> class
#define BOOST_THREAD_PROVIDES_FUTURE

#ifndef __has_feature
#define __has_feature(x) (AUTOWIRE_##x)
#endif

/*********************
* __func__ function name support
*********************/
Expand Down Expand Up @@ -144,8 +148,10 @@
* noexcept support
*********************/
#ifdef _MSC_VER
#define AUTOWIRE_cxx_noexcept 0
#define NOEXCEPT(x)
#else
#define AUTOWIRE_cxx_noexcept 1
#define NOEXCEPT(x) x noexcept
#endif

Expand Down
5 changes: 0 additions & 5 deletions src/autonet/stdafx.h
Expand Up @@ -11,9 +11,4 @@
// C++11 glue logic, for platforms that have incomplete C++11 support
#include "C++11/cpp11.h"

// Very unusual syntax -- function taking an array of fixed size, and returning
// a character array of that same size
template<class T, int n>
const char (&ArraySize(const T (&vals)[n]))[n];

#define ARRAYCOUNT(x) sizeof(ArraySize(x))

0 comments on commit cc79062

Please sign in to comment.