http://llvm.org/bugs/show_bug.cgi?id=15860

            Bug ID: 15860
           Summary: Constructor name resolution
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Clang compiles this sample fine:

struct foo {
  foo();
};

int main() { foo::foo bar; }

but both g++ and VS2012 reject it. The relevant section in the standard is
C++11[class.qual]p2, specifically:
 [...] the constructor is not an acceptable lookup result in an
 elaborated-type-specifier so the constructor would not be used
 in place of the injected-class-name [...]

Is clang being too permissive here?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to