C++ Generative Metaprogramming Errata
p. 101: Return type error
Reporter: 水滴会飞
Date: 2025-01-06
Status: Corrected
Location
Code Line 1
Error
void reverse_of
Correction
auto reverse_of
p. III: Typo
Reporter: 霉娃娃
Date: 2025-01-08
Status: Corrected
Location
Line 2
Error
不过只是一种最简陋的的特性,宏元编程的门槛甚至比模板元编程还要高,工具太过简单,结果就是最简单功能也需要从头演绎
Correction
不过只是一种最简陋的特性,宏元编程的门槛甚至比模板元编程还要高,工具太过简单,结果就是最简单的功能也需要从头演绎
p. 70: Missing parentheses
Reporter: 令一罚n中n
Date: 2025-01-12
Status: Corrected
Location
Bottom code, line 5.
Error
(std::cout << Is << " ", ...);
Correction
((std::cout << Is << " "), ...);
p. 76: Error in description
Reporter: 逐月
Date: 2025-01-11
Status: Corrected
Location
Paragraph 2.
Error
先看
make_index_sequence<2>
,又被拆分成求 1 和 2,代码表示为:
merge_index_sequence<
make_index_sequence<1>, make_index_sequence<0>>
↑
make_index_sequence<2>
Correction
先看
make_index_sequence<2>
,又被拆分成求 1 和 1,代码表示为:
merge_index_sequence<
make_index_sequence<1>, make_index_sequence<1>>
↑
make_index_sequence<2>
pp. 71-75: Long section titles in the headers
Reporter: 里缪
Date: 2025-01-10
Status: Corrected
Location
Headers of pages 71 to 75.
Error
The page numbers are misaligned due to long headers, i.e., "Implementing make_index_sequence with Various Template Techniques".
Correction
The long headers were shortened to "Implementing make_index_sequence with Various Template…".
pp. 153-163: Long section titles in the headers
Reporter: 里缪
Date: 2025-01-10
Status: Corrected
Location
Headers of pages 153 to 163.
Error
The page numbers are misaligned due to long headers, i.e., "Best Practice: Convert Run-Time Values to Compile-Time Constants".
Correction
The long headers were shortened to "Best Practice: Convert Run-Time Values to Compile-Time…".
p. 59: Typo
Reporter: 小Wayne
Date: 2025-01-14
Status: Pending
Location
The end of paragraph 2.
Error
则会强制用户包含包含该类型,无法通过前置声明解决,头文件依赖性增加。
Correction
则会强制用户包含该类型,无法通过前置声明解决,头文件依赖性增加。
p. 8: Error in description
Reporter: xyz1001
Date: 2025-01-17
Status: Pending
Location
Paragraph 2.
Error
此时
HAS_COMMA((1))
展开为HAS_COMMA(, ())
Correction
此时
IS_EMPTY((1))
展开为HAS_COMMA(, ())
pp. 130-131: Logic Error in the Generic Netlink Example
Reporter: 逐月
Date: 2025-01-16
Status: Pending
Location
reply_handler
function.
Error
Correction