mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-10-28 19:04:45 +08:00
- const README: rewrite the space-saving claim per issue #5 follow-ups (constant-expression const vs #define immediates; which const qualify as constant expressions) - const README: fix the class-section diagnosis per issue #338 (overload resolution picks the const overload; the restriction only surfaces once that overload is removed) - sizeof README: virtual-inheritance result is compiler-dependent (GCC merges vbptr+vfptr -> 16, MSVC keeps them separate -> 32) #246 - static README: new section on internal linkage / access restriction with anonymous-namespace comparison #142 - 10-day practice: full problem list table + fixed day links #136 - new design_pattern/singleton/singleton_default.hpp: reusable thread-safe CRTP singleton template, compile+concurrency tested #303
This commit is contained in:
23
tool/output/README.md
Normal file
23
tool/output/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
> 本文档由 [C++那些事网站](https://light-city.github.io/stories_things/cpp-tools/stl-container-output/) 同步生成,网站版本含多语言与更新排版。
|
||||
|
||||
# C++ STL 容器快捷输出
|
||||
|
||||
对吴老师的代码进行了修改,[点击此处直通代码](https://github.com/Light-City/CPlusPlusThings/tree/master/tool/output/output_container.h)
|
||||
|
||||
输入:
|
||||
|
||||
```cpp
|
||||
map<int, int> mp{
|
||||
{1, 1},
|
||||
{2, 4},
|
||||
{3, 9}};
|
||||
cout << mp << endl;
|
||||
```
|
||||
|
||||
输出结果显示:
|
||||
|
||||
```cpp
|
||||
{ 1 => 1, 2 => 4, 3 => 9 }
|
||||
```
|
||||
|
||||
####
|
||||
Reference in New Issue
Block a user