1 #include <boost/config.hpp>
2 
3 #if defined(BOOST_MSVC)
4 #pragma warning(disable: 4786)  // identifier truncated in debug info
5 #pragma warning(disable: 4710)  // function not inlined
6 #pragma warning(disable: 4711)  // function selected for automatic inline expansion
7 #pragma warning(disable: 4514)  // unreferenced inline removed
8 #endif
9 
10 //
11 //  shared_ptr_pv_fail.cpp - a negative test for converting a shared_ptr to void*
12 //
13 //  Copyright 2007 Peter Dimov
14 //
15 //  Distributed under the Boost Software License, Version 1.0.
16 //  See accompanying file LICENSE_1_0.txt or copy at
17 //  http://www.boost.org/LICENSE_1_0.txt
18 //
19 
20 #include <boost/shared_ptr.hpp>
21 
f(void *)22 void f( void* )
23 {
24 }
25 
main()26 int main()
27 {
28     boost::shared_ptr<int> p;
29     f( p ); // must fail
30     return 0;
31 }
32