Ticket #1049: patch.txt

File patch.txt, 1.4 KB (added by troyer@…, 15 years ago)

patch for mpl/has_xxx.hpp

Line 
1
2--- boost/mpl/has_xxx.hpp 2005-06-15 12:43:23.000000000 +0200
3+++ /Users/troyer/Desktop/has_xxx.hpp 2007-06-12 10:36:42.000000000
4+0200
5@@ -1,7 +1,6 @@
6#ifndef BOOST_MPL_HAS_XXX_HPP_INCLUDED
7#define BOOST_MPL_HAS_XXX_HPP_INCLUDED
8-
9// Copyright Aleksey Gurtovoy 2002-2004
10// Copyright David Abrahams 2002-2003
11//
12@@ -183,21 +182,21 @@
13# else // other SFINAE-capable compilers
14+ struct gcc_3_2_wknd
15+ {
16+ template< typename U >
17+ static boost::mpl::aux::yes_tag test(
18+ boost::mpl::aux::type_wrapper<U> const volatile*
19+ , boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME
20U::name>* = 0
21+ );
22+
23+ static boost::mpl::aux::no_tag test(...);
24+ };
25+
26# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
27template< typename T, typename fallback_ =
28boost::mpl::bool_<default_> > \
29struct trait \
30{ \
31- struct gcc_3_2_wknd \
32- { \
33- template< typename U > \
34- static boost::mpl::aux::yes_tag test( \
35- boost::mpl::aux::type_wrapper<U> const volatile* \
36- , boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME
37U::name>* = 0 \
38- ); \
39- \
40- static boost::mpl::aux::no_tag test(...); \
41- }; \
42- \
43 typedef boost::mpl::aux::type_wrapper<T> t_; \
44 BOOST_STATIC_CONSTANT(bool, value = \
45 sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) \