$3.5 - "In addition, a member function, static data member, class or enumeration of class scope has external linkage if the name of the class has external linkage."
Any inputs on what does it mean by 'if the name of the class has external linkage'
?
Is the hint on 'local classes' (which probably don't have any linkage) as compared to class defined in namespace scop开发者_StackOverflow中文版e, and namespace scope classes defined with static specifier (which have internal linkage???)?
Local classes (but not necessarily nested classes) don't have linkage. A class can't be defined with static specifier. So this equivalently could be stated as follows:
$3.5 - "In addition, a member function, static data member, class or enumeration of class scope has external linkage unless the containing class is a local class or is a directly or indirectly nested class within a local class."
精彩评论