Skip to content

4.1.1代码讨论 #72

Description

@tracyqwerty
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
}

会更好理解?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions