Skip to content

Conversation

hebangwen
Copy link

1、类模板,需要使用 template 关键字,然后提供模板参数。模板参数的关键字可以为 class 或者 typename

2、声明 T0 ,由于 T0 没有在模板参数中给出,所以它只能是函数体内部获得的,然后返回出来,所以函数的返回参数应该设置成 auto

3、使用 std::visit 访问 variant,当需要返回数值时,要指定 lambda 函数的返回值

4、d + c 编译通过,也要设置运算符重载

5、Windows 上编译通过

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