2017-12-20 17:58:32 +08:00
|
|
|
// sol2
|
|
|
|
|
2017-06-17 12:43:26 +08:00
|
|
|
// The MIT License (MIT)
|
|
|
|
|
2018-02-20 10:15:26 +08:00
|
|
|
// Copyright (c) 2013-2018 Rapptz, ThePhD and contributors
|
2017-06-17 12:43:26 +08:00
|
|
|
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
|
|
// this software and associated documentation files (the "Software"), to deal in
|
|
|
|
// the Software without restriction, including without limitation the rights to
|
|
|
|
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
|
|
// the Software, and to permit persons to whom the Software is furnished to do so,
|
|
|
|
// subject to the following conditions:
|
|
|
|
|
|
|
|
// The above copyright notice and this permission notice shall be included in all
|
|
|
|
// copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
|
|
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
|
|
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
|
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
#ifndef SOL_FEATURE_TEST_HPP
|
|
|
|
#define SOL_FEATURE_TEST_HPP
|
|
|
|
|
2017-12-26 00:44:04 +08:00
|
|
|
#if (defined(__cplusplus) && __cplusplus == 201703L) || (defined(_MSC_VER) && _MSC_VER > 1900 && ((defined(_HAS_CXX17) && _HAS_CXX17 == 1) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201402L))))
|
2017-09-13 14:46:56 +08:00
|
|
|
#ifndef SOL_CXX17_FEATURES
|
|
|
|
#define SOL_CXX17_FEATURES 1
|
|
|
|
#endif // C++17 features macro
|
2017-07-10 00:00:57 +08:00
|
|
|
#endif // C++17 features check
|
|
|
|
|
2018-04-18 00:29:03 +08:00
|
|
|
#if defined(SOL_CXX17_FEATURES) && SOL_CXX17_FEATURES
|
2017-12-26 00:44:04 +08:00
|
|
|
// TODO: there is a bug in the VC++ compiler??
|
|
|
|
// on /std:c++latest under x86 conditions (VS 15.5.2),
|
|
|
|
// compiler errors are tossed for noexcept markings being on function types
|
|
|
|
// that are identical in every other way to their non-noexcept marked types function types...
|
2018-01-31 00:02:46 +08:00
|
|
|
#if defined(__cpp_noexcept_function_type) || ((defined(_MSC_VER) && _MSC_VER > 1911) && (defined(_MSVC_LANG) && ((_MSVC_LANG >= 201403L))))
|
2017-09-13 14:46:56 +08:00
|
|
|
#ifndef SOL_NOEXCEPT_FUNCTION_TYPE
|
2017-12-12 01:31:30 +08:00
|
|
|
#define SOL_NOEXCEPT_FUNCTION_TYPE 1
|
2017-09-13 14:46:56 +08:00
|
|
|
#endif // noexcept is part of a function's type
|
2017-12-26 00:44:04 +08:00
|
|
|
#endif // compiler-specific checks
|
2018-04-13 01:58:25 +08:00
|
|
|
#if defined(__clang__) && defined(__APPLE__)
|
2018-04-14 02:46:05 +08:00
|
|
|
#if defined(__has_include)
|
|
|
|
#if __has_include(<variant>)
|
2018-04-13 01:58:25 +08:00
|
|
|
#define SOL_STD_VARIANT 1
|
|
|
|
#endif // has include nonsense
|
2018-04-14 02:46:05 +08:00
|
|
|
#endif // __has_include
|
2018-04-13 01:58:25 +08:00
|
|
|
#else
|
|
|
|
#define SOL_STD_VARIANT 1
|
|
|
|
#endif // Clang screws up variant
|
2017-12-26 00:44:04 +08:00
|
|
|
#endif // C++17 only
|
2017-06-17 12:43:26 +08:00
|
|
|
|
2018-04-18 00:29:03 +08:00
|
|
|
#include <sol/config.hpp>
|
2018-02-03 14:29:06 +08:00
|
|
|
|
2017-06-17 12:43:26 +08:00
|
|
|
#endif // SOL_FEATURE_TEST_HPP
|