Skip to content

Commit 4411001

Browse files
committed
* build: 最低编译器 g++-10 和 clang++-16 使用各自的支持的 C++ 最高标准.
1 parent 80877e5 commit 4411001

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: ReadMe.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
一个简单的示例, 在 reader 进程中执行 writer 进程里的函数
44
(该示例未必能成功执行, 因为可能运行于容器 (参见 docker `--tmpfs` 参数) 等权限受限的环境中):
55

6-
<https://github.com/shynur/ipcator/blob/717fe3cd3a39519d66e59dcf97bcbd04c0893fcc/src/ipc-writer.cpp#L1-L21>
7-
<https://github.com/shynur/ipcator/blob/717fe3cd3a39519d66e59dcf97bcbd04c0893fcc/src/ipc-reader.cpp#L1-L13>
6+
<https://github.com/shynur/ipcator/blob/80877e5861182402f079f15210fd6115d0150ba1/src/ipc-writer.cpp#L1-L21>
7+
<https://github.com/shynur/ipcator/blob/80877e5861182402f079f15210fd6115d0150ba1/src/ipc-reader.cpp#L1-L13>
88

99
你可自己手动编译执行; 也可根据 [测试双进程间的通信](#测试双进程间的通信) 的提示,
1010
将以上两段代码分别填到 [`src`](./src/) 目录下的 `ipc-*.cpp` 文件中,
11-
再在仓库目录用 `NDEBUG=1 CXX=g++-10 ISOCPP=20 make ipc` (自己调整 `CXX``ISOCPP`) 自动执行.
11+
再在仓库目录用 `NDEBUG=1 CXX=g++-10 ISOCPP=2a make ipc` (自己调整 `CXX``ISOCPP`) 自动执行.
1212

1313
## 功能
1414

@@ -47,7 +47,7 @@ IPCator 抗拒使用第三方库,
4747

4848
#### `<format>` ➡️ `fmt/format.h`
4949

50-
C++20 开始提供 `<format>`, 但 `g++-10 -std=c++20` 实际只支持部分新特性.
50+
C++20 开始提供 `<format>`, 但 `g++-10 -std=c++2a` 实际只支持部分新特性.
5151

5252
通过执行 `make print-vars | grep LIBS -` 查看 `LIBS` 变量中是否包含 `fmt`.
5353
如果**, 说明本地缺少 `<format>` 库, 需要额外执行:
@@ -89,7 +89,7 @@ NDEBUG=1 make ipc
8989

9090
```bash
9191
export CXX=clang++-20 # 替换编译器为 LLVM Clang
92-
export ISOCPP=20 # 使用 C++20
92+
export ISOCPP=2a # 使用 C++2a
9393
export NDEBUG=1 # 如果不使用 GCC, 那么这一步是必须的!
9494
# 这 ^^^^^^^^^^^ 会排除许多独属 GCC 而 Clang 无法识别的 debug 选项.
9595
make clean # 删除用原来的编译器生成的链接库 e.g. `libfmt`.

Diff for: include/ipcator.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ struct ShM_Reader {
16311631
16321632
/**
16331633
* @brief 保留任何被由 `read` 返回的迭代器所引用的消息所在的共享内存,
1634-
* 缓存中其余的共享内存实例将被释放 (因此对应区域也将被 umap).
1634+
* 缓存中其余的共享内存实例将被释放 (因此对应区域也将被 unmap).
16351635
* @return 释放的 `Shared_Memory<false, writable>` 的数量.
16361636
*/
16371637
auto gc_() noexcept {

0 commit comments

Comments
 (0)