[LLVMbugs] [Bug 16180] New: Delayed template parsing should defer lookup of default template arguments

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 30 06:28:20 PDT 2013


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

            Bug ID: 16180
           Summary: Delayed template parsing should defer lookup of
                    default template arguments
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hans at chromium.org
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
            Blocks: 13707
    Classification: Unclassified

MSVC allows the following, which is used in standard library headers
(atlwin.h):

  template <typename T = Foo> class C;
  template <typename T> class C {
    int x;
  };
  typedef int Foo;
  C<> c;

Note how Foo is used both in the forward declaration and definition of the
template, without being declared yet.

Clang should allow this in MS compatibility mode, probably under the delayed
template parsing mechanism.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130530/3c4ea57b/attachment.html>


More information about the llvm-bugs mailing list