Given the following code:
  template <typename T>
  struct A
  {
    void fn() { cout << __PRETTY_FUNCTION__ << endl; }
  };

  struct B
  {
    template <typename T>
    void fn() { cout << __PRETTY_FUNCTION__ << endl; }
  };

  int main()
  {
    A<int>().fn();
    B().fn<int>();
  }

g++ outputs:
  void A<T>::fn() [with T = int]
  void B::fn() [with T = int]

I think that the latter should output:
  void B::fn<T>() [with T = int]


-- 
           Summary: [feature request] __PRETTY_FUNCTION__ addition
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc at daryl dot haresign dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39813

Reply via email to