Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
util
algorithms
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>
44
#include <
blaze/util/algorithms/DestroyAt.h
>
45
#include <
blaze/util/Types.h
>
46
47
48
namespace
blaze {
49
50
//=================================================================================================
51
//
52
// DESTROY ALGORITHMS
53
//
54
//=================================================================================================
55
56
//*************************************************************************************************
66
template
<
typename
ForwardIt >
67
void
destroy
( ForwardIt first, ForwardIt last )
68
{
69
for
( ; first!=last; ++first ) {
70
blaze::destroy_at
( std::addressof( *first ) );
71
}
72
}
73
//*************************************************************************************************
74
75
76
//*************************************************************************************************
86
template
<
typename
ForwardIt >
87
void
destroy_n
( ForwardIt first,
size_t
n )
88
{
89
for
( ; n > 0UL; (void) ++first, --n ) {
90
blaze::destroy_at
( std::addressof( *first ) );
91
}
92
}
93
//*************************************************************************************************
94
95
}
// namespace blaze
96
97
#endif
DestroyAt.h
Header file for the generic destroy_at algorithm.
blaze::destroy
void destroy(ForwardIt first, ForwardIt last)
Destroys the given range of objects .
Definition
Destroy.h:67
blaze::destroy_n
void destroy_n(ForwardIt first, size_t n)
Destroys the given range of objects .
Definition
Destroy.h:87
blaze::destroy_at
void destroy_at(T *p) noexcept
Destroys the object at the given address.
Definition
DestroyAt.h:57
Types.h
Header file for basic type definitions.
Generated by
1.18.0