This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/9278: dependent type in conversion operator bug
- From: dave at boost-consulting dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 12 Jan 2003 03:52:13 -0000
- Subject: c++/9278: dependent type in conversion operator bug
- Reply-to: dave at boost-consulting dot com
>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: