Update of /cvsroot/boost/boost/libs/bind/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7204/libs/bind/test

Modified Files:
        Jamfile Jamfile.v2 
Added Files:
        bind_rvalue_test.cpp 
Log Message:
Rvalue overloads (suggested by Herve Bronnimann)

--- NEW FILE: bind_rvalue_test.cpp ---
#include <boost/config.hpp>

#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

//  bind_rvalue_test.cpp
//
//  Copyright (c) 2006 Peter Dimov
//
// 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 <boost/bind.hpp>

#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)
#endif

#include <iostream>

#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(pop)
#endif

#include <boost/detail/lightweight_test.hpp>

//

int f( int x )
{
    return x;
}

int main()
{
    BOOST_TEST( 
        boost::bind( f, _1 )
        ( 1 ) == 1 );

    BOOST_TEST( 
        boost::bind( f, _2 )
        ( 1, 2 ) == 2 );

    BOOST_TEST( 
        boost::bind( f, _3 )
        ( 1, 2, 3 ) == 3 );

    BOOST_TEST( 
        boost::bind( f, _4 )
        ( 1, 2, 3, 4 ) == 4 );

    BOOST_TEST( 
        boost::bind( f, _5 )
        ( 1, 2, 3, 4, 5 ) == 5 );

    BOOST_TEST( 
        boost::bind( f, _6 )
        ( 1, 2, 3, 4, 5, 6 ) == 6 );

    BOOST_TEST( 
        boost::bind( f, _7 )
        ( 1, 2, 3, 4, 5, 6, 7 ) == 7 );

    BOOST_TEST( 
        boost::bind( f, _8 )
        ( 1, 2, 3, 4, 5, 6, 7, 8 ) == 8 );

    BOOST_TEST( 
        boost::bind( f, _9 )
        ( 1, 2, 3, 4, 5, 6, 7, 8, 9 ) == 9 );

    return boost::report_errors();
}

Index: Jamfile
===================================================================
RCS file: /cvsroot/boost/boost/libs/bind/test/Jamfile,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- Jamfile     6 Jul 2006 13:47:26 -0000       1.19
+++ Jamfile     16 Oct 2006 19:11:29 -0000      1.20
@@ -33,6 +33,7 @@
           [ run bind_dm3_test.cpp ]
           [ run bind_visit_test.cpp ]
           [ run bind_placeholder_test.cpp ]
+          [ run bind_rvalue_test.cpp ]
           [ run mem_fn_test.cpp ]
           [ run mem_fn_void_test.cpp ]
           [ run mem_fn_derived_test.cpp ]

Index: Jamfile.v2
===================================================================
RCS file: /cvsroot/boost/boost/libs/bind/test/Jamfile.v2,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- Jamfile.v2  6 Jul 2006 13:47:26 -0000       1.17
+++ Jamfile.v2  16 Oct 2006 19:11:29 -0000      1.18
@@ -27,6 +27,7 @@
       [ run bind_dm3_test.cpp ]
       [ run bind_visit_test.cpp ]
       [ run bind_placeholder_test.cpp ]
+      [ run bind_rvalue_test.cpp ]
       [ run mem_fn_test.cpp ]
       [ run mem_fn_void_test.cpp ]
       [ run mem_fn_derived_test.cpp ]


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to