This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/35387] New: __PRETTY_FUNCTION__ produces inconsistent output


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]