std::ios_base:: imbue
From cppreference.net
C++
Input/output library
| I/O manipulators | ||||
| Print functions (C++23) | ||||
| C-style I/O | ||||
| Buffers | ||||
|
(C++23)
|
||||
|
(
C++98/26*
)
|
||||
|
(C++20)
|
||||
| Streams | ||||
| Abstractions | ||||
| File I/O | ||||
| String I/O | ||||
| Array I/O | ||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(
C++98/26*
)
|
||||
|
(
C++98/26*
)
|
||||
|
(
C++98/26*
)
|
||||
| Synchronized Output | ||||
|
(C++20)
|
||||
| Types | ||||
| Error category interface | ||||
|
(C++11)
|
||||
|
(C++11)
|
std::ios_base
| Member functions | ||||
| Formatting | ||||
| Locales | ||||
|
ios_base::imbue
|
||||
| Internal extensible array | ||||
| Miscellaneous | ||||
| Member classes | ||||
| Member types | ||||
|
std::
locale
imbue
(
const
std::
locale
&
loc
)
;
|
||
将流的关联区域设置设为
loc
。在返回前,每个通过
register_callback()
注册的函数都会以
imbue_event
作为参数被调用。
目录 |
参数
| loc | - | 要与流关联的新区域设置 |
返回值
操作前与流关联的区域设置对象。
示例
|
本节内容不完整
原因:缺少示例 |
缺陷报告
以下行为变更缺陷报告被追溯应用于先前发布的C++标准。
| 缺陷报告 | 适用范围 | 发布时行为 | 正确行为 |
|---|---|---|---|
| LWG 47 | C++98 |
返回值被错误指定为
getloc()
的返回值
|
已修正 |
| LWG 156 | C++98 |
loc
的类型为
const std::locale
|
修正为
const std::locale&
|
参见
|
返回当前区域设置
(公开成员函数) |