[LLVMbugs] [Bug 9551] New: Clang doesn't implement tweaked injected class name behavior

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 25 10:26:44 PDT 2011


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

           Summary: Clang doesn't implement tweaked injected class name
                    behavior
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: schaub.johannes at googlemail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


This is a PR that should be closed once the tweaked injected class name
behavior that the approved resolution to core issue #1004 for C++0x has
established: Passing the injected class name to template template parameters
treats it as a template name. 


template<template<typename> class X>
struct M { };

template<template<typename> class X>
void g(int = 0); // #1

template<typename T>
void g(long = 0); // #2

template<typename T>
struct A {
  void f() {
    g<A>(); /* should be ambiguous */
    g<A>(1); /* should choose #1 */
    M<A> m; /* should work */
  }
};

void h() {
  A<int> a;
  a.f();
}

Currently, clang calls the second "g" both times, and fails to use "M<A>".

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list