Skip to content

Conversation

Riga27527
Copy link

基本要求都完成了!

  1. 添加 template<class T>
  2. 利用 decltype(T1{} + T2{})推导出T0
  3. 采用std::visit配合std::variant使用,并利用lambda函数的参数类型推导(auto const &)实现
  4. 同样采用std::visit实现,此处要注意其中的lambda函数要捕获os,所以需要[&]
  5. 还要额外实现std::vector<T1>和std::variant<T2, T3>的operator+操作。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant