Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
1.修改重载ostream函数:增加模板声明。
2.两vector相加函数:使用auto推断返回值类型,实现两vector相加功能。
3.两variant相加函数:使用visit自动推断类型匹配,使用lambda表达式减少多余变量和拷贝操作。
4.增加variant和vector相加函数:实现variant和vector的运算,不同类型的vector都要有独立的函数原型。
5.重载variant输出函数:使用visit方法实现。