www.digitalmars.com         C & C++   DMDScript  

c++ - [bug report] overload resolution/conversion sequences

struct A {
    operator int *();
    operator const int *() const;
};

int main() {
    A a;
    bool b = a;
// Error: need explicit cast to convert
// from: A
// to  : bool

    return 0;
}


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw jabber.at
mailto cmeerw at web.de

...and what have you contributed to the Net?
Jul 15 2004