c++/9278: dependent type in conversion operator bug
dave@boost-consulting.com
dave@boost-consulting.com
Mon Jan 13 05:17:00 GMT 2003
>Number: 9278
>Category: c++
>Synopsis: dependent type in conversion operator bug
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 11 19:56:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: dave@boost-consulting.com
>Release: gcc-3.2
>Organization:
>Environment:
cygwin
>Description:
This fails to compile; I don't think it should.
Trust me, there is a use case for this sort of thing! ;-)
>How-To-Repeat:
# include <iostream>
// metafunction always returning void
template <class T> struct voidify { typedef void type; };
template <class T> struct Y {};
struct X
{
template <class T>
operator Y<T> (typename voidify<T>::type) const { return Y<T>(); }
};
int main()
{
X x();
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list