Skip to content

Commit 62352b3

Browse files
committed
namespace stdの削除、表記の変更
#1470
1 parent be4f0eb commit 62352b3

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

reference/cstdlib/mb_cur_max.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
* macro[meta id-type]
44

55
```cpp
6-
namespace std {
7-
#define MB_CUR_MAX /* implementation defined */
8-
}
6+
#define MB_CUR_MAX implementation-defined
97
```
108
119
## 概要
@@ -28,12 +26,12 @@ int main() {
2826
//C ロケール(標準ASCII)
2927
std::cout << "Locale: standard, MB_CUR_MAX: " << MB_CUR_MAX << std::endl;
3028
29+
//ロケールを日本(UTF-8)に変更
3130
if (std::setlocale(LC_CTYPE, "ja_JP.UTF-8") == nullptr) {
32-
std::cout << "Failed to set locale to: ja_JP.UTF-8" << std::endl;
31+
std::cout << "Failed to set locale to: ja_JP.UTF-8" << std::endl;
32+
} else {
33+
std::cout << "Locale: ja_JP.UTF-8, MB_CUR_MAX: " << MB_CUR_MAX << std::endl;
3334
}
34-
std::setlocale(LC_CTYPE, "ja_JP.UTF-8");//ロケールを日本語UTF-8に変更
35-
std::cout << "Locale: ja_JP.UTF-8, MB_CUR_MAX: " << MB_CUR_MAX << std::endl;
36-
return 0;
3735
}
3836
```
3937

0 commit comments

Comments
 (0)