Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Riga finished hw3! #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Riga finished hw3! #42

wants to merge 1 commit into from

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.

None yet

1 participant