浅墨浓香

想要天亮进城,就得天黑赶路。

导航

2020年5月16日

摘要: 8.5 Compile-Time if8.5 编译期if Partial specialization, SFINAE, and std::enable_if allow us to enable or disable templates as a whole. C++17 additionally 阅读全文

posted @ 2020-05-16 17:29 浅墨浓香 阅读(664) 评论(1) 推荐(0) 编辑

摘要: 8.4 SFINAE (Substitution Failure Is Not An Error) 8.4 SFINAE(替换失败并不是错误) In C++ it is pretty common to overload functions to account for various argume 阅读全文

posted @ 2020-05-16 17:26 浅墨浓香 阅读(674) 评论(0) 推荐(0) 编辑

摘要: 8.3 Execution Path Selection with Partial Specialization 8.3 偏特化的执行路径选择 An interesting application of a compile-time test such as isPrime() is to use 阅读全文

posted @ 2020-05-16 17:18 浅墨浓香 阅读(242) 评论(0) 推荐(0) 编辑

摘要: 8.2 Computing with constexpr8.2 使用constexpr计算 C++11 introduced a new feature, constexpr, that greatly simplifies various forms of compile-time computa 阅读全文

posted @ 2020-05-16 17:16 浅墨浓香 阅读(708) 评论(0) 推荐(0) 编辑

摘要: Chapter 8:Compile-Time Programming 第8章 编译期编程 C++ has always included some simple ways to compute values at compile time. Templates considerably increa 阅读全文

posted @ 2020-05-16 17:13 浅墨浓香 阅读(490) 评论(0) 推荐(0) 编辑