sl@0: #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED sl@0: #define BOOST_BIND_STORAGE_HPP_INCLUDED sl@0: sl@0: // MS compatible compilers support #pragma once sl@0: sl@0: #if defined(_MSC_VER) && (_MSC_VER >= 1020) sl@0: # pragma once sl@0: #endif sl@0: sl@0: // sl@0: // bind/storage.hpp sl@0: // sl@0: // boost/bind.hpp support header, optimized storage sl@0: // sl@0: // Copyright (c) 2006 Peter Dimov sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. sl@0: // See accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt sl@0: // sl@0: // See http://www.boost.org/libs/bind/bind.html for documentation. sl@0: // sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #ifdef BOOST_MSVC sl@0: # pragma warning(push) sl@0: # pragma warning(disable: 4512) // assignment operator could not be generated sl@0: #endif sl@0: sl@0: namespace boost sl@0: { sl@0: sl@0: namespace _bi sl@0: { sl@0: sl@0: // 1 sl@0: sl@0: template struct storage1 sl@0: { sl@0: explicit storage1( A1 a1 ): a1_( a1 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: BOOST_BIND_VISIT_EACH(v, a1_, 0); sl@0: } sl@0: sl@0: A1 a1_; sl@0: }; sl@0: sl@0: #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( __BORLANDC__ ) sl@0: sl@0: template struct storage1< boost::arg > sl@0: { sl@0: explicit storage1( boost::arg ) {} sl@0: sl@0: template void accept(V &) const { } sl@0: sl@0: static boost::arg a1_() { return boost::arg(); } sl@0: }; sl@0: sl@0: template struct storage1< boost::arg (*) () > sl@0: { sl@0: explicit storage1( boost::arg (*) () ) {} sl@0: sl@0: template void accept(V &) const { } sl@0: sl@0: static boost::arg a1_() { return boost::arg(); } sl@0: }; sl@0: sl@0: #endif sl@0: sl@0: // 2 sl@0: sl@0: template struct storage2: public storage1 sl@0: { sl@0: typedef storage1 inherited; sl@0: sl@0: storage2( A1 a1, A2 a2 ): storage1( a1 ), a2_( a2 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: BOOST_BIND_VISIT_EACH(v, a2_, 0); sl@0: } sl@0: sl@0: A2 a2_; sl@0: }; sl@0: sl@0: #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) sl@0: sl@0: template struct storage2< A1, boost::arg >: public storage1 sl@0: { sl@0: typedef storage1 inherited; sl@0: sl@0: storage2( A1 a1, boost::arg ): storage1( a1 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a2_() { return boost::arg(); } sl@0: }; sl@0: sl@0: template struct storage2< A1, boost::arg (*) () >: public storage1 sl@0: { sl@0: typedef storage1 inherited; sl@0: sl@0: storage2( A1 a1, boost::arg (*) () ): storage1( a1 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a2_() { return boost::arg(); } sl@0: }; sl@0: sl@0: #endif sl@0: sl@0: // 3 sl@0: sl@0: template struct storage3: public storage2< A1, A2 > sl@0: { sl@0: typedef storage2 inherited; sl@0: sl@0: storage3( A1 a1, A2 a2, A3 a3 ): storage2( a1, a2 ), a3_( a3 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: BOOST_BIND_VISIT_EACH(v, a3_, 0); sl@0: } sl@0: sl@0: A3 a3_; sl@0: }; sl@0: sl@0: #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) sl@0: sl@0: template struct storage3< A1, A2, boost::arg >: public storage2< A1, A2 > sl@0: { sl@0: typedef storage2 inherited; sl@0: sl@0: storage3( A1 a1, A2 a2, boost::arg ): storage2( a1, a2 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a3_() { return boost::arg(); } sl@0: }; sl@0: sl@0: template struct storage3< A1, A2, boost::arg (*) () >: public storage2< A1, A2 > sl@0: { sl@0: typedef storage2 inherited; sl@0: sl@0: storage3( A1 a1, A2 a2, boost::arg (*) () ): storage2( a1, a2 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a3_() { return boost::arg(); } sl@0: }; sl@0: sl@0: #endif sl@0: sl@0: // 4 sl@0: sl@0: template struct storage4: public storage3< A1, A2, A3 > sl@0: { sl@0: typedef storage3 inherited; sl@0: sl@0: storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3( a1, a2, a3 ), a4_( a4 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: BOOST_BIND_VISIT_EACH(v, a4_, 0); sl@0: } sl@0: sl@0: A4 a4_; sl@0: }; sl@0: sl@0: #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) sl@0: sl@0: template struct storage4< A1, A2, A3, boost::arg >: public storage3< A1, A2, A3 > sl@0: { sl@0: typedef storage3 inherited; sl@0: sl@0: storage4( A1 a1, A2 a2, A3 a3, boost::arg ): storage3( a1, a2, a3 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a4_() { return boost::arg(); } sl@0: }; sl@0: sl@0: template struct storage4< A1, A2, A3, boost::arg (*) () >: public storage3< A1, A2, A3 > sl@0: { sl@0: typedef storage3 inherited; sl@0: sl@0: storage4( A1 a1, A2 a2, A3 a3, boost::arg (*) () ): storage3( a1, a2, a3 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a4_() { return boost::arg(); } sl@0: }; sl@0: sl@0: #endif sl@0: sl@0: // 5 sl@0: sl@0: template struct storage5: public storage4< A1, A2, A3, A4 > sl@0: { sl@0: typedef storage4 inherited; sl@0: sl@0: storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4( a1, a2, a3, a4 ), a5_( a5 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: BOOST_BIND_VISIT_EACH(v, a5_, 0); sl@0: } sl@0: sl@0: A5 a5_; sl@0: }; sl@0: sl@0: #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) sl@0: sl@0: template struct storage5< A1, A2, A3, A4, boost::arg >: public storage4< A1, A2, A3, A4 > sl@0: { sl@0: typedef storage4 inherited; sl@0: sl@0: storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg ): storage4( a1, a2, a3, a4 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a5_() { return boost::arg(); } sl@0: }; sl@0: sl@0: template struct storage5< A1, A2, A3, A4, boost::arg (*) () >: public storage4< A1, A2, A3, A4 > sl@0: { sl@0: typedef storage4 inherited; sl@0: sl@0: storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg (*) () ): storage4( a1, a2, a3, a4 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a5_() { return boost::arg(); } sl@0: }; sl@0: sl@0: #endif sl@0: sl@0: // 6 sl@0: sl@0: template struct storage6: public storage5< A1, A2, A3, A4, A5 > sl@0: { sl@0: typedef storage5 inherited; sl@0: sl@0: storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5( a1, a2, a3, a4, a5 ), a6_( a6 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: BOOST_BIND_VISIT_EACH(v, a6_, 0); sl@0: } sl@0: sl@0: A6 a6_; sl@0: }; sl@0: sl@0: #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) sl@0: sl@0: template struct storage6< A1, A2, A3, A4, A5, boost::arg >: public storage5< A1, A2, A3, A4, A5 > sl@0: { sl@0: typedef storage5 inherited; sl@0: sl@0: storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg ): storage5( a1, a2, a3, a4, a5 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a6_() { return boost::arg(); } sl@0: }; sl@0: sl@0: template struct storage6< A1, A2, A3, A4, A5, boost::arg (*) () >: public storage5< A1, A2, A3, A4, A5 > sl@0: { sl@0: typedef storage5 inherited; sl@0: sl@0: storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg (*) () ): storage5( a1, a2, a3, a4, a5 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a6_() { return boost::arg(); } sl@0: }; sl@0: sl@0: #endif sl@0: sl@0: // 7 sl@0: sl@0: template struct storage7: public storage6< A1, A2, A3, A4, A5, A6 > sl@0: { sl@0: typedef storage6 inherited; sl@0: sl@0: storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: BOOST_BIND_VISIT_EACH(v, a7_, 0); sl@0: } sl@0: sl@0: A7 a7_; sl@0: }; sl@0: sl@0: #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) sl@0: sl@0: template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg >: public storage6< A1, A2, A3, A4, A5, A6 > sl@0: { sl@0: typedef storage6 inherited; sl@0: sl@0: storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg ): storage6( a1, a2, a3, a4, a5, a6 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a7_() { return boost::arg(); } sl@0: }; sl@0: sl@0: template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg (*) () >: public storage6< A1, A2, A3, A4, A5, A6 > sl@0: { sl@0: typedef storage6 inherited; sl@0: sl@0: storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg (*) () ): storage6( a1, a2, a3, a4, a5, a6 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a7_() { return boost::arg(); } sl@0: }; sl@0: sl@0: #endif sl@0: sl@0: // 8 sl@0: sl@0: template struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 > sl@0: { sl@0: typedef storage7 inherited; sl@0: sl@0: storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: BOOST_BIND_VISIT_EACH(v, a8_, 0); sl@0: } sl@0: sl@0: A8 a8_; sl@0: }; sl@0: sl@0: #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) sl@0: sl@0: template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg >: public storage7< A1, A2, A3, A4, A5, A6, A7 > sl@0: { sl@0: typedef storage7 inherited; sl@0: sl@0: storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a8_() { return boost::arg(); } sl@0: }; sl@0: sl@0: template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 > sl@0: { sl@0: typedef storage7 inherited; sl@0: sl@0: storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg (*) () ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a8_() { return boost::arg(); } sl@0: }; sl@0: sl@0: #endif sl@0: sl@0: // 9 sl@0: sl@0: template struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > sl@0: { sl@0: typedef storage8 inherited; sl@0: sl@0: storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: BOOST_BIND_VISIT_EACH(v, a9_, 0); sl@0: } sl@0: sl@0: A9 a9_; sl@0: }; sl@0: sl@0: #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) sl@0: sl@0: template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > sl@0: { sl@0: typedef storage8 inherited; sl@0: sl@0: storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a9_() { return boost::arg(); } sl@0: }; sl@0: sl@0: template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > sl@0: { sl@0: typedef storage8 inherited; sl@0: sl@0: storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg (*) () ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} sl@0: sl@0: template void accept(V & v) const sl@0: { sl@0: inherited::accept(v); sl@0: } sl@0: sl@0: static boost::arg a9_() { return boost::arg(); } sl@0: }; sl@0: sl@0: #endif sl@0: sl@0: } // namespace _bi sl@0: sl@0: } // namespace boost sl@0: sl@0: #ifdef BOOST_MSVC sl@0: # pragma warning(default: 4512) // assignment operator could not be generated sl@0: # pragma warning(pop) sl@0: #endif sl@0: sl@0: #endif // #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED