language_fan wrote: > Since the constructor has no meaning outside classes, should it be > interpreted as a free function if mixed in a non-class context? I really > wonder how this could be valid code. Does the grammar even support the > 3rd line?
Checking whether a constructor is inside a class happens during one of the semantic passes. The parser makes no distinction between class/interface/template/struct/union bodies.
