/*============================================================================== Copyright (c) 2005 Peter Dimov Copyright (c) 2005-2010 Joel de Guzman Copyright (c) 2010 Thomas Heller Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include #if defined( BOOST_MSVC ) #pragma warning(disable: 4786) // identifier truncated in debug info #pragma warning(disable: 4710) // function not inlined #pragma warning(disable: 4711) // function selected for automatic inline expansion #pragma warning(disable: 4514) // unreferenced inline removed #endif #include #include #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) #pragma warning(push, 3) #endif #include #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) #pragma warning(pop) #endif #include // long f( long a, long b, long c, long d, long e, long f, long g, long h, long i ) { return a + 10 * b + 100 * c + 1000 * d + 10000 * e + 100000 * f + 1000000 * g + 10000000 * h + 100000000 * i; } template< int I > struct custom_placeholder : boost::mpl::int_ { }; /* namespace boost { template< int I > struct is_placeholder< custom_placeholder< I > > { enum { value = I }; }; } // namespace boost */ int main() { using boost::phoenix::bind; using boost::phoenix::make_argument; int const x1 = 1; int const x2 = 2; int const x3 = 3; int const x4 = 4; int const x5 = 5; int const x6 = 6; int const x7 = 7; int const x8 = 8; int const x9 = 9; make_argument >::type const p1 = {}; make_argument >::type const p2 = {}; make_argument >::type const p3 = {}; make_argument >::type const p4 = {}; make_argument >::type const p5 = {}; make_argument >::type const p6 = {}; make_argument >::type const p7 = {}; make_argument >::type const p8 = {}; make_argument >::type const p9 = {}; BOOST_TEST( bind( f, p1, p2, p3, p4, p5, p6, p7, p8, p9 ) ( x1, x2, x3, x4, x5, x6, x7, x8, x9 ) == 987654321L ); return boost::report_errors(); }