template Archive

  • c++的template在遇到名称决议的时候,根据定义和实例化有两种不同的scope: scope of the template definition scope of the template instantiation 假设有一个模板定义在nameResolution.h文件中: extern double foo(double); template<class type> class ScopeRules{ public: void invariant() { member = foo(val); } type type_dependent() { return foo(m […]

    Name Resolution within a Template

    c++的template在遇到名称决议的时候,根据定义和实例化有两种不同的scope: scope of the template definition scope of the template instantiation 假设有一个模板定义在nameResolution.h文件中: extern double foo(double); template<class type> class ScopeRules{ public: void invariant() { member = foo(val); } type type_dependent() { return foo(m […]

    Continue Reading...