| 
                Last change
                  on this file since 30 was
                  29,
                  checked in by landauf, 17 years ago
           | 
        
        
          | 
               
updated boost from 1_33_1 to 1_34_1 
 
           | 
        
        | 
            File size:
            801 bytes
           | 
      
      
        
  | Line |   | 
|---|
| 1 | //  Boost checked_delete test program  ---------------------------------------// | 
|---|
| 2 |  | 
|---|
| 3 | //  Copyright Beman Dawes 2001.  Distributed under the Boost | 
|---|
| 4 | //  Software License, Version 1.0. (See accompanying file | 
|---|
| 5 | //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | 
|---|
| 6 |  | 
|---|
| 7 | //  See http://www.boost.org/libs/utility for documentation. | 
|---|
| 8 |  | 
|---|
| 9 | //  Revision History | 
|---|
| 10 | //  21 May 01  Initial version (Beman Dawes) | 
|---|
| 11 |  | 
|---|
| 12 | #include <boost/checked_delete.hpp>  // for checked_delete | 
|---|
| 13 |  | 
|---|
| 14 | //  This program demonstrates compiler errors when trying to delete an | 
|---|
| 15 | //  incomplete type. | 
|---|
| 16 |  | 
|---|
| 17 | namespace | 
|---|
| 18 | { | 
|---|
| 19 |     class Incomplete; | 
|---|
| 20 | } | 
|---|
| 21 |  | 
|---|
| 22 | int main() | 
|---|
| 23 | { | 
|---|
| 24 |     Incomplete * p = 0; | 
|---|
| 25 |     boost::checked_delete(p);          // should cause compile time error | 
|---|
| 26 |     boost::checked_array_delete(p);    // should cause compile time error | 
|---|
| 27 |     return 0; | 
|---|
| 28 | }   // main | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.