From b3d31b8e2479c9c4f2865e397929f98eadfffd46 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 22 May 2004 10:36:05 +0000 Subject: [PATCH] Renamed member check to avoid conflict with MacOS macro of the same name. [SVN r22890] --- include/boost/type_traits/is_abstract.hpp | 8 ++++---- .../boost/type_traits/is_base_and_derived.hpp | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/boost/type_traits/is_abstract.hpp b/include/boost/type_traits/is_abstract.hpp index 2d2ff0b..48d98e5 100755 --- a/include/boost/type_traits/is_abstract.hpp +++ b/include/boost/type_traits/is_abstract.hpp @@ -61,16 +61,16 @@ struct is_abstract_imp // according to review status issue #337 // template - static type_traits::no_type check(U (*)[1]); + static type_traits::no_type check_sig(U (*)[1]); template - static type_traits::yes_type check(...); + static type_traits::yes_type check_sig(...); // GCC2 won't even parse this template if we embed the computation // of s1 in the computation of value. #ifdef __GNUC__ - BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(is_abstract_imp::template check(0))); + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(is_abstract_imp::template check_sig(0))); #else - BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check(0))); + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig(0))); #endif BOOST_STATIC_CONSTANT(bool, value = diff --git a/include/boost/type_traits/is_base_and_derived.hpp b/include/boost/type_traits/is_base_and_derived.hpp index 39d251c..165de0f 100644 --- a/include/boost/type_traits/is_base_and_derived.hpp +++ b/include/boost/type_traits/is_base_and_derived.hpp @@ -56,18 +56,18 @@ UDC - User-defined conversion A user-defined conversion sequence consists of an SC, followed by an UDC, followed by another SC. Either SC may be the identity conversion. -When passing the default-constructed Host object to the overloaded check() +When passing the default-constructed Host object to the overloaded check_sig() functions (initialization 8.5/14/4/3), we have several viable implicit conversion sequences: -For "static no_type check(B const volatile *, int)" we have the conversion +For "static no_type check_sig(B const volatile *, int)" we have the conversion sequences: C -> C const (SC - Qualification Adjustment) -> B const volatile* (UDC) C -> D const volatile* (UDC) -> B1 const volatile* / B2 const volatile* -> B const volatile* (SC - Conversion) -For "static yes_type check(D const volatile *, T)" we have the conversion +For "static yes_type check_sig(D const volatile *, T)" we have the conversion sequence: C -> D const volatile* (UDC) @@ -91,12 +91,12 @@ eliminated before it could possibly cause ambiguity or access violation. If D is not derived from B, it has to choose between C -> C const -> B const volatile* for the first function, and C -> D const volatile* for the second function, which are just as good (both requires a UDC, 13.3.3.2), had it not -been for the fact that "static no_type check(B const volatile *, int)" is +been for the fact that "static no_type check_sig(B const volatile *, int)" is not templated, which makes C -> C const -> B const volatile* the best choice (13.3.3/1/4), resulting in "no". Also, if Host::operator B const volatile* hadn't been const, the two -conversion sequences for "static no_type check(B const volatile *, int)", in +conversion sequences for "static no_type check_sig(B const volatile *, int)", in the case where D is derived from B, would have been ambiguous. See also @@ -109,8 +109,8 @@ template struct bd_helper { template - static type_traits::yes_type check(D const volatile *, T); - static type_traits::no_type check(B const volatile *, int); + static type_traits::yes_type check_sig(D const volatile *, T); + static type_traits::no_type check_sig(B const volatile *, int); }; template @@ -123,7 +123,7 @@ struct is_base_and_derived_impl2 }; BOOST_STATIC_CONSTANT(bool, value = - sizeof(bd_helper::check(Host(), 0)) == sizeof(type_traits::yes_type)); + sizeof(bd_helper::check_sig(Host(), 0)) == sizeof(type_traits::yes_type)); }; #else