title: Does a namespace-scope constructor definition require a class-qualified identifier?
body: <p>Here's something we all learned on Day 1 of C++, which we take for granted but doesn't clearly follow from the wording of the Standard.</p>
  <p>Given a class <code>S</code>, we can define its constructor</p>
  <pre><code>struct S { S(); };
  S::S() { … }
  </code></pre>
  <p>But the Standard seems to allow this just as well:</p>
  <pre><code>struct S { S(); };
  S() { … }
  </code></pre>
  <p>Qualifying the name of a class with itself is always allowed but always redundant. For example <code>S::S::S::S() { … }</code> is also a valid declaration. If <code>S::S</code> is, why not plain <code>S</code>?</p>
  <p>From C++11 §12.1/1,</p>
  <blockquote>
  <p>Constructors do not have names. A special declarator syntax is used to declare or define the constructor. The syntax uses:</p>
  <p>— an optional decl-specifier-seq in which each decl-specifier is either a function-specifier or constexpr,</p>
  <p>— the constructor’s class name, and</p>
  <p>— a parameter list</p>
  <p>in that order.</p>
  </blockquote>
  <p>This applies equally to class or namespace scope. There is a special rule about namespace scope, §9.3/5,</p>
  <blockquote>
  <p>If the definition of a member function is lexically outside its class definition, the member function name shall be qualified by its class name using the :: operator.</p>
  </blockquote>
  <p>However, <em>constructors do not have names</em>, so this doesn't apply, right? Moreover, there's no reason to require the qualification, because there is no syntactic ambiguity. A function declared with no return type and a class-name for an identifier is always a syntax error under currently observed rules. Right?</p>
  <p>Not that we should start writing code with the qualification omitted, but is there a reason that no compiler accepts this, or is it just tradition?</p>