This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/7346: templated conversion operator to dependent type
- From: david dot abrahams at rcn dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 17 Jul 2002 23:28:36 -0000
- Subject: c++/7346: templated conversion operator to dependent type
- Reply-to: david dot abrahams at rcn dot com
>Number: 7346
>Category: c++
>Synopsis: templated conversion operator to dependent type
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 17 16:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: david.abrahams@rcn.com
>Release: 3.1
>Organization:
>Environment:
Cygwin
>Description:
Should compile, instead gives:
foo.cpp:10: no `X<T>::operator int() const' member function declared in class `
X<T>'
foo.cpp:10: template definition of non-template `X<T>::operator int() const'
>How-To-Repeat:
template <class T>
struct X
{
typedef int result_type;
operator result_type() const;
};
template <class T>
X<T>::operator typename X<T>::result_type() const
{
return 0;
}
int x = X<char>();
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: