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

4.1.1代码讨论 #72

Open
tracyqwerty opened this issue May 10, 2023 · 1 comment
Open

4.1.1代码讨论 #72

tracyqwerty opened this issue May 10, 2023 · 1 comment

Comments

@tracyqwerty
Copy link

image

或许修改成:

{   // 以下为 DoWork<int> 查找对应匹配的伪代码
    templateProtoInt = TemplateDict.find(DoWork, int);    // 查找模板原型,查找到(0)
    template = templateProtoInt.match(int);              // 以 int 对应 int 匹配到 (1)
}

{   // 以下为DoWork<float*> 查找对应匹配的伪代码
    templateProtoFloatPtr = TemplateDict.find(DoWork, float*) // 查找模板原型,查找到(0)
    template = templateProtoFloatPtr.match(float*)            // 以 float* 对应 U* 匹配到 (3),此时U为float
}

会更好理解?

@wuye9036
Copy link
Owner

wuye9036 commented Mar 8, 2024

这里我再看下上下文。

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

No branches or pull requests

2 participants