checked_delete.hpp
Go to the documentation of this file.
1 #include "sick_scan/sick_scan_base.h" /* Base definitions included in all header files, added by add_sick_scan_base_header.py. Do not edit this line. */
2 #ifndef BOOST_CORE_CHECKED_DELETE_HPP
3 #define BOOST_CORE_CHECKED_DELETE_HPP
4 
5 // MS compatible compilers support #pragma once
6 
7 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
8 # pragma once
9 #endif
10 
11 //
12 //
13 // Copyright (c) 2002, 2003 Peter Dimov
14 // Copyright (c) 2003 Daniel Frey
15 // Copyright (c) 2003 Howard Hinnant
16 //
17 // Distributed under the Boost Software License, Version 1.0. (See
18 // accompanying file LICENSE_1_0.txt or copy at
19 // http://www.boost.org/LICENSE_1_0.txt)
20 //
21 // See http://www.boost.org/libs/core/doc/html/core/checked_delete.html for documentation.
22 //
23 
24 namespace boost
25 {
26 
27 // verify that types are complete for increased safety
28 
29 template<class T> inline void checked_delete(T * x)
30 {
31  // intentionally complex - simplification causes regressions
32  typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
33  (void) sizeof(type_must_be_complete);
34  delete x;
35 }
36 
37 template<class T> inline void checked_array_delete(T * x)
38 {
39  typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
40  (void) sizeof(type_must_be_complete);
41  delete [] x;
42 }
43 
44 template<class T> struct checked_deleter
45 {
46  typedef void result_type;
47  typedef T * argument_type;
48 
49  void operator()(T * x) const
50  {
51  // boost:: disables ADL
53  }
54 };
55 
56 template<class T> struct checked_array_deleter
57 {
58  typedef void result_type;
59  typedef T * argument_type;
60 
61  void operator()(T * x) const
62  {
64  }
65 };
66 
67 } // namespace boost
68 
69 #endif // #ifndef BOOST_CORE_CHECKED_DELETE_HPP
boost::checked_deleter::result_type
void result_type
Definition: checked_delete.hpp:46
boost::checked_array_deleter::argument_type
T * argument_type
Definition: checked_delete.hpp:59
boost
boost::checked_array_delete
void checked_array_delete(T *x)
Definition: checked_delete.hpp:37
boost::checked_deleter::argument_type
T * argument_type
Definition: checked_delete.hpp:47
boost::checked_array_deleter::result_type
void result_type
Definition: checked_delete.hpp:58
boost::checked_deleter::operator()
void operator()(T *x) const
Definition: checked_delete.hpp:49
boost::checked_deleter
Definition: checked_delete.hpp:44
boost::checked_array_deleter::operator()
void operator()(T *x) const
Definition: checked_delete.hpp:61
boost::checked_array_deleter
Definition: checked_delete.hpp:56
boost::checked_delete
void checked_delete(T *x)
Definition: checked_delete.hpp:29
sick_scan_base.h


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:07