Skip to content

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