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

Modified Files:
        Jamfile Jamfile.v2 
Added Files:
        shared_ptr_pv_fail.cpp 
Log Message:
Negative test for conversion to void*

--- NEW FILE: shared_ptr_pv_fail.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

//
//  shared_ptr_pv_fail.cpp - a negative test for converting a shared_ptr to 
void*
//
//  Copyright 2007 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/shared_ptr.hpp>

void f( void* )
{
}

int main()
{
    boost::shared_ptr<int> p;
    f( p ); // must fail
    return 0;
}

Index: Jamfile
===================================================================
RCS file: /cvsroot/boost/boost/libs/smart_ptr/test/Jamfile,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Jamfile     28 Apr 2007 15:49:13 -0000      1.16
+++ Jamfile     23 May 2007 23:22:44 -0000      1.17
@@ -36,6 +36,7 @@
           [ run shared_ptr_alias_test.cpp ]
           [ run shared_ptr_rv_test.cpp ]
           [ run shared_ptr_move_test.cpp ]
+          [ compile-fail shared_ptr_pv_fail.cpp ]
         ;
     
     # this one is too slow to run unless explicitly requested, and ALL

Index: Jamfile.v2
===================================================================
RCS file: /cvsroot/boost/boost/libs/smart_ptr/test/Jamfile.v2,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- Jamfile.v2  28 Apr 2007 15:49:13 -0000      1.12
+++ Jamfile.v2  23 May 2007 23:22:45 -0000      1.13
@@ -31,5 +31,6 @@
           [ run shared_ptr_alias_test.cpp ]
           [ run shared_ptr_rv_test.cpp ]
           [ run shared_ptr_move_test.cpp ]
+          [ compile-fail shared_ptr_pv_fail.cpp ]
         ;
 }


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to