From 2482a0c843cae41eff92319c1b6c3122cdefdbec Mon Sep 17 00:00:00 2001 From: lmj01 Date: Wed, 22 May 2024 17:35:39 +0800 Subject: [PATCH] update --- articles/demo.md | 7 ++++++- cpl/cplusplus.md | 12 +++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/articles/demo.md b/articles/demo.md index 26f60b0..171256b 100644 --- a/articles/demo.md +++ b/articles/demo.md @@ -8,6 +8,7 @@ function func(a, b) { } ``` +[What's In A Class?] [1] ## [alert](https://github.com/bent10/marked-extensions/tree/main/packages/alert) - [Enables GFM alerts](https://github.com/orgs/community/discussions/16925) @@ -233,4 +234,8 @@ $$ - [marked github](https://github.com/markedjs/marked) - [demo可下载发布后的文件](https://marked.js.org/demo/) -- [marked插件 github](https://github.com/bent10/marked-extensions) \ No newline at end of file +- [marked插件 github](https://github.com/bent10/marked-extensions) + + 公共引用区域, 如果:只有右边一个空格,可以隐藏,两边都有空格,显示,但是引用就不调整。 + +[1]: (What's In A Class?) \ No newline at end of file diff --git a/cpl/cplusplus.md b/cpl/cplusplus.md index dd8e7be..598aa41 100644 --- a/cpl/cplusplus.md +++ b/cpl/cplusplus.md @@ -3,7 +3,6 @@ - [C++ Core Guidelines](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines) - [The C++ Core Guidelines are a collaborative effort led by Bjarne Stroustrup, much like the C++ language itself. They are the result of many person-years of discussion and design across a number of organizations.](https://github.com/isocpp/CppCoreGuidelines) - [The Guidelines Support Library (GSL) contains functions and types that are suggested for use by the C++ Core Guidelines maintained by the Standard C++ Foundation. This repo contains Microsoft's implementation of GSL.](https://github.com/Microsoft/GSL) -- [What's In a Class? - The Interface Principle, This article appeared in C++ Report, 10(3), March 1998.](http://www.gotw.ca/publications/mill02.htm) ## 语言特性 @@ -90,6 +89,14 @@ public: }; ``` +### [ADL](https://en.cppreference.com/w/cpp/language/adl) +Argument-dependent lookup, 在[What's In A Class?][1] 中第一次看到Koenig lookup +就是关于class的定义,减少显式的说明调用函数与其他的关系 +```cpp +std::cout << 1; // 等价于 +operator<< (std::cout, 1) // 当初函数调用,传入参数 +``` + ## TMP(template metaprogramming) 可参考的内容 @@ -287,6 +294,7 @@ base + sizeof * 偏移量,数组指针好像就是这样的,用*(a+b)访 - [反射库refl-cpp is a header-only library which provides compile-time reflection and introspection capabilities to C++](https://github.com/veselink1/refl-cpp) - [Google 开源了其内部多年使用的 C++ 代码库](https://github.com/abseil/abseil-cpp) - [folly库 An open-source C++ library developed and used at Facebook. ](https://github.com/facebook/folly) +- [What's In a Class? - The Interface Principle, This article appeared in C++ Report, 10(3), March 1998.](http://www.gotw.ca/publications/mill02.htm) ### 工具 @@ -298,6 +306,8 @@ base + sizeof * 偏移量,数组指针好像就是这样的,用*(a+b)访 - [offsetof](/cpl/cpp/offsetof.cpp) - [reference](/cpl/cpp/reference.cpp) +[1]: (What's In A Class?) + ## 观点 ### 里缪