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

完成hw03 #34

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

完成hw03 #34

wants to merge 1 commit into from

Conversation

SkySailing
Copy link

完成hw03,学习函数模板,vist,variant特性

请修复这个函数的定义:

函数定义前面增加模板定义 template

请修复这个函数的定义:

  1. template <class T1, class T2>
  2. 使用decltype来确定返回类型.
  3. 相加结果长度取输入参数的较短长度.

请实现自动匹配容器中具体类型的加法!

  1. 使用std::visit函数和variant搭配,遍历各种可能的组合.
  2. 定义实现variant + vector 和 variant + variant两种类型的加法

请实现自动匹配容器中具体类型的打印!

  1. 使用可变参数模板重写打印输出<<符号

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