bind1st/bind2nd common name workaround

[SVN r18859]
This commit is contained in:
Aleksey Gurtovoy committed 2003-06-23 12:44:12 +00:00
1 parent cf220da789
commit 6dc817c68a
24 files changed
+131 -76

No files matched your search

+17 -12
View File
@@ -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
@@ -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<F,T>,U1,U2,U3,U4,U5 >
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -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<F,T>,U1,U2,U3,U4,U5 >
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -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<F,T>,U1,U2,U3,U4,U5 >
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -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<F,T>,U1,U2,U3,U4,U5 >
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -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
@@ -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
@@ -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<true>
{
template<
@@ -34,7 +36,7 @@ struct resolve_arg_impl<true>
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<false>
sizeof(aux::is_bind_helper(static_cast<T*>(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)
@@ -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<true>
{
template<
@@ -34,7 +36,7 @@ struct resolve_arg_impl<true>
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<T>::template result_<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(...);
@@ -106,6 +106,7 @@ struct is_bind_template_impl<false>
sizeof(aux::is_bind_helper(static_cast<T*>(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)
@@ -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<true>
{
template<
@@ -34,7 +36,7 @@ struct resolve_arg_impl<true>
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<false>
sizeof(aux::is_bind_helper(static_cast<T*>(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)
@@ -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<true>
{
template<
@@ -34,7 +36,7 @@ struct resolve_arg_impl<true>
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<T>::template result_<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(...);
@@ -106,6 +106,7 @@ struct is_bind_template_impl<false>
sizeof(aux::is_bind_helper(static_cast<T*>(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)
@@ -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
@@ -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
@@ -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<true>
{
template<
@@ -34,7 +36,7 @@ struct resolve_arg_impl<true>
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<false>
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
;
};
};
@@ -440,6 +442,7 @@ struct bind_count_args
+ is_bind_arg<T3>::value + is_bind_arg<T4>::value
+ is_bind_arg<T5>::value
;
};
}
@@ -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<true>
{
template<
@@ -34,7 +36,7 @@ struct resolve_arg_impl<true>
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<T>::template result_<Arg>
{
@@ -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<false>
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
;
};
};
@@ -544,6 +546,7 @@ struct bind_count_args
+ is_bind_arg<T3>::value + is_bind_arg<T4>::value
+ is_bind_arg<T5>::value
;
};
}
@@ -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<
@@ -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<
+5
View File
@@ -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
{