From: Joe Buck <jbuck@Synopsys.COM>
To: lind0753@umn.edu (Stephen Lindholm)
Cc: egcs@egcs.cygnus.com
Subject: Re: Peculiar functionality
Date: Mon, 31 May 1999 21:36:00 -0000 [thread overview]
Message-ID: <199905190044.RAA23958@atrus.synopsys.com> (raw)
Message-ID: <19990531213600.MzPAm23QPhiAJ1N9zG66Gh_3L2E7oA0AX6rUcx8qQoY@z> (raw)
In-Reply-To: <002e01bea18f$075ec840$dbaf6580@sneezy.qt.org>
> 1) The new operators "or" "and" "not" (etc), described on Stroustrup C++PL
> 3rd ed. p. 829 appear to not exist in egcs, or to be turned off by default.
> (It's my feeling that if they are turned off by default, they should be
> turned on, since it is perfectly legitimate to use them in C++ code.)
These are enabled by the flag -foperator-names, or -ansi. The reason for
not making them the default is that too much old C++ code breaks.
> 2) egcs complains when I use arrays of references. If this is bad style,
> please explain why.
Because they aren't C++?
> 3) I can't make class-local constants! I must be doing this wrong, since I
> can't imagine why this would not be present:
Your syntax is wrong.
> class TAnneal {
> // How many iterations to run for
> const int Iterations = 50;
>
> anneal.cpp:16: warning: ANSI C++ forbids initialization of const member
> `Iterations'
> anneal.cpp:16: warning: making `Iterations' static
Try
static const int Iterations = 50;
You can initialize const static members this way, but not const fields
that belong to every object of type TAnneal (those have to be initialized
in the constructor).
next prev parent reply other threads:[~1999-05-31 21:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-18 17:32 Stephen Lindholm
1999-05-18 17:45 ` Joe Buck [this message]
1999-05-31 21:36 ` Joe Buck
1999-05-18 18:13 ` Alexandre Oliva
1999-05-18 19:13 ` Joe Buck
1999-05-18 19:26 ` Alexandre Oliva
1999-05-31 21:36 ` Alexandre Oliva
1999-05-31 21:36 ` Joe Buck
1999-05-31 21:36 ` Alexandre Oliva
1999-05-31 21:36 ` Stephen Lindholm
1999-06-02 17:52 Mike Stump
1999-06-02 18:11 ` Joe Buck
1999-06-30 15:43 ` Joe Buck
1999-06-30 15:43 ` Mike Stump
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199905190044.RAA23958@atrus.synopsys.com \
--to=jbuck@synopsys.com \
--cc=egcs@egcs.cygnus.com \
--cc=lind0753@umn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).