[LLVMbugs] [Bug 13931] New: Member-function templates from base types not considered after using-declaration.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Sep 26 11:07:48 PDT 2012


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

             Bug #: 13931
           Summary: Member-function templates from base types not
                    considered after using-declaration.
           Product: clang
           Version: 3.1
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rivorus_katarni at yahoo.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


When a function template from a base type has a different template argument
list than a function template of the same name in a child type, the one in the
child type seems to hide the one in the base type even when the function
template in the base type is brought in via a using-declaration. See the
following test-case:

////////////////////
struct base
{
  template< class > static void foo();
};

struct child : base
{
  using base::foo;
  template< int > static void foo();
};

void bar()
{
  child::foo< int >(); // Should resolve to the function template of the base
  child::foo< 1 >();   // Should resolve to the function template of the child
}
////////////////////

The above code produces the following errors regarding the first function call
inside of bar():

"error: no matching function for call to 'foo'"
"note: candidate template ignored: invalid explicitly-specified argument for
1st template parameter"

-- 
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