mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix confg and enabler_if: for ICC
This commit is contained in:
parent
2867cd79ef
commit
b14c8e7d73
3 changed files with 53 additions and 6 deletions
|
@ -1,13 +1,50 @@
|
||||||
/*=============================================================================
|
/*=============================================================================
|
||||||
Copyright (c) 2011-2014 Bolero MURAKAMI
|
Copyright (c) 2011-2014 Bolero MURAKAMI
|
||||||
https://github.com/bolero-MURAKAMI/Sprout
|
https://github.com/bolero-MURAKAMI/Sprout
|
||||||
|
|
||||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
=============================================================================*/
|
=============================================================================*/
|
||||||
#ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP
|
#ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP
|
||||||
#define SPROUT_CONFIG_COMPILER_INTEL_HPP
|
#define SPROUT_CONFIG_COMPILER_INTEL_HPP
|
||||||
|
|
||||||
#include <sprout/config/compiler/common_edg.hpp>
|
#include <sprout/config/compiler/common_edg.hpp>
|
||||||
|
|
||||||
|
#if defined(__INTEL_COMPILER)
|
||||||
|
# define SPROUT_INTEL_CXX_VERSION __INTEL_COMPILER
|
||||||
|
#elif defined(__ICL)
|
||||||
|
# define SPROUT_INTEL_CXX_VERSION __ICL
|
||||||
|
#elif defined(__ICC)
|
||||||
|
# define SPROUT_INTEL_CXX_VERSION __ICC
|
||||||
|
#elif defined(__ECC)
|
||||||
|
# define SPROUT_INTEL_CXX_VERSION __ECC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (SPROUT_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||||
|
# define SPROUT_INTEL_STDCXX11
|
||||||
|
#endif
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
||||||
|
# define SPROUT_INTEL_STDCXX11
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SPROUT_INTEL_STDCXX11) && (SPROUT_INTEL_CXX_VERSION >= 1200)
|
||||||
|
# undef SPROUT_NO_CXX11_DELETED_FUNCTIONS
|
||||||
|
# undef SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SPROUT_INTEL_STDCXX11) && (SPROUT_INTEL_CXX_VERSION > 1200)
|
||||||
|
# undef SPROUT_NO_CXX11_TEMPLATE_ALIASES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SPROUT_INTEL_STDCXX11) && (SPROUT_INTEL_CXX_VERSION >= 1400) && !defined(_MSC_VER)
|
||||||
|
# undef SPROUT_NO_CXX11_UNICODE_LITERALS
|
||||||
|
# undef SPROUT_NO_CXX11_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER <= 1700)
|
||||||
|
# define SPROUT_NO_CXX11_DELETED_FUNCTIONS
|
||||||
|
# define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||||
|
# define SPROUT_NO_CXX11_TEMPLATE_ALIASES
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // #ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP
|
#endif // #ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP
|
||||||
|
|
|
@ -41,7 +41,7 @@ namespace sprout {
|
||||||
// tie
|
// tie
|
||||||
//
|
//
|
||||||
template<typename... Types>
|
template<typename... Types>
|
||||||
inline sprout::tuples::tuple<Types&...>
|
inline SPROUT_CONSTEXPR sprout::tuples::tuple<Types&...>
|
||||||
tie(Types&... args) SPROUT_NOEXCEPT {
|
tie(Types&... args) SPROUT_NOEXCEPT {
|
||||||
return sprout::tuples::tuple<Types&...>(args...);
|
return sprout::tuples::tuple<Types&...>(args...);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,14 +16,24 @@ namespace sprout {
|
||||||
// enabler_t
|
// enabler_t
|
||||||
// enabler
|
// enabler
|
||||||
//
|
//
|
||||||
typedef void* enabler_t;
|
typedef void** enabler_t;
|
||||||
|
#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
|
||||||
|
namespace {
|
||||||
|
SPROUT_STATIC_CONSTEXPR sprout::enabler_t enabler = {};
|
||||||
|
} // anonymous-namespace
|
||||||
|
#else
|
||||||
extern enabler_t enabler;
|
extern enabler_t enabler;
|
||||||
|
#endif
|
||||||
//
|
//
|
||||||
// enabler_if
|
// enabler_if
|
||||||
//
|
//
|
||||||
template<bool C>
|
template<bool C>
|
||||||
class enabler_if
|
class enabler_if
|
||||||
|
#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
|
||||||
|
: public std::enable_if<C, sprout::enabler_t>
|
||||||
|
#else
|
||||||
: public std::enable_if<C, sprout::enabler_t&>
|
: public std::enable_if<C, sprout::enabler_t&>
|
||||||
|
#endif
|
||||||
{};
|
{};
|
||||||
|
|
||||||
#if SPROUT_USE_TEMPLATE_ALIASES
|
#if SPROUT_USE_TEMPLATE_ALIASES
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue