Skip to content

Commit

Permalink
Guards around C++14 code
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Apr 1, 2016
1 parent 1ff7b5f commit 390aa20
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config.hpp
Expand Up @@ -50,6 +50,8 @@
#include "exceptions.hpp"
#include "tstring.hpp"

#ifdef HAVE_CXX14

#ifdef __clang__ // Check this first, because clang also defines __GNUC__
# ifdef __apple_build_version__ // Apple clang
# if (__clang_major__ == 5 && __clang_minor__ >= 1) || __clang_major__ > 5 // Apple clang 5.1+
Expand All @@ -66,6 +68,8 @@
# define USE_HETEROGENOUS_LOOKUPS
#endif

#endif

class config;
class enum_tag;

Expand Down
5 changes: 5 additions & 0 deletions src/global.hpp
Expand Up @@ -55,4 +55,9 @@

#define UNUSED(x) ((void)(x)) /* to avoid warnings */

// To allow using some optional C++14 features
#if __cplusplus >= 201402L
#define HAVE_CXX14
#endif

#endif //GLOBAL_HPP_INCLUDED

0 comments on commit 390aa20

Please sign in to comment.