Questions tagged «fully-qualified-naming»

1
无法在函数定义的类外声明符中完全限定类名
该程序导致不希望的贪婪解析的死胡同: struct float4x4 {}; class C { float4x4 M(); }; float4x4 ::C::M() { return float4x4{}; } :8:1:错误:'float4x4'中没有名为'C'的成员; 您的意思仅仅是“ C”吗? float4x4 :: C :: M() ^ ~~~~~~~~~~~~ 可以使用尾随返回类型“固定”: auto ::C::M() -> float4x4 {} 现在一切都好。 因此,我认为在使用heading-return-type声明符语法时,我们不能完全限定类名吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.