Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions book/en/src/cpp11/17-pod-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In C++, there is a corresponding category of **POD types** whose memory layout i

| Book | Video | Code | Forum |
| --- | --- | --- | --- |
| [cppreference-PODType](https://cppreference.com/w/cpp/named_req/PODType.html) / [markdown](https://github.com/mcpp-community/d2mcpp/blob/main/book/src/cpp11/17-pod-type.md) | [Video Explanation]() | [Exercise Code]() | [Discussion Forum](https://forum.d2learn.org/category/20) |
| [cppreference-PODType](https://cppreference.com/w/cpp/named_req/PODType.html) / [markdown](https://github.com/mcpp-community/d2mcpp/blob/main/book/src/cpp11/17-pod-type.md) | [Video Explanation]() | [Exercise Code](https://github.com/mcpp-community/d2mcpp/blob/main/dslings/cpp11/17-pod-type-0.cpp) | [Discussion Forum](https://forum.d2learn.org/category/20) |

> Note: since C++20, the “PODType” notion in the standard has been marked **deprecated**.
> The standard library now prefers more fine-grained categories such as `TrivialType`, `StandardLayoutType`, and `ScalarType` to describe related requirements.
Expand Down Expand Up @@ -140,9 +140,9 @@ In new code, it is better to express constraints based on actual needs, for exam

### Exercise topics

- 0 – Use type traits to check POD / trivial / standard-layout (`17-pod-type-0.cpp`)
- 1 – Simulate byte-wise copying of a POD struct and observe the behavior (`17-pod-type-1.cpp`)
- 2 – Adapt C++ message types to C interface using POD headers (`17-pod-type-2.cpp`)
- 0 – [Use type traits to check POD / trivial / standard-layout](https://github.com/mcpp-community/d2mcpp/blob/main/dslings/en/cpp11/17-pod-type-0.cpp)
- 1 – [Simulate byte-wise copying of a POD struct and observe the behavior](https://github.com/mcpp-community/d2mcpp/blob/main/dslings/en/cpp11/17-pod-type-1.cpp)
- 2 – [Adapt C++ message types to C interface using POD headers](https://github.com/mcpp-community/d2mcpp/blob/main/dslings/en/cpp11/17-pod-type-2.cpp)

### Auto-check command

Expand Down
8 changes: 4 additions & 4 deletions book/src/cpp11/17-pod-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ C++ 早期标准为了描述这类“行为上接近 C struct 的类型”,引

| 书籍 | 视频 | 代码 | 交流 |
| --- | --- | --- | --- |
| [cppreference-PODType](https://cppreference.com/w/cpp/named_req/PODType.html) / [markdown](https://github.com/mcpp-community/d2mcpp/blob/main/book/src/cpp11/17-pod-type.md) | [视频解读]() | [练习代码]() | [论坛讨论](https://forum.d2learn.org/category/20) |
| [cppreference-PODType](https://cppreference.com/w/cpp/named_req/PODType.html) / [markdown](https://github.com/mcpp-community/d2mcpp/blob/main/book/src/cpp11/17-pod-type.md) | [视频解读]() | [练习代码](https://github.com/mcpp-community/d2mcpp/blob/main/dslings/cpp11/17-pod-type-0.cpp) | [论坛讨论](https://forum.d2learn.org/category/20) |

> 注意:从 C++20 开始,标准中的 “PODType” 概念已被标记为**弃用**。标准库更倾向于使用更细化的类别,如 `TrivialType``StandardLayoutType``ScalarType` 等来描述相关需求。
Expand Down Expand Up @@ -140,9 +140,9 @@ void pod_only_copy(const T& src, T& dst) {

### 练习代码主题

- 0 - 使用类型特征判断 POD / trivial / standard layout`17-pod-type-0.cpp`
- 1 - 模拟按字节拷贝 POD 结构体,体会其行为`17-pod-type-1.cpp`
- 2 - 为 C 接口传入合适的 POD 类型数据`17-pod-type-2.cpp`
- 0 - [使用类型特征判断 POD / trivial / standard layout](https://github.com/mcpp-community/d2mcpp/blob/main/dslings/cpp11/17-pod-type-0.cpp)
- 1 - [模拟按字节拷贝 POD 结构体,体会其行为](https://github.com/mcpp-community/d2mcpp/blob/main/dslings/cpp11/17-pod-type-1.cpp)
- 2 - [为 C 接口传入合适的 POD 类型数据](https://github.com/mcpp-community/d2mcpp/blob/main/dslings/cpp11/17-pod-type-2.cpp)

### 练习代码自动检测命令

Expand Down