YSTest: ystdex::allocator_guard_delete< _tAlloc > 模板类 参考

YSTest PreAlpha_b900_20201012 The YSLib Test Project

Public 类型 | Public 成员函数 | Private 类型 | Private 属性 | 所有成员列表
ystdex::allocator_guard_delete< _tAlloc > 模板类 参考

释放分配器分配的存储资源的删除器。 更多...

`#include <allocator.hpp>`

类 ystdex::allocator_guard_delete< _tAlloc > 继承关系图:
[图例]
ystdex::allocator_guard_delete< _tAlloc > 的协作图:
[图例]

## Public 类型

using | pointer = typename ator_traits::pointer
using | size_type = typename ator_traits::size_type

## Public 成员函数

| allocator_guard_delete (_tAlloc a, size_type n=1)
| allocator_guard_delete (const allocator_guard_delete &)=default
| allocator_guard_delete (allocator_guard_delete &&)=default
allocator_guard_delete & | operator= (const allocator_guard_delete &)=default
allocator_guard_delete & | operator= (allocator_guard_delete &&)=default
void | operator() (pointer p) const
size_type | get_count () const
_tAlloc & | get_allocator () const

## Private 类型

using | base = details::allocator_delete_base< _tAlloc >
using | ator_traits = allocator_traits< remove_cvref_t< _tAlloc > >
Private 类型 继承自 ystdex::details::allocator_delete_base< _tAlloc >
using | ator_traits = allocator_traits< remove_cvref_t< _tAlloc > >
using | stored_ator_t = cond_t< is_lvalue_reference< _tAlloc >, lref< _tAlloc >, _tAlloc >

## Private 属性

size_type | count
Private 属性 继承自 ystdex::details::allocator_delete_base< _tAlloc >
stored_ator_t | alloc

## 额外继承的成员函数

Private 成员函数 继承自 ystdex::details::allocator_delete_base< _tAlloc >
template<class _tParam , typename = exclude_self_t<allocator_delete_base, _tParam>>
| allocator_delete_base (_tParam &&a)
| allocator_delete_base (const allocator_delete_base &)=default
| allocator_delete_base (allocator_delete_base &&)=default
allocator_delete_base & | operator= (const allocator_delete_base &)=default
allocator_delete_base & | operator= (allocator_delete_base &&)=default
_tAlloc & | get_allocator () const

## 详细描述

### template<class _tAlloc>
class ystdex::allocator_guard_delete< _tAlloc >

释放分配器分配的存储资源的删除器。

注解
  模板参数可能是引用。

参见
  $2018-12 @ Documentation::Workflow.

自从
  build 846

在文件 allocator.hpp 第 766 行定义.

## 成员类型定义说明

## ◆ ator_traits

template<class _tAlloc >

using ystdex::details::allocator_delete_base< _tAlloc >::ator_traits = allocator_traits<remove_cvref_t<_tAlloc> >

private

在文件 allocator.hpp 第 681 行定义.

## ◆ base

template<class _tAlloc >

using ystdex::allocator_guard_delete< _tAlloc >::base = details::allocator_delete_base<_tAlloc>

private

自从
  build 846

在文件 allocator.hpp 第 770 行定义.

## ◆ pointer

template<class _tAlloc >

using ystdex::allocator_guard_delete< _tAlloc >::pointer = typename ator_traits::pointer

自从
  build 595

在文件 allocator.hpp 第 776 行定义.

## ◆ size_type

template<class _tAlloc >

using ystdex::allocator_guard_delete< _tAlloc >::size_type = typename ator_traits::size_type

自从
  build 595

在文件 allocator.hpp 第 778 行定义.

## 构造及析构函数说明

## ◆ allocator_guard_delete() [1/3]

template<class _tAlloc >

ystdex::allocator_guard_delete< _tAlloc >::allocator_guard_delete | ( | _tAlloc | a,
|  | size_type | n = `1`
| ) |  |

inline

自从
  build 843

在文件 allocator.hpp 第 786 行定义.

## ◆ allocator_guard_delete() [2/3]

template<class _tAlloc >

ystdex::allocator_guard_delete< _tAlloc >::allocator_guard_delete | ( | const allocator_guard_delete< _tAlloc > & |  | ) |

default

## ◆ allocator_guard_delete() [3/3]

template<class _tAlloc >

ystdex::allocator_guard_delete< _tAlloc >::allocator_guard_delete | ( | allocator_guard_delete< _tAlloc > && |  | ) |

default

## 成员函数说明

## ◆ get_allocator()

template<class _tAlloc >

_tAlloc& ystdex::details::allocator_delete_base< _tAlloc >::get_allocator

inline

自从
  build 846

在文件 allocator.hpp 第 703 行定义.

## ◆ get_count()

template<class _tAlloc >

size_type ystdex::allocator_guard_delete< _tAlloc >::get_count | ( |  | ) | const

inline

自从
  build 887

在文件 allocator.hpp 第 809 行定义.

## ◆ operator()()

template<class _tAlloc >

void ystdex::allocator_guard_delete< _tAlloc >::operator() | ( | pointer | p | ) | const

inline

自从
  build 595

在文件 allocator.hpp 第 799 行定义.

引用了 alloc , 以及 platform::p.

## ◆ operator=() [1/2]

template<class _tAlloc >

allocator_guard_delete& ystdex::allocator_guard_delete< _tAlloc >::operator= | ( | allocator_guard_delete< _tAlloc > && |  | ) |

default

## ◆ operator=() [2/2]

template<class _tAlloc >

allocator_guard_delete& ystdex::allocator_guard_delete< _tAlloc >::operator= | ( | const allocator_guard_delete< _tAlloc > & |  | ) |

default

## 类成员变量说明

## ◆ count

template<class _tAlloc >

size_type ystdex::allocator_guard_delete< _tAlloc >::count

private

自从
  build 843

在文件 allocator.hpp 第 782 行定义.

该类的文档由以下文件生成:

- allocator.hpp