Topic: Is there an ANSI/ISO standard for C++ ???


Author: Steve Clamage <stephen.clamage@Eng.Sun.COM>
Date: 1997/09/04
Raw View

"Jay Krell" < (reverse ude.llenroc@llerk.yaj) wrote:
>
> Could you elaborate on the "when are default template parameters bound"
> issue? (Or point to a faq..)

This isn't in any FAQ. It's a subject that has been under
discussion in the C++ Committee. I'm just going to present
the heart of the matter, and use a somewhat contrived
example to keep the discussion as simple as possible. There
is more to the subject than what follows.

Consider an ordinary function declaration with a default
parameter value:

 class Foo { ... }; // no default constructor
 void g(const Foo& = Foo());

The meaning of g's default parameter value is determined
at the point of the function declaration: if necessary, a
Foo object should be created using the default constructor
and passed to function g. Since Foo doesn't have a default
constructor, the declaration for g is invalid, even if g is
never called without an explicit argument. Usage of the
function doesn't matter -- only its declaration.

Now consider a function template with a default parameter
value that depends on a template parameter:

 template< class T >
  void h(const T& t = T()) { ... }

The template h is OK as far as we can tell, but final
determination of validity depends on type T.

Suppose we instantiate h on type Foo:

 Foo f;
 h(f);

Under the rules currently in the draft, the default parameter
value is checked for legality. Since Foo doesn't have a
default constructor, the instantiation "h(f)" is illegal,
even though we don't use the default value. That rule is
consistent with the rule for non-template functions, and
matches the way templates are processed.

Unfortunately, it makes default parameters values in function
templates difficult to use. In particular, many parts of
the standard library become inconvenient to specify. It
would be nicer for users of this feature if the default
parameter values were checked only if it were used. Then
the instantiation "h(f)" would be valid, and only if you
wrote "h<Foo>()" would you get an error.

The C++ Committee is considering whether to make that change.
A complete proposal is more complicated than what I have
presented, since "check it only if it's used" is not an
adequate specification. The actual semantics are a bit
convoluted (as if templates were not already convoluted
enough).

--
Steve Clamage, stephen.clamage@eng.sun.com
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: "yaoting" <yaoting@mbox2.singnet.com.sg>
Date: 1997/08/20
Raw View
I know there is a draft standard C++, but not a standard for C++ yet.

kzhang <kzhang@lonestar.rrclub.org> wrote in article
<33F12E55.158EB259@lonestar.rrclub.org>...
> Is there an ANSI/ISO Standard for C++ or not.  Someone said no any
> standard for C++, but I saw several venders say their products are based
> on ANSI/ISO C++ Standard.
> ---
> [ comp.std.c++ is moderated.  To submit articles: try just posting with
   ]
> [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu
   ]
> [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
   ]
> [ Policy:
http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
> [ Comments? mailto:std-c++-request@ncar.ucar.edu
   ]
>
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: kzhang <kzhang@lonestar.rrclub.org>
Date: 1997/08/13
Raw View
Is there an ANSI/ISO Standard for C++ or not.  Someone said no any
standard for C++, but I saw several venders say their products are based
on ANSI/ISO C++ Standard.
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: "Stephen A. Ecker" <secker@wausaufs.com>
Date: 1997/08/13
Raw View
The standardization process is well underway. When vendors say their
product supports the ANSI/ISO C++ Standard, they are referring to the draft
standards that is *not quite* approved. Technically speaking, then, there
is no standards. However, there will be soon, what's going to be in it is
pretty well defined, and there are no major changes expected in the
proposed standard between now and the time it is finally approved.

kzhang <kzhang@lonestar.rrclub.org> wrote in article
<33F12E55.158EB259@lonestar.rrclub.org>...
> Is there an ANSI/ISO Standard for C++ or not.  Someone said no any
> standard for C++, but I saw several venders say their products are based
> on ANSI/ISO C++ Standard.

---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: Steve Clamage <stephen.clamage@Eng.Sun.COM>
Date: 1997/08/13
Raw View
kzhang wrote:
>
> Is there an ANSI/ISO Standard for C++ or not.  Someone said no any
> standard for C++, but I saw several venders say their products are based
> on ANSI/ISO C++ Standard.

Surely you looked up the FAQ which is listed at the bottom
of every article in this newsgroup. So I guess you just
failed to notice the entire section of the FAQ which deals
with exactly that question.

--
Steve Clamage, stephen.clamage@eng.sun.com
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: James Kuyper <kuyper@wizard.net>
Date: 1997/08/13
Raw View
kzhang wrote:
>
> Is there an ANSI/ISO Standard for C++ or not.  Someone said no any
> standard for C++, but I saw several venders say their products are based
> on ANSI/ISO C++ Standard.

What they usually say is "the proposed ANSI/ISO C++ standard" or "the
evolving ANSI/ISO C++ standard" or "the X draft of the ANSI/ISO C++
standard". If they say they are based on the actual standard, they are
either lying, clairvoyent, or own a time machine.
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: marcsh@corel.ca (Marc Sherman)
Date: 1997/08/14
Raw View
In article <33F1C366.167E@wizard.net>, James Kuyper <kuyper@wizard.net> wrote:
>What they usually say is "the proposed ANSI/ISO C++ standard" or "the
>evolving ANSI/ISO C++ standard" or "the X draft of the ANSI/ISO C++
>standard". If they say they are based on the actual standard, they are
>either lying, clairvoyent, or own a time machine.

Perhaps they attempted to execute {cout << ++a << ++a;} ?

- Marc
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: Colin Rafferty <craffert@ml.com>
Date: 1997/08/14
Raw View
Steve Clamage writes:
> kzhang wrote:

>> Is there an ANSI/ISO Standard for C++ or not?

> Surely you looked up the FAQ which is listed at the bottom
> of every article in this newsgroup. So I guess you just
> failed to notice the entire section of the FAQ which deals
> with exactly that question.

But if no one asked it, then it would no longer be a FAQ.

--
Colin Rafferty
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: Steve Clamage <stephen.clamage@Eng.Sun.COM>
Date: 1997/08/15
Raw View
Reality is a point of view wrote:
>
>  +---- craffert@ml.com wrote (14 Aug 1997 16:25:48 PDT):
>  | Steve Clamage writes:
>  | > kzhang wrote:
>  | >> Is there an ANSI/ISO Standard for C++ or not?
>  | > Surely you looked up the FAQ which is listed at the bottom
> [...]
>  | But if no one asked it, then it would no longer be a FAQ.
>
> And now is a good time to ask.  Maybe "is it on track and
> looking ready?" would be more specific.

Yes, we are exactly on schedule. I submitted some updates
to the FAQ, but they haven't been installed yet. (But maybe
Matt will have installed them by the time this article appears. :-)

>  My apologies for not
> noticing if the number and content of CD-2 comments has been
> discussed.  Does it look like there is a lot of use for the
> three or four months before meeting #20?

All of the US public comments and all but 3 or 4 of the
ISO member nation comments have been resolved. The remainder
will be resolved at the November meeting. The time until that
meeting is being used for email discussion of those points.

--
Steve Clamage, stephen.clamage@eng.sun.com
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: gjohnson@dream.season.com (Reality is a point of view)
Date: 1997/08/15
Raw View
 +---- craffert@ml.com wrote (14 Aug 1997 16:25:48 PDT):
 | Steve Clamage writes:
 | > kzhang wrote:
 | >> Is there an ANSI/ISO Standard for C++ or not?
 | > Surely you looked up the FAQ which is listed at the bottom
[...]
 | But if no one asked it, then it would no longer be a FAQ.
 +----

And now is a good time to ask.  Maybe "is it on track and
looking ready?" would be more specific.  My apologies for not
noticing if the number and content of CD-2 comments has been
discussed.  Does it look like there is a lot of use for the
three or four months before meeting #20?

--
Gary Johnson     gjohnson@season.com
Privacy on the net is still illegal.
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]