diff --git a/include/boost/type_traits/broken_compiler_spec.hpp b/include/boost/type_traits/broken_compiler_spec.hpp new file mode 100644 index 0000000..3a13273 --- /dev/null +++ b/include/boost/type_traits/broken_compiler_spec.hpp @@ -0,0 +1,14 @@ + +// Copyright 2001-2003 Aleksey Gurtovoy. +// Use, modification and distribution are subject to 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED +#define BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED + +#include + +#endif diff --git a/include/boost/type_traits/config.hpp b/include/boost/type_traits/config.hpp index f3775e3..2e25ad0 100644 --- a/include/boost/type_traits/config.hpp +++ b/include/boost/type_traits/config.hpp @@ -61,6 +61,12 @@ # define BOOST_TT_NO_CV_FUNC_TEST #endif +// +// Macros that have been deprecated, defined here for backwards compatibility: +// +#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x) +#define BOOST_TT_BROKEN_COMPILER_SPEC(x) + #endif // BOOST_TT_CONFIG_HPP_INCLUDED diff --git a/include/boost/type_traits/detail/has_binary_operator.hpp b/include/boost/type_traits/detail/has_binary_operator.hpp index 9f91843..d82a5ce 100644 --- a/include/boost/type_traits/detail/has_binary_operator.hpp +++ b/include/boost/type_traits/detail/has_binary_operator.hpp @@ -152,10 +152,10 @@ no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { - static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists - static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise + static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists + static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise - BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make() BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((make() BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); }; diff --git a/include/boost/type_traits/detail/has_postfix_operator.hpp b/include/boost/type_traits/detail/has_postfix_operator.hpp index 52b8f81..e9048e1 100644 --- a/include/boost/type_traits/detail/has_postfix_operator.hpp +++ b/include/boost/type_traits/detail/has_postfix_operator.hpp @@ -138,10 +138,10 @@ no_operator operator,(no_operator, has_operator); template < typename Lhs > struct operator_exists { - static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists - static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise + static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists + static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise - BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make() BOOST_TT_TRAIT_OP),make())))==sizeof(::boost::type_traits::yes_type))); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((make() BOOST_TT_TRAIT_OP),make())))==sizeof(::boost::type_traits::yes_type))); }; diff --git a/include/boost/type_traits/detail/has_prefix_operator.hpp b/include/boost/type_traits/detail/has_prefix_operator.hpp index 9c4ccd5..e1cf8d0 100644 --- a/include/boost/type_traits/detail/has_prefix_operator.hpp +++ b/include/boost/type_traits/detail/has_prefix_operator.hpp @@ -146,10 +146,10 @@ no_operator operator,(no_operator, has_operator); template < typename Rhs > struct operator_exists { - static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists - static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise + static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists + static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise - BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); }; diff --git a/include/boost/type_traits/is_polymorphic.hpp b/include/boost/type_traits/is_polymorphic.hpp index 8fcc69e..aac9851 100644 --- a/include/boost/type_traits/is_polymorphic.hpp +++ b/include/boost/type_traits/is_polymorphic.hpp @@ -17,6 +17,11 @@ #include #include +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) +#pragma warning(push) +#pragma warning(disable:4250) +#endif + namespace boost{ #ifndef BOOST_IS_POLYMORPHIC @@ -111,4 +116,8 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_polymorphic,T,BOOST_IS_POLYMORPHIC(T)) #include +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) +#pragma warning(pop) +#endif + #endif diff --git a/include/boost/type_traits/transform_traits_spec.hpp b/include/boost/type_traits/transform_traits_spec.hpp new file mode 100644 index 0000000..b12b5f8 --- /dev/null +++ b/include/boost/type_traits/transform_traits_spec.hpp @@ -0,0 +1,14 @@ + +// Copyright 2001 Aleksey Gurtovoy. +// Use, modification and distribution are subject to 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED +#define BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED + +#include + +#endif diff --git a/test/has_binary_operators.hpp b/test/has_binary_operators.hpp index 8d29df3..99be9a4 100644 --- a/test/has_binary_operators.hpp +++ b/test/has_binary_operators.hpp @@ -6,6 +6,12 @@ #ifndef TT_HAS_BINARY_OPERATORS_HPP #define TT_HAS_BINARY_OPERATORS_HPP +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40900) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" +#endif + + // test with one template parameter #define TEST_T(TYPE,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME::value), RESULT) // test with one template parameter plus return value @@ -142,4 +148,8 @@ void common() { } +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40900) +#pragma GCC diagnostic pop +#endif + #endif diff --git a/test/has_prefix_operators.hpp b/test/has_prefix_operators.hpp index 24646bb..dc87700 100644 --- a/test/has_prefix_operators.hpp +++ b/test/has_prefix_operators.hpp @@ -6,6 +6,11 @@ #ifndef TT_HAS_PREFIX_OPERATORS_HPP #define TT_HAS_PREFIX_OPERATORS_HPP +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40900) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" +#endif + // test with one template parameter #define TEST_T(TYPE,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME::value), RESULT) // test with one template parameter plus return value @@ -125,4 +130,8 @@ void common() { } +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40900) +#pragma GCC diagnostic pop +#endif + #endif