Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
testTeuchosRCPNodeImplDestructTerminate.cpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Teuchos: Common Tools Package
4 //
5 // Copyright 2004 NTESS and the Teuchos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
11 #include "Teuchos_RCPNode.hpp"
12 
13 int main(int argc, char* argv[])
14 {
15 
16  Teuchos::GlobalMPISession mpiSession(&argc,&argv);
17 
18  {
19  int obj = 1;
20  using Dealloc_T = Teuchos::DeallocDelete<int>;
22  rcpNode(&obj, Dealloc_T(), false);
23  }
24  // When the above destructor executes it should terminate the program with
25  // an error message!
26 
27  return 1; // Will never be called!
28 
29 }
Initialize, finalize, and query the global MPI session.
Policy class for deallocator that uses delete to delete a pointer which is used by RCP...
Templated implementation class of RCPNode that has the responsibility for deleting the reference-coun...
int main(int argc, char *argv[])
A MPI utilities class, providing methods for initializing, finalizing, and querying the global MPI se...
Reference-counted pointer node classes.