This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35387] New: __PRETTY_FUNCTION__ produces inconsistent output
- From: "d dot frey at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2008 08:51:47 -0000
- Subject: [Bug c++/35387] New: __PRETTY_FUNCTION__ produces inconsistent output
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Minimal example program:
#include <iostream>
#include <algorithm>
template< typename T > struct A;
template< typename T, typename U > struct A< std::pair< T, U > >
{
static void f()
{
std::cout << __PRETTY_FUNCTION__ << std::endl;
}
};
int main()
{
A< std::pair< int, int > >::f();
}
Output of __PRETTY_FUNCTION__ from this program:
static void A<std::pair<_T1, _T2> >::f() [with T = int, U = int]
Problem:
_T1 and _T2 are printed as the pair's parameter names, but it then say T=int
and U=int.
Additional information:
This only seems to occur with partial specialization.
--
Summary: __PRETTY_FUNCTION__ produces inconsistent output
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: d dot frey at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35387