CppTemplateTutorial icon indicating copy to clipboard operation
CppTemplateTutorial copied to clipboard

问题反馈

Open michealowen opened this issue 4 months ago • 0 comments

3.2.2 节中 foo 函数是否少了一个返回值类型 void

struct A  { int a; };
struct AB { int a, b; };
struct C  { int c; };

template <typename T> foo(T& v0, C& v1){
    v0.a = 1;
    v1.a = 2;
    v1.c = 3;
}

michealowen avatar Sep 27 '25 10:09 michealowen