c++/7077: nested typedef conversion operator

david.abrahams@rcn.com david.abrahams@rcn.com
Wed Jun 19 09:19:00 GMT 2002

>Number:         7077
>Category:       c++
>Synopsis:       nested typedef conversion operator
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 19 06:26:01 PDT 2002
>Originator:     david.abrahams@rcn.com
>Release:        3.1
The following should compile but doesn't.
struct X;

template <class T>
struct Y
    typedef void (X::*b)() const;
    operator b() const;

struct X { void f() const {} };

template <class T>
Y<T>::operator typename Y<T>::b() const
    return &X::f;

int main()
    if (Y<int>())
        return 0;
        return 0;


More information about the Gcc-bugs mailing list