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++/23699] New: patch for #23099 breaks glibmm


Marks patch for fixing PR23099 from 2005-08-29 makes glibmm not compile: 
 
% cat glib-test.cc 
#include <string> 
struct A{ 
  static const long npos = std::string::npos; 
}; 
% g++ -c glib-test.cc 
glib-test.cc:3: error: field initializer is not constant 
 
Reverting it makes this compile again.  To fail it seems to need that the 
type of std::string::npos comes from a template argument member (the allocator 
of std::string in this case).  Easier tests do compile.  Also doing 
the initialization of A::npos outside the class definition makes this compile.

-- 
           Summary: patch for #23099 breaks glibmm
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: mark at codesourcery dot com
        ReportedBy: matz at suse dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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