且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

成员函数定义中的类型不完整

更新时间:2021-08-15 00:31:27

所引用链接的第一项:

一个类的完整类上下文是

A complete-class context of a class is a

  • 功能主体([dcl.fct.def.general]),

因此,在任何方法的函数体内,都将其视为完整类的上下文.函数定义的上下文"指的是函数定义的上下文".据我所知,它与函数主体同义-与函数声明的上下文相反,在函数声明的上下文中,不需要完整的返回类型.

So within the function body of any method is considered a complete-class context. The "context of a function definition" is synonymous with the function body, as far as I can tell -- as opposed to the context of a function declaration, where the return type is not required to be complete.