This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/16153] New: "typeof" fails in building pointer-to-member-function


class B{};
class A{
public:
    void    Foo(B& buf) {}
    };

int main() {
    void (A::*p)(B&) = &A::Foo;
    A a;
    void (A::*q)(B&) = &typeof<a>::Foo;

    return 0;
    }

gets you:

~/ootbc/common/test/src$ g++ foo.cc
foo.cc: In function `int main()':
foo.cc:10: error: expected primary-expression before "typeof"
foo.cc:10: error: expected `,' or `;' before "typeof"


Parentheses don't seem to help. Comeau doesn't do "typeof"

Ivan

-- 
           Summary: "typeof" fails in building pointer-to-member-function
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16153


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]