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

             Bug #: 13901
           Summary: Can't declare member function with "F foo;" with F as
                    function type if F is a template parameter
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


OK, I confess that I honestly don't know if this is a legitimate bug or not.
Every compiler I've tried rejects it. But it just seems like it *should* work.

template<typename F>
struct S
{
    typedef int G(int);
    G bar; // OK, bar is declared as a member function

    F foo; // whoops, can't declare member function this way
};

int main()
{
    S<int(int)> s;
    s.bar(1);
    s.foo(1);
}

Why should the fact that F is a template parameter make any difference? A type
is a type, right?

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to