12ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifndef BOOST_BIND_BIND_HPP_INCLUDED 22ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_BIND_HPP_INCLUDED 32ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 42ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// MS compatible compilers support #pragma once 52ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 62ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if defined(_MSC_VER) && (_MSC_VER >= 1020) 72ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# pragma once 82ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 92ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// 112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// bind.hpp - binds function objects to arguments 122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// 132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. 142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// Copyright (c) 2001 David Abrahams 152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// Copyright (c) 2005 Peter Dimov 162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// 172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// Distributed under the Boost Software License, Version 1.0. (See 182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// accompanying file LICENSE_1_0.txt or copy at 192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// http://www.boost.org/LICENSE_1_0.txt) 202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// 212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// See http://www.boost.org/libs/bind/bind.html for documentation. 222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// 232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/config.hpp> 252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/ref.hpp> 262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/mem_fn.hpp> 272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/type.hpp> 282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/is_placeholder.hpp> 292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/arg.hpp> 302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/detail/workaround.hpp> 312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/visit_each.hpp> 322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// Borland-specific bug, visit_each() silently fails to produce code 342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if defined(__BORLANDC__) 362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# define BOOST_BIND_VISIT_EACH boost::visit_each 372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#else 382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# define BOOST_BIND_VISIT_EACH visit_each 392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/storage.hpp> 422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_MSVC 442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# pragma warning(push) 452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# pragma warning(disable: 4512) // assignment operator could not be generated 462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnamespace boost 492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> class weak_ptr; 522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnamespace _bi // implementation details 542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// result_traits 572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F> struct result_traits 592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef R type; 612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) 642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehstruct unspecified {}; 662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F> struct result_traits<unspecified, F> 682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename F::result_type type; 702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F> struct result_traits< unspecified, reference_wrapper<F> > 732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename F::result_type type; 752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ref_compare 802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> bool ref_compare( T const & a, T const & b, long ) 822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return a == b; 842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<int I> bool ref_compare( arg<I> const &, arg<I> const &, int ) 872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return true; 892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<int I> bool ref_compare( arg<I> (*) (), arg<I> (*) (), int ) 922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return true; 942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> bool ref_compare( reference_wrapper<T> const & a, reference_wrapper<T> const & b, int ) 972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return a.get_pointer() == b.get_pointer(); 992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 1002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// bind_t forward declaration for listN 1022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L> class bind_t; 1042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L> bool ref_compare( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b, int ) 1062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 1072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return a.compare( b ); 1082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 1092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// value 1112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> class value 1132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 1142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 1152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh value(T const & t): t_(t) {} 1172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh T & get() { return t_; } 1192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh T const & get() const { return t_; } 1202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bool operator==(value const & rhs) const 1222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 1232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return t_ == rhs.t_; 1242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 1252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate: 1272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh T t_; 1292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 1302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ref_compare for weak_ptr 1322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> bool ref_compare( value< weak_ptr<T> > const & a, value< weak_ptr<T> > const & b, int ) 1342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 1352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return !(a.get() < b.get()) && !(b.get() < a.get()); 1362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 1372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// type 1392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> class type {}; 1412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// unwrap 1432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F> struct unwrapper 1452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 1462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh static inline F & unwrap( F & f, long ) 1472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 1482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return f; 1492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 1502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F2> static inline F2 & unwrap( reference_wrapper<F2> rf, int ) 1522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 1532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return rf.get(); 1542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 1552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class T> static inline _mfi::dm<R, T> unwrap( R T::* pm, int ) 1572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 1582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _mfi::dm<R, T>( pm ); 1592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 1602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 1612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// listN 1632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehclass list0 1652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 1662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 1672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh list0() {} 1692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); } 1712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); } 1732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 1752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); } 1772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); } 1792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F & f, A &, long) 1812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 1822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F>::unwrap(f, 0)(); 1832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 1842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F const & f, A &, long) const 1862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 1872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F const>::unwrap(f, 0)(); 1882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 1892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F & f, A &, int) 1912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 1922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F>::unwrap(f, 0)(); 1932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 1942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 1952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F const & f, A &, int) const 1962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 1972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F const>::unwrap(f, 0)(); 1982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 1992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V> void accept(V &) const 2012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 2022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 2032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bool operator==(list0 const &) const 2052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 2062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return true; 2072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 2082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 2092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_MSVC 2112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// MSVC is bright enough to realise that the parameter rhs 2122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// in operator==may be unused for some template argument types: 2132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#pragma warning(push) 2142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#pragma warning(disable:4100) 2152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 2162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class A1 > class list1: private storage1< A1 > 2182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 2192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate: 2202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef storage1< A1 > base_type; 2222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 2242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh explicit list1( A1 a1 ): base_type( a1 ) {} 2262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1>) const { return base_type::a1_; } 2282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } 2302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); } 2322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); } 2342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 2362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); } 2382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); } 2402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long) 2422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 2432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_]); 2442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 2452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const 2472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 2482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_]); 2492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 2502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F & f, A & a, int) 2522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 2532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F>::unwrap(f, 0)(a[base_type::a1_]); 2542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 2552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const 2572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 2582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_]); 2592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 2602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V> void accept(V & v) const 2622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 2632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh base_type::accept(v); 2642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 2652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bool operator==(list1 const & rhs) const 2672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 2682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return ref_compare(base_type::a1_, rhs.a1_, 0); 2692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 2702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 2712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehstruct logical_and; 2732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehstruct logical_or; 2742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class A1, class A2 > class list2: private storage2< A1, A2 > 2762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 2772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate: 2782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef storage2< A1, A2 > base_type; 2802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 2822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh list2( A1 a1, A2 a2 ): base_type( a1, a2 ) {} 2842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1>) const { return base_type::a1_; } 2862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2>) const { return base_type::a2_; } 2872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } 2892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } 2902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); } 2922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); } 2942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 2962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); } 2982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 2992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); } 3002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long) 3022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); 3042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const 3072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); 3092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F & f, A & a, int) 3122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); 3142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const 3172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); 3192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class A> bool operator()( type<bool>, logical_and & /*f*/, A & a, int ) 3222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return a[ base_type::a1_ ] && a[ base_type::a2_ ]; 3242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class A> bool operator()( type<bool>, logical_and const & /*f*/, A & a, int ) const 3272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return a[ base_type::a1_ ] && a[ base_type::a2_ ]; 3292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class A> bool operator()( type<bool>, logical_or & /*f*/, A & a, int ) 3322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return a[ base_type::a1_ ] || a[ base_type::a2_ ]; 3342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class A> bool operator()( type<bool>, logical_or const & /*f*/, A & a, int ) const 3372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return a[ base_type::a1_ ] || a[ base_type::a2_ ]; 3392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V> void accept(V & v) const 3422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh base_type::accept(v); 3442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bool operator==(list2 const & rhs) const 3472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return ref_compare(base_type::a1_, rhs.a1_, 0) && ref_compare(base_type::a2_, rhs.a2_, 0); 3492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 3512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class A1, class A2, class A3 > class list3: private storage3< A1, A2, A3 > 3532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 3542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate: 3552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef storage3< A1, A2, A3 > base_type; 3572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 3592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh list3( A1 a1, A2 a2, A3 a3 ): base_type( a1, a2, a3 ) {} 3612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1>) const { return base_type::a1_; } 3632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2>) const { return base_type::a2_; } 3642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3>) const { return base_type::a3_; } 3652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } 3672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } 3682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } 3692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); } 3712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); } 3732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 3752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); } 3772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); } 3792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long) 3812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); 3832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const 3862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); 3882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F & f, A & a, int) 3912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); 3932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 3952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const 3962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 3972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); 3982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 3992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V> void accept(V & v) const 4012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 4022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh base_type::accept(v); 4032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 4042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bool operator==(list3 const & rhs) const 4062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 4072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return 4082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a1_, rhs.a1_, 0 ) && 4102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a2_, rhs.a2_, 0 ) && 4112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a3_, rhs.a3_, 0 ); 4122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 4132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 4142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class A1, class A2, class A3, class A4 > class list4: private storage4< A1, A2, A3, A4 > 4162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 4172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate: 4182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef storage4< A1, A2, A3, A4 > base_type; 4202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 4222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh list4( A1 a1, A2 a2, A3 a3, A4 a4 ): base_type( a1, a2, a3, a4 ) {} 4242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1>) const { return base_type::a1_; } 4262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2>) const { return base_type::a2_; } 4272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3>) const { return base_type::a3_; } 4282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4>) const { return base_type::a4_; } 4292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } 4312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } 4322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } 4332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } 4342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); } 4362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); } 4382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 4402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); } 4422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); } 4442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long) 4462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 4472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); 4482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 4492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const 4512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 4522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); 4532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 4542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F & f, A & a, int) 4562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 4572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); 4582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 4592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const 4612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 4622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); 4632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 4642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V> void accept(V & v) const 4662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 4672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh base_type::accept(v); 4682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 4692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bool operator==(list4 const & rhs) const 4712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 4722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return 4732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a1_, rhs.a1_, 0 ) && 4752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a2_, rhs.a2_, 0 ) && 4762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a3_, rhs.a3_, 0 ) && 4772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a4_, rhs.a4_, 0 ); 4782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 4792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 4802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class A1, class A2, class A3, class A4, class A5 > class list5: private storage5< A1, A2, A3, A4, A5 > 4822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 4832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate: 4842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef storage5< A1, A2, A3, A4, A5 > base_type; 4862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 4882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh list5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): base_type( a1, a2, a3, a4, a5 ) {} 4902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1>) const { return base_type::a1_; } 4922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2>) const { return base_type::a2_; } 4932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3>) const { return base_type::a3_; } 4942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4>) const { return base_type::a4_; } 4952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A5 operator[] (boost::arg<5>) const { return base_type::a5_; } 4962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 4972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } 4982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } 4992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } 5002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } 5012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } 5022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); } 5042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); } 5062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 5082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); } 5102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); } 5122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long) 5142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 5152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); 5162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 5172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const 5192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 5202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); 5212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 5222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F & f, A & a, int) 5242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 5252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); 5262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 5272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const 5292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 5302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); 5312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 5322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V> void accept(V & v) const 5342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 5352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh base_type::accept(v); 5362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 5372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bool operator==(list5 const & rhs) const 5392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 5402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return 5412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a1_, rhs.a1_, 0 ) && 5432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a2_, rhs.a2_, 0 ) && 5442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a3_, rhs.a3_, 0 ) && 5452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a4_, rhs.a4_, 0 ) && 5462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a5_, rhs.a5_, 0 ); 5472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 5482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 5492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1, class A2, class A3, class A4, class A5, class A6> class list6: private storage6< A1, A2, A3, A4, A5, A6 > 5512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 5522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate: 5532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef storage6< A1, A2, A3, A4, A5, A6 > base_type; 5552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 5572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh list6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): base_type( a1, a2, a3, a4, a5, a6 ) {} 5592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1>) const { return base_type::a1_; } 5612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2>) const { return base_type::a2_; } 5622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3>) const { return base_type::a3_; } 5632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4>) const { return base_type::a4_; } 5642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A5 operator[] (boost::arg<5>) const { return base_type::a5_; } 5652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A6 operator[] (boost::arg<6>) const { return base_type::a6_; } 5662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } 5682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } 5692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } 5702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } 5712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } 5722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } 5732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); } 5752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); } 5772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 5792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); } 5812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); } 5832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long) 5852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 5862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); 5872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 5882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const 5902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 5912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); 5922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 5932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F & f, A & a, int) 5952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 5962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); 5972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 5982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 5992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const 6002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 6012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); 6022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 6032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V> void accept(V & v) const 6052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 6062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh base_type::accept(v); 6072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 6082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bool operator==(list6 const & rhs) const 6102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 6112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return 6122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a1_, rhs.a1_, 0 ) && 6142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a2_, rhs.a2_, 0 ) && 6152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a3_, rhs.a3_, 0 ) && 6162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a4_, rhs.a4_, 0 ) && 6172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a5_, rhs.a5_, 0 ) && 6182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a6_, rhs.a6_, 0 ); 6192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 6202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 6212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1, class A2, class A3, class A4, class A5, class A6, class A7> class list7: private storage7< A1, A2, A3, A4, A5, A6, A7 > 6232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 6242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate: 6252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef storage7< A1, A2, A3, A4, A5, A6, A7 > base_type; 6272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 6292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh list7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): base_type( a1, a2, a3, a4, a5, a6, a7 ) {} 6312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1>) const { return base_type::a1_; } 6332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2>) const { return base_type::a2_; } 6342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3>) const { return base_type::a3_; } 6352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4>) const { return base_type::a4_; } 6362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A5 operator[] (boost::arg<5>) const { return base_type::a5_; } 6372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A6 operator[] (boost::arg<6>) const { return base_type::a6_; } 6382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A7 operator[] (boost::arg<7>) const { return base_type::a7_; } 6392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } 6412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } 6422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } 6432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } 6442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } 6452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } 6462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } 6472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); } 6492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); } 6512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 6532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); } 6552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); } 6572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long) 6592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 6602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); 6612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 6622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const 6642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 6652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); 6662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 6672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F & f, A & a, int) 6692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 6702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); 6712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 6722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const 6742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 6752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); 6762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 6772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V> void accept(V & v) const 6792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 6802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh base_type::accept(v); 6812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 6822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bool operator==(list7 const & rhs) const 6842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 6852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return 6862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a1_, rhs.a1_, 0 ) && 6882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a2_, rhs.a2_, 0 ) && 6892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a3_, rhs.a3_, 0 ) && 6902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a4_, rhs.a4_, 0 ) && 6912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a5_, rhs.a5_, 0 ) && 6922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a6_, rhs.a6_, 0 ) && 6932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a7_, rhs.a7_, 0 ); 6942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 6952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 6962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 6972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class list8: private storage8< A1, A2, A3, A4, A5, A6, A7, A8 > 6982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 6992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate: 7002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef storage8< A1, A2, A3, A4, A5, A6, A7, A8 > base_type; 7022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 7042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh list8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8 ) {} 7062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1>) const { return base_type::a1_; } 7082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2>) const { return base_type::a2_; } 7092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3>) const { return base_type::a3_; } 7102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4>) const { return base_type::a4_; } 7112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A5 operator[] (boost::arg<5>) const { return base_type::a5_; } 7122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A6 operator[] (boost::arg<6>) const { return base_type::a6_; } 7132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A7 operator[] (boost::arg<7>) const { return base_type::a7_; } 7142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A8 operator[] (boost::arg<8>) const { return base_type::a8_; } 7152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } 7172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } 7182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } 7192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } 7202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } 7212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } 7222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } 7232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } 7242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); } 7262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); } 7282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 7302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); } 7322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); } 7342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long) 7362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 7372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); 7382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 7392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const 7412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 7422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); 7432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 7442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F & f, A & a, int) 7462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 7472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); 7482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 7492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const 7512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 7522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); 7532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 7542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V> void accept(V & v) const 7562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 7572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh base_type::accept(v); 7582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 7592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bool operator==(list8 const & rhs) const 7612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 7622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return 7632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a1_, rhs.a1_, 0 ) && 7652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a2_, rhs.a2_, 0 ) && 7662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a3_, rhs.a3_, 0 ) && 7672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a4_, rhs.a4_, 0 ) && 7682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a5_, rhs.a5_, 0 ) && 7692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a6_, rhs.a6_, 0 ) && 7702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a7_, rhs.a7_, 0 ) && 7712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a8_, rhs.a8_, 0 ); 7722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 7732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 7742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> class list9: private storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > 7762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 7772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate: 7782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > base_type; 7802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 7822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh list9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) {} 7842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1>) const { return base_type::a1_; } 7862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2>) const { return base_type::a2_; } 7872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3>) const { return base_type::a3_; } 7882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4>) const { return base_type::a4_; } 7892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A5 operator[] (boost::arg<5>) const { return base_type::a5_; } 7902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A6 operator[] (boost::arg<6>) const { return base_type::a6_; } 7912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A7 operator[] (boost::arg<7>) const { return base_type::a7_; } 7922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A8 operator[] (boost::arg<8>) const { return base_type::a8_; } 7932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A9 operator[] (boost::arg<9>) const { return base_type::a9_; } 7942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 7952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } 7962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } 7972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } 7982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } 7992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } 8002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } 8012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } 8022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } 8032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh A9 operator[] (boost::arg<9> (*) ()) const { return base_type::a9_; } 8042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); } 8062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); } 8082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 8102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); } 8122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); } 8142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long) 8162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 8172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); 8182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 8192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const 8212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 8222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); 8232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 8242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F & f, A & a, int) 8262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 8272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); 8282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 8292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const 8312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 8322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); 8332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 8342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V> void accept(V & v) const 8362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 8372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh base_type::accept(v); 8382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 8392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bool operator==(list9 const & rhs) const 8412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 8422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return 8432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a1_, rhs.a1_, 0 ) && 8452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a2_, rhs.a2_, 0 ) && 8462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a3_, rhs.a3_, 0 ) && 8472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a4_, rhs.a4_, 0 ) && 8482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a5_, rhs.a5_, 0 ) && 8492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a6_, rhs.a6_, 0 ) && 8502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a7_, rhs.a7_, 0 ) && 8512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a8_, rhs.a8_, 0 ) && 8522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh ref_compare( base_type::a9_, rhs.a9_, 0 ); 8532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh } 8542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 8552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_MSVC 8572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#pragma warning(pop) 8582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 8592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// bind_t 8612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifndef BOOST_NO_VOID_RETURNS 8632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L> class bind_t 8652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 8662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 8672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef bind_t this_type; 8692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bind_t(F f, L const & l): f_(f), l_(l) {} 8712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_RETURN return 8732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_template.hpp> 8742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_RETURN 8752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 8772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#else 8792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R> struct bind_t_generator 8812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 8822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F, class L> class implementation 8842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 8852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 8862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef implementation this_type; 8882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh implementation(F f, L const & l): f_(f), l_(l) {} 8902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_RETURN return 8922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_template.hpp> 8932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_RETURN 8942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 8962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 8982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 8992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<> struct bind_t_generator<void> 9002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 9012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F, class L> class implementation 9032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 9042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate: 9052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef void R; 9072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 9092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef implementation this_type; 9112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh implementation(F f, L const & l): f_(f), l_(l) {} 9132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_RETURN 9152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_template.hpp> 9162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_RETURN 9172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 9192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 9212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R2, class F, class L> class bind_t: public bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L> 9232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 9242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic: 9252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bind_t(F f, L const & l): bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L>(f, l) {} 9272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 9292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 9312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// function_equal 9332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP 9352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// put overloads in _bi, rely on ADL 9372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING 9392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L> bool function_equal( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b ) 9412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 9422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return a.compare(b); 9432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 9442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# else 9462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L> bool function_equal_impl( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b, int ) 9482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 9492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return a.compare(b); 9502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 9512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING 9532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#else // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP 9552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// put overloads in boost 9572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} // namespace _bi 9592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING 9612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L> bool function_equal( _bi::bind_t<R, F, L> const & a, _bi::bind_t<R, F, L> const & b ) 9632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 9642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return a.compare(b); 9652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 9662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# else 9682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L> bool function_equal_impl( _bi::bind_t<R, F, L> const & a, _bi::bind_t<R, F, L> const & b, int ) 9702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 9712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return a.compare(b); 9722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 9732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING 9752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnamespace _bi 9772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 9782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP 9802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// add_value 9822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || (__SUNPRO_CC >= 0x530) 9842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x582) ) 9862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> struct add_value 9882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 9892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef _bi::value<T> type; 9902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 9912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#else 9932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class T, int I > struct add_value_2 9952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 9962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef boost::arg<I> type; 9972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 9982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 9992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class T > struct add_value_2< T, 0 > 10002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef _bi::value< T > type; 10022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> struct add_value 10052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value_2< T, boost::is_placeholder< T >::value >::type type; 10072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 10102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> struct add_value< value<T> > 10122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef _bi::value<T> type; 10142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> struct add_value< reference_wrapper<T> > 10172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef reference_wrapper<T> type; 10192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<int I> struct add_value< arg<I> > 10222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef boost::arg<I> type; 10242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<int I> struct add_value< arg<I> (*) () > 10272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef boost::arg<I> (*type) (); 10292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L> struct add_value< bind_t<R, F, L> > 10322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef bind_t<R, F, L> type; 10342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#else 10372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<int I> struct _avt_0; 10392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<> struct _avt_0<1> 10412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> struct inner 10432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 10442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef T type; 10452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh }; 10462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<> struct _avt_0<2> 10492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class T> struct inner 10512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh { 10522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef value<T> type; 10532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh }; 10542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtypedef char (&_avt_r1) [1]; 10572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtypedef char (&_avt_r2) [2]; 10582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> _avt_r1 _avt_f(value<T>); 10602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> _avt_r1 _avt_f(reference_wrapper<T>); 10612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<int I> _avt_r1 _avt_f(arg<I>); 10622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<int I> _avt_r1 _avt_f(arg<I> (*) ()); 10632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L> _avt_r1 _avt_f(bind_t<R, F, L>); 10642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh_avt_r2 _avt_f(...); 10662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class T> struct add_value 10682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh static T t(); 10702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _avt_0<sizeof(_avt_f(t()))>::template inner<T>::type type; 10712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 10742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// list_av_N 10762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1> struct list_av_1 10782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A1>::type B1; 10802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list1<B1> type; 10812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1, class A2> struct list_av_2 10842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A1>::type B1; 10862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A2>::type B2; 10872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list2<B1, B2> type; 10882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1, class A2, class A3> struct list_av_3 10912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 10922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A1>::type B1; 10932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A2>::type B2; 10942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A3>::type B3; 10952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list3<B1, B2, B3> type; 10962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 10972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 10982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1, class A2, class A3, class A4> struct list_av_4 10992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 11002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A1>::type B1; 11012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A2>::type B2; 11022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A3>::type B3; 11032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A4>::type B4; 11042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list4<B1, B2, B3, B4> type; 11052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 11062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 11072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1, class A2, class A3, class A4, class A5> struct list_av_5 11082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 11092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A1>::type B1; 11102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A2>::type B2; 11112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A3>::type B3; 11122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A4>::type B4; 11132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A5>::type B5; 11142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list5<B1, B2, B3, B4, B5> type; 11152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 11162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 11172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1, class A2, class A3, class A4, class A5, class A6> struct list_av_6 11182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 11192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A1>::type B1; 11202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A2>::type B2; 11212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A3>::type B3; 11222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A4>::type B4; 11232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A5>::type B5; 11242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A6>::type B6; 11252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list6<B1, B2, B3, B4, B5, B6> type; 11262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 11272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 11282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct list_av_7 11292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 11302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A1>::type B1; 11312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A2>::type B2; 11322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A3>::type B3; 11332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A4>::type B4; 11342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A5>::type B5; 11352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A6>::type B6; 11362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A7>::type B7; 11372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list7<B1, B2, B3, B4, B5, B6, B7> type; 11382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 11392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 11402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct list_av_8 11412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 11422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A1>::type B1; 11432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A2>::type B2; 11442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A3>::type B3; 11452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A4>::type B4; 11462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A5>::type B5; 11472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A6>::type B6; 11482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A7>::type B7; 11492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A8>::type B8; 11502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list8<B1, B2, B3, B4, B5, B6, B7, B8> type; 11512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 11522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 11532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> struct list_av_9 11542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 11552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A1>::type B1; 11562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A2>::type B2; 11572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A3>::type B3; 11582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A4>::type B4; 11592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A5>::type B5; 11602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A6>::type B6; 11612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A7>::type B7; 11622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A8>::type B8; 11632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A9>::type B9; 11642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list9<B1, B2, B3, B4, B5, B6, B7, B8, B9> type; 11652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 11662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 11672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// operator! 11682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 11692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehstruct logical_not 11702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 11712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V> bool operator()(V const & v) const { return !v; } 11722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 11732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 11742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L> 11752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bind_t< bool, logical_not, list1< bind_t<R, F, L> > > 11762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh operator! (bind_t<R, F, L> const & f) 11772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 11782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list1< bind_t<R, F, L> > list_type; 11792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return bind_t<bool, logical_not, list_type> ( logical_not(), list_type(f) ); 11802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 11812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 11822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// relational operators 11832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 11842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_OPERATOR( op, name ) \ 11852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh\ 11862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehstruct name \ 11872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ \ 11882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh template<class V, class W> bool operator()(V const & v, W const & w) const { return v op w; } \ 11892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; \ 11902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh \ 11912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L, class A2> \ 11922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bind_t< bool, name, list2< bind_t<R, F, L>, typename add_value<A2>::type > > \ 11932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh operator op (bind_t<R, F, L> const & f, A2 a2) \ 11942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ \ 11952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_value<A2>::type B2; \ 11962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list2< bind_t<R, F, L>, B2> list_type; \ 11972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return bind_t<bool, name, list_type> ( name(), list_type(f, a2) ); \ 11982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 11992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( ==, equal ) 12012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( !=, not_equal ) 12022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( <, less ) 12042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( <=, less_equal ) 12052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( >, greater ) 12072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( >=, greater_equal ) 12082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( &&, logical_and ) 12102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( ||, logical_or ) 12112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_OPERATOR 12132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) 12152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// resolve ambiguity with rel_ops 12172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_OPERATOR( op, name ) \ 12192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh\ 12202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class L> \ 12212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh bind_t< bool, name, list2< bind_t<R, F, L>, bind_t<R, F, L> > > \ 12222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh operator op (bind_t<R, F, L> const & f, bind_t<R, F, L> const & g) \ 12232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ \ 12242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef list2< bind_t<R, F, L>, bind_t<R, F, L> > list_type; \ 12252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return bind_t<bool, name, list_type> ( name(), list_type(f, g) ); \ 12262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 12272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( !=, not_equal ) 12292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( <=, less_equal ) 12302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( >, greater ) 12312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND_OPERATOR( >=, greater_equal ) 12322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 12342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// visit_each, ADL 12362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) \ 12382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) 12392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class V, class T> void visit_each( V & v, value<T> const & t, int ) 12412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 12422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh using boost::visit_each; 12432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); 12442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 12452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class V, class R, class F, class L> void visit_each( V & v, bind_t<R, F, L> const & t, int ) 12472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 12482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh t.accept( v ); 12492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 12502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 12522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} // namespace _bi 12542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// visit_each, no ADL 12562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( __BORLANDC__ ) \ 12582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) 12592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class V, class T> void visit_each( V & v, _bi::value<T> const & t, int ) 12612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 12622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); 12632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 12642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class V, class R, class F, class L> void visit_each( V & v, _bi::bind_t<R, F, L> const & t, int ) 12662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 12672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh t.accept( v ); 12682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 12692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 12712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// is_bind_expression 12732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class T > struct is_bind_expression 12752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 12762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh enum _vt { value = 0 }; 12772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 12782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) 12802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class R, class F, class L > struct is_bind_expression< _bi::bind_t< R, F, L > > 12822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 12832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh enum _vt { value = 1 }; 12842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 12852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 12872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// bind 12892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifndef BOOST_BIND 12912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND bind 12922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 12932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// generic function objects 12952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 12962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F> 12972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, _bi::list0> 12982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f) 12992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef _bi::list0 list_type; 13012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type> (f, list_type()); 13022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1> 13052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_1<A1>::type> 13062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1) 13072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_1<A1>::type list_type; 13092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type> (f, list_type(a1)); 13102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2> 13132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_2<A1, A2>::type> 13142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2) 13152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_2<A1, A2>::type list_type; 13172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2)); 13182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3> 13212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_3<A1, A2, A3>::type> 13222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) 13232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_3<A1, A2, A3>::type list_type; 13252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3)); 13262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4> 13292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_4<A1, A2, A3, A4>::type> 13302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) 13312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type; 13332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4)); 13342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4, class A5> 13372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type> 13382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) 13392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type; 13412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); 13422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6> 13452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type> 13462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) 13472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type; 13492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); 13502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7> 13532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type> 13542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) 13552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type; 13572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); 13582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> 13612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type> 13622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) 13632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type; 13652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); 13662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> 13692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type> 13702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) 13712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type; 13732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); 13742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// generic function objects, alternative syntax 13772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F> 13792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, _bi::list0> 13802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(boost::type<R>, F f) 13812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef _bi::list0 list_type; 13832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type> (f, list_type()); 13842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1> 13872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_1<A1>::type> 13882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(boost::type<R>, F f, A1 a1) 13892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_1<A1>::type list_type; 13912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type> (f, list_type(a1)); 13922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 13932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 13942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2> 13952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_2<A1, A2>::type> 13962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2) 13972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 13982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_2<A1, A2>::type list_type; 13992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2)); 14002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3> 14032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_3<A1, A2, A3>::type> 14042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3) 14052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_3<A1, A2, A3>::type list_type; 14072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3)); 14082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4> 14112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_4<A1, A2, A3, A4>::type> 14122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4) 14132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type; 14152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4)); 14162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4, class A5> 14192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type> 14202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) 14212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type; 14232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); 14242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6> 14272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type> 14282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) 14292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type; 14312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); 14322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7> 14352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type> 14362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) 14372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type; 14392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); 14402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> 14432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type> 14442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) 14452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type; 14472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); 14482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> 14512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<R, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type> 14522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) 14532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type; 14552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); 14562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) 14592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// adaptable function objects 14612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F> 14632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<_bi::unspecified, F, _bi::list0> 14642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f) 14652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef _bi::list0 list_type; 14672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type()); 14682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F, class A1> 14712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1<A1>::type> 14722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1) 14732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_1<A1>::type list_type; 14752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1)); 14762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F, class A1, class A2> 14792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2<A1, A2>::type> 14802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2) 14812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_2<A1, A2>::type list_type; 14832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2)); 14842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F, class A1, class A2, class A3> 14872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3<A1, A2, A3>::type> 14882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) 14892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_3<A1, A2, A3>::type list_type; 14912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3)); 14922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 14932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 14942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F, class A1, class A2, class A3, class A4> 14952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4<A1, A2, A3, A4>::type> 14962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) 14972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 14982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type; 14992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4)); 15002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 15012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F, class A1, class A2, class A3, class A4, class A5> 15032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type> 15042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) 15052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 15062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type; 15072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); 15082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 15092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F, class A1, class A2, class A3, class A4, class A5, class A6> 15112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type> 15122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) 15132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 15142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type; 15152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); 15162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 15172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7> 15192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type> 15202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) 15212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 15222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type; 15232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); 15242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 15252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> 15272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type> 15282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) 15292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 15302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type; 15312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); 15322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 15332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> 15352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type> 15362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) 15372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 15382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type; 15392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); 15402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 15412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) 15432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// function pointers 15452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_CC 15472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_ST 15482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_cc.hpp> 15502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_CC 15522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_ST 15532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_BIND_ENABLE_STDCALL 15552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_CC __stdcall 15572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_ST 15582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_cc.hpp> 15602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_CC 15622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_ST 15632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 15652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_BIND_ENABLE_FASTCALL 15672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_CC __fastcall 15692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_ST 15702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_cc.hpp> 15722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_CC 15742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_ST 15752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 15772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_BIND_ENABLE_PASCAL 15792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_ST pascal 15812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_CC 15822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_cc.hpp> 15842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_ST 15862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_CC 15872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 15892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// member function pointers 15912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_MF_NAME(X) X 15932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_MF_CC 15942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_mf_cc.hpp> 15962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_mf2_cc.hpp> 15972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 15982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_MF_NAME 15992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_MF_CC 16002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_MEM_FN_ENABLE_CDECL 16022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_MF_NAME(X) X##_cdecl 16042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_MF_CC __cdecl 16052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_mf_cc.hpp> 16072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_mf2_cc.hpp> 16082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_MF_NAME 16102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_MF_CC 16112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 16132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_MEM_FN_ENABLE_STDCALL 16152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_MF_NAME(X) X##_stdcall 16172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_MF_CC __stdcall 16182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_mf_cc.hpp> 16202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_mf2_cc.hpp> 16212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_MF_NAME 16232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_MF_CC 16242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 16262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_MEM_FN_ENABLE_FASTCALL 16282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_MF_NAME(X) X##_fastcall 16302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_BIND_MF_CC __fastcall 16312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_mf_cc.hpp> 16332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/bind/bind_mf2_cc.hpp> 16342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_MF_NAME 16362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#undef BOOST_BIND_MF_CC 16372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 16392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// data member pointers 16412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ 16432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh || ( defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x620 ) ) ) 16442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R, class T, class A1> 16462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh_bi::bind_t< R, _mfi::dm<R, T>, typename _bi::list_av_1<A1>::type > 16472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh BOOST_BIND(R T::*f, A1 a1) 16482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 16492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef _mfi::dm<R, T> F; 16502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_1<A1>::type list_type; 16512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t<R, F, list_type>( F(f), list_type(a1) ); 16522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 16532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#else 16552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnamespace _bi 16572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 16582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class Pm, int I > struct add_cref; 16602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class M, class T > struct add_cref< M T::*, 0 > 16622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 16632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef M type; 16642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 16652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class M, class T > struct add_cref< M T::*, 1 > 16672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 16682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_MSVC 16692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#pragma warning(push) 16702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#pragma warning(disable:4180) 16712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 16722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef M const & type; 16732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_MSVC 16742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#pragma warning(pop) 16752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 16762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 16772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class R, class T > struct add_cref< R (T::*) (), 1 > 16792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 16802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef void type; 16812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 16822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if !defined(__IBMCPP__) || __IBMCPP_FUNC_CV_TMPL_ARG_DEDUCTION 16842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class R, class T > struct add_cref< R (T::*) () const, 1 > 16862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 16872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef void type; 16882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 16892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif // __IBMCPP__ 16912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R> struct isref 16932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 16942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh enum value_type { value = 0 }; 16952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 16962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 16972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R> struct isref< R& > 16982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 16992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh enum value_type { value = 1 }; 17002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 17012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class R> struct isref< R* > 17032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 17042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh enum value_type { value = 1 }; 17052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 17062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class Pm, class A1> struct dm_result 17082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 17092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_cref< Pm, 1 >::type type; 17102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 17112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<class Pm, class R, class F, class L> struct dm_result< Pm, bind_t<R, F, L> > 17132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 17142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename bind_t<R, F, L>::result_type result_type; 17152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename add_cref< Pm, isref< result_type >::value >::type type; 17162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}; 17172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} // namespace _bi 17192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate< class A1, class M, class T > 17212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh_bi::bind_t< 17232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typename _bi::dm_result< M T::*, A1 >::type, 17242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh _mfi::dm<M, T>, 17252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typename _bi::list_av_1<A1>::type 17262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh> 17272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew HsiehBOOST_BIND( M T::*f, A1 a1 ) 17292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{ 17302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::dm_result< M T::*, A1 >::type result_type; 17312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef _mfi::dm<M, T> F; 17322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh typedef typename _bi::list_av_1<A1>::type list_type; 17332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh return _bi::bind_t< result_type, F, list_type >( F( f ), list_type( a1 ) ); 17342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} 17352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 17372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} // namespace boost 17392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifndef BOOST_BIND_NO_PLACEHOLDERS 17412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# include <boost/bind/placeholders.hpp> 17432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 17452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_MSVC 17472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# pragma warning(default: 4512) // assignment operator could not be generated 17482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh# pragma warning(pop) 17492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif 17502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh 17512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif // #ifndef BOOST_BIND_BIND_HPP_INCLUDED 1752