From 235feb0f62e0fca28d60d982d5c46c9c9fbd8219 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 30 Jan 2002 11:29:28 +0000 Subject: [PATCH] _N placeholders moved to a separate header. [SVN r12573] --- include/boost/bind.hpp | 24 ++++++------------- include/boost/bind/arg.hpp | 30 ++++++++++++++++++++++++ include/boost/bind/placeholders.hpp | 36 +++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 include/boost/bind/arg.hpp create mode 100644 include/boost/bind/placeholders.hpp diff --git a/include/boost/bind.hpp b/include/boost/bind.hpp index d649598..42ede32 100644 --- a/include/boost/bind.hpp +++ b/include/boost/bind.hpp @@ -8,7 +8,7 @@ // // bind.hpp - binds function objects to arguments // -// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. // Copyright (c) 2001 David Abrahams // // Permission to copy, use, modify, sell and distribute this software @@ -22,6 +22,7 @@ #include #include #include +#include // Borland-specific bug, visit_each() silently fails to produce code @@ -80,10 +81,6 @@ private: T t_; }; -// arg - -template class arg {}; - // type template class type {}; @@ -1300,18 +1297,11 @@ template _1; - boost::_bi::arg<2> _2; - boost::_bi::arg<3> _3; - boost::_bi::arg<4> _4; - boost::_bi::arg<5> _5; - boost::_bi::arg<6> _6; - boost::_bi::arg<7> _7; - boost::_bi::arg<8> _8; - boost::_bi::arg<9> _9; -} +#ifndef BOOST_BIND_NO_PLACEHOLDERS + +# include + +#endif #ifdef BOOST_MSVC # pragma warning(default: 4512) // assignment operator could not be generated diff --git a/include/boost/bind/arg.hpp b/include/boost/bind/arg.hpp new file mode 100644 index 0000000..c0c32d2 --- /dev/null +++ b/include/boost/bind/arg.hpp @@ -0,0 +1,30 @@ +#ifndef BOOST_BIND_ARG_HPP_INCLUDED +#define BOOST_BIND_ARG_HPP_INCLUDED + +#if _MSC_VER >= 1020 +#pragma once +#endif + +// +// bind/arg.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Permission to copy, use, modify, sell and distribute this software +// is granted provided this copyright notice appears in all copies. +// This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +namespace boost +{ + +template class arg +{ +}; + +} // namespace boost + +#endif // #ifndef BOOST_BIND_ARG_HPP_INCLUDED diff --git a/include/boost/bind/placeholders.hpp b/include/boost/bind/placeholders.hpp new file mode 100644 index 0000000..bda94bc --- /dev/null +++ b/include/boost/bind/placeholders.hpp @@ -0,0 +1,36 @@ +#ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED +#define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED + +#if _MSC_VER >= 1020 +#pragma once +#endif + +// +// bind/placeholders.hpp - _N definitions +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Permission to copy, use, modify, sell and distribute this software +// is granted provided this copyright notice appears in all copies. +// This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +#include + +namespace +{ + boost::arg<1> _1; + boost::arg<2> _2; + boost::arg<3> _3; + boost::arg<4> _4; + boost::arg<5> _5; + boost::arg<6> _6; + boost::arg<7> _7; + boost::arg<8> _8; + boost::arg<9> _9; +} + +#endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED