[llvm-bugs] [Bug 27746] New: Dependent template name not recognized as dependent

via llvm-bugs llvm-bugs at lists.llvm.org
Sat May 14 14:36:45 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27746

            Bug ID: 27746
           Summary: Dependent template name not recognized as dependent
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bekenn at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16370
  --> https://llvm.org/bugs/attachment.cgi?id=16370&action=edit
Example illustrating the problem

The attached code produces an error: "use of undeclared identifier
'make_whatever_f'"

The code defines a class template is_whatever_adaptable<T> and a partial
specialization of that template when T has the form of a function type.  The
templates define a trait with a value that evaluates to true when one of the
expressions make_whatever_s(decltype<T>()) (for the primary template) or
make_whatever_f<A>(decltype<T>()) (for the partial specialization) is
well-formed.

make_whatever_s and make_whatever_f are both dependent names, but the compiler
is rejecting make_whatever_f.

I believe the code to be well-formed; make_whatever_f is a dependent name, but
Clang is trying to bind to it prior to template instantiation.

I encountered this using Clang 3.7 packaged with Visual Studio 2015 Update 2;
later, I installed the Windows build of Clang from llvm.org and encountered the
same issue.

-- 
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/20160514/ecb009cb/attachment.html>


More information about the llvm-bugs mailing list