STL标准文件 [英] STL Standards Document

查看:81
本文介绍了STL标准文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Plauger关于STL的书,我发现它与我在Linux机器上的STL

不同(libstdc ++ - 2.96-112)。 br />

特别是,我没有返回map :: erase(iterator)方法

(void),而不是iterator。


那么,最新的C ++标准文档(INCITS / ISO / IEC 14882-2003)

是否包含STL及其所有模板的最终当前标准?


这是推荐文件找到正确的STL语义,还是

有更好的文件?


TIA,

RR

I have Plauger''s book on STL and I''ve found that it''s different from the STL
I have on a Linux box (libstdc++-2.96-112).

In particular, the map::erase(iterator) method I have returns nothing
(void), not "iterator".

So, does the latest C++ Standards document (INCITS/ISO/IEC 14882-2003)
contain the definitive current standard for STL and all its templates?

Is that the recommended document to find the correct STL semantics, or is
there a better document?

TIA,
RR

推荐答案

" RR" <是ne **************** @ spamgourmet.com>在消息中写道

新闻:JJ **************** @ news-server.bigpond.net.au
"RR" <ne****************@spamgourmet.com> wrote in message
news:JJ****************@news-server.bigpond.net.au
我有Plauger关于STL的书,我发现它与我在Linux机器上的STL(libstdc ++ - 2.96-112)不同。

特别是,map :: erase(iterator)方法我没有返回
(void),而不是iterator。

那么,最新的C ++标准文档(INCITS / ISO / IEC) 14882-2003)
是否包含STL及其所有模板的最终当前标准?


当然。您将在p.498找到以下地图声明:


void erase(迭代器位置);

这是建议的文档,以找到正确的STL语义,
或者是否有更好的文档?
I have Plauger''s book on STL and I''ve found that it''s different from
the STL I have on a Linux box (libstdc++-2.96-112).

In particular, the map::erase(iterator) method I have returns nothing
(void), not "iterator".

So, does the latest C++ Standards document (INCITS/ISO/IEC 14882-2003)
contain the definitive current standard for STL and all its templates?
Of course. You will find the following declaration for map on p.498:

void erase(iterator position);
Is that the recommended document to find the correct STL semantics,
or is there a better document?




大多数人使用Nicolai Josuttis:C ++标准库。但标准

是权威来源。


-

John Carson



Most people use Nicolai Josuttis: The C++ Standard Library. But the standard
is the definitive source.

--
John Carson


* RR:
我有Plauger关于STL的书,我发现它与STL不同
我有在Linux机器上(libstdc ++ - 2.96-112)。

特别是,我没有返回map :: erase(iterator)方法
(void),而不是iterator。


void erase(迭代器位置);

size_type erase(key_type const& x);

void erase(iterator first, iterator last);

那么,最新的C ++标准文档(INCITS / ISO / IEC 14882-2003)是否包含STL及其所有模板的最终当前标准?


不,C ++标准文档包含C ++标准,包括

C ++标准库,但是参考C89(?)标准的一些纯

C的东西,包括一些纯C标准库的东西。


STL不是C ++(早期的STL最初在Ada中实现)。


STL早于C ++的标准化(这是细菌感染的结果,而C ++是......好吧); STL的一部分是C ++

标准库的一部分; STL的一部分,例如哈希表,不是。


这是推荐的文件,以找到正确的STL语义,或者是否有更好的文档?
I have Plauger''s book on STL and I''ve found that it''s different from the STL
I have on a Linux box (libstdc++-2.96-112).

In particular, the map::erase(iterator) method I have returns nothing
(void), not "iterator".
void erase( iterator position );
size_type erase( key_type const& x );
void erase( iterator first, iterator last );
So, does the latest C++ Standards document (INCITS/ISO/IEC 14882-2003)
contain the definitive current standard for STL and all its templates?
No, the C++ standards document contains the C++ standard, including the
C++ standard library, but referring to the C89 (?) standard for some pure
C things, including some pure C standard library things.

STL is not C++ (an early STL was originally implemented in Ada).

STL predates the standardization of C++ (it was the result of a bacterial
infection, while C++ was ... well); parts of STL are part of the C++
standard library; parts of STL, e.g. hash tables, are not.

Is that the recommended document to find the correct STL semantics, or is
there a better document?




对于C ++库:C ++标准。


对于STL:例如

< url:http:// www。 cs.utexas.edu/users/lavender/courses/stl/>。

< url:http://www.sgi.com/tech/stl/>

-

答:因为它弄乱了人们通常阅读文字的顺序。

问:为什么这么糟糕?

A:热门发布。

问:usenet和电子邮件中最烦人的事情是什么?



For the C++ library: the C++ standard.

For STL: e.g.
<url: http://www.cs.utexas.edu/users/lavender/courses/stl/>.
<url: http://www.sgi.com/tech/stl/>
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


谢谢。刚刚买了这个标准,它比

Plauger更容易阅读和清晰。


而且,它回答了所有真正需要知道的问题。现在!


Alf:感谢您提供哈希等等,但您提供的URL是过时的(大约1995年)。你认为他们现在对于过去几年发售的

STL库有多有效?


-

RR
Thanks. Just bought the standard and it''s easier to read and clearer than
Plauger.

And, it answered all the questions are really needed to know right now!

Alf: thanks for the heads up on hashes, etc., but the URLs you provided are
way out of date (circa 1995). How valid do you think they are now with the
STL libraries that have been shipped in the last few years?

--
RR


这篇关于STL标准文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆