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 #33

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

hw03 #33

wants to merge 1 commit into from

Conversation

imcuna
Copy link

@imcuna imcuna commented Jan 31, 2022

1,缺少了模板声明
2,T0不需要声明,首先需要知道T1+T2的类型,用了decltype来得到对应类型的别名,逐个元素相加后返回
3,使用visit访问对应类型的variant值,相加后申明为对应类型的variant并返回
4,由于缺少variant类型与普通类型相加的操作符重载,所以额外增加了一个函数
5,使用了可变长操作符支持多参数,并使用visit访问对应类型变量并输出

hw03
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