Blaze  3.6
Destroy.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_ALGORITHMS_DESTROY_H_
36 #define _BLAZE_UTIL_ALGORITHMS_DESTROY_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <memory>
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // DESTROY ALGORITHM
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
65 template< typename ForwardIt >
66 void destroy( ForwardIt first, ForwardIt last )
67 {
68  for( ; first!=last; ++first ) {
69  blaze::destroy_at( std::addressof( *first ) );
70  }
71 }
72 //*************************************************************************************************
73 
74 } // namespace blaze
75 
76 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Headerfile for the generic destroy_at algorithm.
void destroy(ForwardIt first, ForwardIt last)
Destroys the given range of objects .
Definition: Destroy.h:66
void destroy_at(T *p) noexcept
Destroys the object at the given address.
Definition: DestroyAt.h:57