摘要: 1 #ifndef LAZY_H 2 #define LAZY_H 3 #include <Optional.hpp> 4 #include <functional> 5 6 template<typename T> 7 struct Lazy 8 { 9 Lazy(){} 10 template 阅读全文
posted @ 2022-05-14 11:09 SSSnail 阅读(55) 评论(0) 推荐(0)
摘要: 1 #pragma once 2 #include <type_traits> 3 #include <utility> 4 #include <stdexcept> 5 6 template<typename T> 7 class Optional 8 { 9 using data_t = typ 阅读全文
posted @ 2022-05-14 10:23 SSSnail 阅读(65) 评论(0) 推荐(0)
摘要: 目前我学习到的很多框架都是用 c++98 写的,可能因为这些框架写成得比较早,因此没有注意 c++11的应用,但是时至今日,在 c++20 都快要问世之际,怎能还停留在 C++98 死于安乐呢? C++ 11 最强大的新特性就是她对于模板的加强,同时也是最复杂的特性(因为模板本来就复杂),但是模板的 阅读全文
posted @ 2022-05-14 08:26 SSSnail 阅读(43) 评论(0) 推荐(0)