败犬日报 2026-03-19
败犬日报 2026-03-19
1. 协程教程 by LLVM(文章)
https://llvm.org/docs/Coroutines.html
2. 标准库类模板可以偏特化吗
偏特化和特化的要求一样,必须依赖用户自定义类型,否则 IFNDR (ill-formed, no diagnostic required)。
例如:
cpp
template <typename T>
struct std::hash<std::pair<T, T>> { /* ... */ }; // 错误,IFNDR
template <typename T>
struct std::hash<MyPair<T, T>> { /* ... */ }; // ok