This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

No Subject


"Jack A Walker" <jawalker@beckman.com> writes:
> When I try to compile a  test program that includes my lamer fixed capacity
>  string
> template I get the following error from egcs:

Thanks for the bug report. It's a bug in egcs-1.1, and still in the
upcoming egcs-1.1.1 release.

It has to do with the following construct:
  
  template <size_t sz>
  struct Template {
    typedef char Foo [sz + 1];		// it's the ``+1'' that causes it.
    typedef char Foo2 [sz];		// OK
  };

I'll send a simplified testcase to the egcs folks. 

A temporary workaround is to use a static const size_t member and
initialize that to `sz + 1' and use that in the typedef.

btw, the identifier _String is reserved by the implementation and the
compiler is not required to issue a diagnostic (and free to do anything
it wants with your code ;-). See section 17.4.1.3 in the standard.

Library reserved namespace:
  - any identifier prefixed with double underscore.
  - any identifier prefixed with a single underscore and followed by an
    uppercase letter.

In addition,
  - each identifier that begins with an underscore is reserved to be used
    in the global namespace.

So, please don't used names prefixed with _; you can always use _ suffix.

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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