摘要:
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 浅墨浓香 阅读(716) 评论(1) 推荐(0) 编辑
随笔 - 743, 文章 - 16, 评论 - 87, 阅读 -
53万
|
||
摘要:
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 浅墨浓香 阅读(716) 评论(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 浅墨浓香 阅读(732) 评论(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 浅墨浓香 阅读(254) 评论(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 浅墨浓香 阅读(870) 评论(0) 推荐(0) 编辑 |
||