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]

Documentation suggestion


This isn't a bug report, but I didn't know where else to send it.
It's a suggestted update to the egcs home page.  There's no webmaster
mail address like there is on most web pages.  

The URL http://www.cygnus.com/egcs/c++features.html has a list of
things that may need to be fixed in ones code to make it work with
egcs.  One thing to add is: gcc 2.7.2 allowed local classes to be used
as template arguments. egcs no longer allows this.  Here's an example
of what I mean.

#include <algo.h>

void f(pair<int,int> *pairs, int len) 
{
  struct pairLess {
    bool operator() (const pai<int,int>r& a, const pair<int,int>& b) { 
      return a.first < b.first; 
    }
  };

  sort(pairs, pairs + len, pairLess());
}

This was allowed with 2.7.2, but with egcs it's not allowed.  I get an
error saying I can't use a local class as an argument to a template
function.  This is in accordance with the new C++ standard, so it's
not a bug, just something people will have to change.

Adam


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