gcc ADL fixes

[SVN r16586]
This commit is contained in:
Aleksey Gurtovoy
2002-12-11 08:58:47 +00:00
parent 86c69085eb
commit b03af4e3ce
3 changed files with 49 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/algorithm_namespace.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// 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.
#ifndef BOOST_MPL_AUX_ALGORITHM_NAMESPACE_HPP_INCLUDED
#define BOOST_MPL_AUX_ALGORITHM_NAMESPACE_HPP_INCLUDED
#if defined(__GNUC__) && __GNUC__ >= 3
# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX algo_::
# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN namespace algo_ {
# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END } using namespace algo_;
#else
# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX /**/
# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN /**/
# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END /**/
#endif
#endif // BOOST_MPL_AUX_ALGORITHM_NAMESPACE_HPP_INCLUDED

View File

@@ -25,6 +25,7 @@
#include "boost/mpl/aux_/arity.hpp"
#include "boost/mpl/aux_/template_arity_fwd.hpp"
#include "boost/mpl/aux_/lambda_arity_param.hpp"
#include "boost/mpl/aux_/algorithm_namespace.hpp"
#include "boost/mpl/aux_/config/dtp.hpp"
#include "boost/mpl/aux_/config/nttp.hpp"
#include "boost/mpl/aux_/config/ttp.hpp"
@@ -142,4 +143,13 @@ BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \
BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, j, name) \
/**/
#define BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(i, name) \
BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN \
BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \
BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END \
BOOST_MPL_AUX_VOID_SPEC_LAMBDA(i, BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX name) \
BOOST_MPL_AUX_VOID_SPEC_ARITY(i, BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX name) \
BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, i, BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX name) \
/**/
#endif // BOOST_MPL_AUX_VOID_SPEC_HPP_INCLUDED

View File

@@ -19,10 +19,13 @@
#include "boost/mpl/fold_backward.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/algorithm_namespace.hpp"
namespace boost {
namespace mpl {
BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN
template<
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence)
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State)
@@ -33,7 +36,8 @@ struct copy_backward
{
};
BOOST_MPL_AUX_VOID_SPEC(3, copy_backward)
BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END
BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(3, copy_backward)
} // namespace mpl
} // namespace boost