From 6dc817c68a812dcbd6aada610c16a004ce6012f4 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Mon, 23 Jun 2003 12:44:12 +0000 Subject: [PATCH] bind1st/bind2nd common name workaround [SVN r18859] --- .../boost/mpl/aux_/config/preprocessor.hpp | 29 +++++++++++-------- .../mpl/aux_/preprocessed/bcc/basic_bind.hpp | 5 ++-- .../boost/mpl/aux_/preprocessed/bcc/bind.hpp | 5 ++-- .../aux_/preprocessed/bcc551/basic_bind.hpp | 5 ++-- .../mpl/aux_/preprocessed/bcc551/bind.hpp | 5 ++-- .../mpl/aux_/preprocessed/gcc/basic_bind.hpp | 4 +++ .../boost/mpl/aux_/preprocessed/gcc/bind.hpp | 4 +++ .../aux_/preprocessed/msvc60/basic_bind.hpp | 12 ++++---- .../mpl/aux_/preprocessed/msvc60/bind.hpp | 18 ++++++------ .../aux_/preprocessed/msvc70/basic_bind.hpp | 12 ++++---- .../mpl/aux_/preprocessed/msvc70/bind.hpp | 18 ++++++------ .../mpl/aux_/preprocessed/mwcw/basic_bind.hpp | 4 +++ .../boost/mpl/aux_/preprocessed/mwcw/bind.hpp | 4 +++ .../aux_/preprocessed/no_ctps/basic_bind.hpp | 11 ++++--- .../mpl/aux_/preprocessed/no_ctps/bind.hpp | 17 ++++++----- .../aux_/preprocessed/plain/basic_bind.hpp | 3 ++ .../mpl/aux_/preprocessed/plain/bind.hpp | 3 ++ include/boost/mpl/bind.hpp | 5 ++++ preprocessed/include/bcc/user.hpp | 8 +++-- preprocessed/include/bcc551/user.hpp | 7 +++-- preprocessed/include/msvc60/user.hpp | 1 + preprocessed/include/msvc70/user.hpp | 1 + preprocessed/pp.py | 6 +++- preprocessed/preprocess.py | 20 ++++++------- 24 files changed, 131 insertions(+), 76 deletions(-) diff --git a/include/boost/mpl/aux_/config/preprocessor.hpp b/include/boost/mpl/aux_/config/preprocessor.hpp index 66cef48..b271390 100644 --- a/include/boost/mpl/aux_/config/preprocessor.hpp +++ b/include/boost/mpl/aux_/config/preprocessor.hpp @@ -1,9 +1,11 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/preprocessor.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 + +#ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED + +// + file: boost/mpl/aux_/config/preprocessor.hpp +// + last modified: 23/jun/03 + +// Copyright (c) 2000-03 // Aleksey Gurtovoy // // Permission to use, copy, modify, distribute and sell this software @@ -13,16 +15,19 @@ // supporting documentation. No representations are made about the // suitability of this software for any purpose. It is provided "as is" // without express or implied warranty. +// +// See http://www.boost.org/libs/mpl for documentation. -#ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED -#define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED +#include "boost/mpl/aux_/config/workaround.hpp" -#include "boost/config.hpp" +#if !defined( BOOST_MPL_PREPROCESSING_MODE ) \ + && ( BOOST_WORKAROUND( __MWERKS__, BOOST_TESTED_AT(0x3003) ) \ + || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x561) ) \ + || BOOST_WORKAROUND( __IBMCPP__, BOOST_TESTED_AT(502) ) \ + ) -#if defined(__MWERKS__) && (__MWERKS__ <= 0x3003 || !defined(BOOST_STRICT_CONFIG)) \ - || defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ - || defined(__IBMCPP__) && (__IBMCPP__ <= 502 || !defined(BOOST_STRICT_CONFIG)) # define BOOST_MPL_BROKEN_PP_MACRO_EXPANSION + #endif //#define BOOST_MPL_NO_OWN_PP_PRIMITIVES diff --git a/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp index f9c9a49..f393b0b 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp @@ -4,6 +4,9 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) + namespace aux { template< @@ -16,7 +19,6 @@ struct resolve_bind_arg }; } // namespace aux - template< typename F, typename T > struct bind1st; template< typename F, typename T > struct bind2nd; @@ -51,7 +53,6 @@ struct resolve_bind_arg< bind2nd,U1,U2,U3,U4,U5 > }; } // namespace aux - BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) diff --git a/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp index bdccd3c..835b850 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp @@ -4,6 +4,9 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) + namespace aux { template< @@ -35,7 +38,6 @@ struct replace_unnamed_arg< arg<-1>,Arg > }; } // namespace aux - template< typename F, typename T > struct bind1st; template< typename F, typename T > struct bind2nd; @@ -70,7 +72,6 @@ struct resolve_bind_arg< bind2nd,U1,U2,U3,U4,U5 > }; } // namespace aux - BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp index 27d99aa..5ac97c3 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp @@ -4,6 +4,9 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) + namespace aux { template< @@ -16,7 +19,6 @@ struct resolve_bind_arg }; } // namespace aux - template< typename F, typename T > struct bind1st; template< typename F, typename T > struct bind2nd; @@ -51,7 +53,6 @@ struct resolve_bind_arg< bind2nd,U1,U2,U3,U4,U5 > }; } // namespace aux - BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp index 758104d..324e77f 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp @@ -4,6 +4,9 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) + namespace aux { template< @@ -35,7 +38,6 @@ struct replace_unnamed_arg< arg<-1>,Arg > }; } // namespace aux - template< typename F, typename T > struct bind1st; template< typename F, typename T > struct bind2nd; @@ -70,7 +72,6 @@ struct resolve_bind_arg< bind2nd,U1,U2,U3,U4,U5 > }; } // namespace aux - BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) diff --git a/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp index d86e51b..73c4182 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp @@ -4,6 +4,9 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) + namespace aux { template< @@ -357,6 +360,7 @@ struct resolve_bind_arg< BOOST_MPL_AUX_ARITY_SPEC(6, bind5) // primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 diff --git a/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp b/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp index 20db753..48ff9a6 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp @@ -4,6 +4,9 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) + namespace aux { template< @@ -454,6 +457,7 @@ struct resolve_bind_arg< BOOST_MPL_AUX_ARITY_SPEC(6, bind5) // primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp index 3a95fdd..178c985 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp @@ -4,8 +4,10 @@ namespace boost { namespace mpl { -namespace aux { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +namespace aux { template< bool > struct resolve_arg_impl { @@ -19,7 +21,7 @@ struct resolve_arg_impl }; }; -template<> +template<> struct resolve_arg_impl { template< @@ -34,7 +36,7 @@ struct resolve_arg_impl template< typename T > struct is_bind_template; -template< +template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > @@ -45,12 +47,10 @@ struct resolve_bind_arg }; } // namespace aux - template< typename F, typename T > struct bind1st; template< typename F, typename T > struct bind2nd; namespace aux { - template< nttp_int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); @@ -80,6 +80,7 @@ struct is_bind_template_impl sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) }; + }; }; @@ -90,7 +91,6 @@ template< typename T > struct is_bind_template }; } // namespace aux - BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp index f2ea05c..2d55a6b 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp @@ -4,8 +4,10 @@ namespace boost { namespace mpl { -namespace aux { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +namespace aux { template< bool > struct resolve_arg_impl { @@ -19,7 +21,7 @@ struct resolve_arg_impl }; }; -template<> +template<> struct resolve_arg_impl { template< @@ -34,7 +36,7 @@ struct resolve_arg_impl template< typename T > struct is_bind_template; -template< +template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > @@ -44,7 +46,7 @@ struct resolve_bind_arg { }; -template< typename T > +template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ @@ -54,7 +56,7 @@ struct replace_unnamed_arg_impl }; }; -template<> +template<> struct replace_unnamed_arg_impl< arg<-1> > { template< typename Arg > struct result_ @@ -64,19 +66,17 @@ struct replace_unnamed_arg_impl< arg<-1> > }; }; -template< typename T, typename Arg > +template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { }; } // namespace aux - template< typename F, typename T > struct bind1st; template< typename F, typename T > struct bind2nd; namespace aux { - template< nttp_int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); @@ -106,6 +106,7 @@ struct is_bind_template_impl sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) }; + }; }; @@ -116,7 +117,6 @@ template< typename T > struct is_bind_template }; } // namespace aux - BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp index ebc4272..2c94fb0 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp @@ -4,8 +4,10 @@ namespace boost { namespace mpl { -namespace aux { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +namespace aux { template< bool > struct resolve_arg_impl { @@ -19,7 +21,7 @@ struct resolve_arg_impl }; }; -template<> +template<> struct resolve_arg_impl { template< @@ -34,7 +36,7 @@ struct resolve_arg_impl template< typename T > struct is_bind_template; -template< +template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > @@ -45,12 +47,10 @@ struct resolve_bind_arg }; } // namespace aux - template< typename F, typename T > struct bind1st; template< typename F, typename T > struct bind2nd; namespace aux { - template< int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); @@ -80,6 +80,7 @@ struct is_bind_template_impl sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) }; + }; }; @@ -90,7 +91,6 @@ template< typename T > struct is_bind_template }; } // namespace aux - BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp index e7e265b..c7b7b75 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp @@ -4,8 +4,10 @@ namespace boost { namespace mpl { -namespace aux { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +namespace aux { template< bool > struct resolve_arg_impl { @@ -19,7 +21,7 @@ struct resolve_arg_impl }; }; -template<> +template<> struct resolve_arg_impl { template< @@ -34,7 +36,7 @@ struct resolve_arg_impl template< typename T > struct is_bind_template; -template< +template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > @@ -44,7 +46,7 @@ struct resolve_bind_arg { }; -template< typename T > +template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ @@ -54,7 +56,7 @@ struct replace_unnamed_arg_impl }; }; -template<> +template<> struct replace_unnamed_arg_impl< arg<-1> > { template< typename Arg > struct result_ @@ -64,19 +66,17 @@ struct replace_unnamed_arg_impl< arg<-1> > }; }; -template< typename T, typename Arg > +template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { }; } // namespace aux - template< typename F, typename T > struct bind1st; template< typename F, typename T > struct bind2nd; namespace aux { - template< int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); @@ -106,6 +106,7 @@ struct is_bind_template_impl sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) }; + }; }; @@ -116,7 +117,6 @@ template< typename T > struct is_bind_template }; } // namespace aux - BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp index 7793f41..cf52e14 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp @@ -4,6 +4,9 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) + namespace aux { template< @@ -357,6 +360,7 @@ struct resolve_bind_arg< BOOST_MPL_AUX_ARITY_SPEC(6, bind5) // primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp index 70af9c3..d247d68 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp @@ -4,6 +4,9 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) + namespace aux { template< @@ -454,6 +457,7 @@ struct resolve_bind_arg< BOOST_MPL_AUX_ARITY_SPEC(6, bind5) // primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp index ce6d567..7633a27 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp @@ -4,8 +4,10 @@ namespace boost { namespace mpl { -namespace aux { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +namespace aux { template< bool > struct resolve_arg_impl { @@ -19,7 +21,7 @@ struct resolve_arg_impl }; }; -template<> +template<> struct resolve_arg_impl { template< @@ -34,7 +36,7 @@ struct resolve_arg_impl template< typename T > struct is_bind_template; -template< +template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > @@ -56,7 +58,6 @@ template< typename F, typename T > struct bind1st; template< typename F, typename T > struct bind2nd; namespace aux { - template< int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); @@ -92,6 +93,7 @@ struct is_bind_template_impl sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ; + }; }; @@ -440,6 +442,7 @@ struct bind_count_args + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value ; + }; } diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp index f4d9293..927f386 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp @@ -4,8 +4,10 @@ namespace boost { namespace mpl { -namespace aux { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +namespace aux { template< bool > struct resolve_arg_impl { @@ -19,7 +21,7 @@ struct resolve_arg_impl }; }; -template<> +template<> struct resolve_arg_impl { template< @@ -34,7 +36,7 @@ struct resolve_arg_impl template< typename T > struct is_bind_template; -template< +template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > @@ -44,7 +46,7 @@ struct resolve_bind_arg { }; -template< typename T > +template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ @@ -54,7 +56,7 @@ struct replace_unnamed_arg_impl }; }; -template<> +template<> struct replace_unnamed_arg_impl< arg<-1> > { template< typename Arg > struct result_ @@ -64,7 +66,7 @@ struct replace_unnamed_arg_impl< arg<-1> > }; }; -template< typename T, typename Arg > +template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { @@ -82,7 +84,6 @@ template< typename F, typename T > struct bind1st; template< typename F, typename T > struct bind2nd; namespace aux { - template< int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); @@ -118,6 +119,7 @@ struct is_bind_template_impl sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ; + }; }; @@ -544,6 +546,7 @@ struct bind_count_args + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value ; + }; } diff --git a/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp index ebc5759..73c4182 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp @@ -4,6 +4,9 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) + namespace aux { template< diff --git a/include/boost/mpl/aux_/preprocessed/plain/bind.hpp b/include/boost/mpl/aux_/preprocessed/plain/bind.hpp index e881a0d..48ff9a6 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/bind.hpp @@ -4,6 +4,9 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) + namespace aux { template< diff --git a/include/boost/mpl/bind.hpp b/include/boost/mpl/bind.hpp index 2bd780a..04a2e1f 100644 --- a/include/boost/mpl/bind.hpp +++ b/include/boost/mpl/bind.hpp @@ -35,6 +35,7 @@ # include "boost/mpl/aux_/arity_spec.hpp" # include "boost/mpl/aux_/type_wrapper.hpp" # include "boost/mpl/aux_/yes_no.hpp" +# include "boost/mpl/aux_/common_name_wknd.hpp" # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # include "boost/type_traits/is_reference.hpp" # endif @@ -71,6 +72,9 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) +BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) + // local macros, #undef-ined at the end of the header # define AUX_APPLY(args) \ BOOST_MPL_AUX_APPLY(BOOST_MPL_METAFUNCTION_MAX_ARITY, args) \ @@ -366,6 +370,7 @@ struct bind #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // bind1st/bind2nd, lightweight, for simple cases/backward compatibility + template< typename F, typename T > struct bind1st { diff --git a/preprocessed/include/bcc/user.hpp b/preprocessed/include/bcc/user.hpp index da08e9d..714951d 100644 --- a/preprocessed/include/bcc/user.hpp +++ b/preprocessed/include/bcc/user.hpp @@ -2,6 +2,10 @@ #include "boost/preprocessor/config/config.hpp" -#define BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES #define BOOST_NO_TEMPLATE_TEMPLATES -#define __BORLANDC__ 0x561 +#define BOOST_MPL_NO_BIND_TEMPLATE +#define BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION +#define BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES +#define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES +#define BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION +#define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING diff --git a/preprocessed/include/bcc551/user.hpp b/preprocessed/include/bcc551/user.hpp index 5ff64b2..72df50a 100644 --- a/preprocessed/include/bcc551/user.hpp +++ b/preprocessed/include/bcc551/user.hpp @@ -2,6 +2,9 @@ #include "boost/preprocessor/config/config.hpp" -#define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES #define BOOST_NO_TEMPLATE_TEMPLATES -#define __BORLANDC__ 0x551 +#define BOOST_MPL_NO_BIND_TEMPLATE +#define BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION +#define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES +#define BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION +#define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING diff --git a/preprocessed/include/msvc60/user.hpp b/preprocessed/include/msvc60/user.hpp index fc27ce1..131506f 100644 --- a/preprocessed/include/msvc60/user.hpp +++ b/preprocessed/include/msvc60/user.hpp @@ -6,3 +6,4 @@ #define BOOST_NO_CV_VOID_SPECIALIZATIONS #define BOOST_NO_INTRINSIC_WCHAR_T #define BOOST_NO_STD_ALLOCATOR +#define BOOST_MPL_NO_BIND_TEMPLATE diff --git a/preprocessed/include/msvc70/user.hpp b/preprocessed/include/msvc70/user.hpp index 71936ed..bcc3183 100644 --- a/preprocessed/include/msvc70/user.hpp +++ b/preprocessed/include/msvc70/user.hpp @@ -2,3 +2,4 @@ #define BOOST_MSVC 1300 #define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +#define BOOST_MPL_NO_BIND_TEMPLATE diff --git a/preprocessed/pp.py b/preprocessed/pp.py index 064ab20..ef6f0e0 100644 --- a/preprocessed/pp.py +++ b/preprocessed/pp.py @@ -159,6 +159,7 @@ class pretty: self.re_typedefs = re.compile(r'(\s*)((\s*typedef\s*.*?;)+)\s*$') self.re_closing_curly_brace = re.compile(r'^(}|struct\s+\w+);\s*$') self.re_namespace_scope_templ = re.compile(r'^template\s*<\s*$') + self.re_namespace = re.compile(r'^\n?namespace\s+\w+\s*{\s*\n?$') def process(self, line): @@ -184,7 +185,10 @@ class pretty: # restoring some empty lines if self.re_templ_decl.match(line) and self.re_typedef.match(self.prev_line) \ or not self.re_empty_line.match(line) and self.re_closing_curly_brace.match(self.prev_line) \ - or self.re_namespace_scope_templ.match(line) and not self.re_empty_line.match(self.prev_line): + or not self.re_empty_line.match(self.prev_line) \ + and ( self.re_namespace_scope_templ.match(line) \ + or self.re_namespace.match(line) and not self.re_namespace.match(self.prev_line) \ + ): line = '\n%s' % line # removing excessive empty lines diff --git a/preprocessed/preprocess.py b/preprocessed/preprocess.py index 36f9f62..7484a05 100644 --- a/preprocessed/preprocess.py +++ b/preprocessed/preprocess.py @@ -1,16 +1,16 @@ -# Copyright (c) 2001-03 -# Aleksey Gurtovoy +# Copyright (c) 2001-03 +# Aleksey Gurtovoy # -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appears in all copies and -# that both the copyright notice and this permission notice appear in -# supporting documentation. No representations are made about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# Permission to use, copy, modify, distribute and sell this software +# and its documentation for any purpose is hereby granted without fee, +# provided that the above copyright notice appears in all copies and +# that both the copyright notice and this permission notice appear in +# supporting documentation. No representations are made about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. # -# See http://www.boost.org/libs/mpl for documentation. +# See http://www.boost.org/libs/mpl for documentation. import shutil import os.path