std::match_results<BidirIt,Alloc>::match_results
来自cppreference.com
< cpp | regex | match results
match_results()
:
match_results(Allocator())
{}
|
(1) | (C++11 起) |
explicit
match_results(
const
Allocator&
a );
|
(2) | (C++11 起) |
match_results(
const
match_results&
rhs );
|
(3) | (C++11 起) |
match_results(
const
match_results&
rhs, const
Allocator&
a );
|
(4) | (C++11 起) |
match_results(
match_results&&
rhs )
noexcept;
|
(5) | (C++11 起) |
match_results(
match_results&&
rhs, const
Allocator&
a );
|
(6) | (C++11 起) |
1) 默认构造函数。构造未建立结果状态(ready()
!=
true)的匹配结果。
2) 以 a
的副本作为分配器构造未建立结果状态(ready()
!=
true)的匹配结果。
3) 复制构造函数。以 rhs
的副本构造匹配结果。
4) 将 a
的副本作为分配器,以 rhs
的副本构造匹配结果。
5) 移动构造函数。用移动语义构造拥有 rhs
内容的匹配结果。调用后,rhs
在合法但未指定的状态。
6) 将 a
的副本作为分配器,用移动语义构造拥有 rhs
内容的匹配结果。调用后,rhs
在合法但未指定的状态。
参数
a | - | 用于此容器所有内存分配的分配器 |
rhs | - | 用作源以初始化 match_results 的另一
match_results
|
异常
1-4) 可能会抛出由实现定义的异常。
6) 在 a == rhs.get_allocator() 是 true 时不会抛出异常。
示例
本节未完成 原因:暂无示例 |
缺陷报告
下列更改行为的缺陷报告追溯地应用于以前出版的 C++ 标准。
缺陷报告 | 应用于 | 出版时的行为 | 正确行为 |
---|---|---|---|
LWG 2195 | C++11 | 缺失了知分配器容器 (AllocatorAwareContainer) 要求的构造函数 | 已补充 |
P0935R0 | C++11 | 默认构造函数是显式的 | 改成隐式的 |