|
Geometry : |
Subject: [ggl] [quickbook] Algorithms quickbook sample
From: Mateusz Loskot (mateusz)
Date: 2010-02-16 13:30:49
Ivan Marin wrote:
>>> I just also checked the perfect cplusplus reference, e.g.
>>> http://www.cplusplus.com/reference/algorithm/min/,
>>>
>> I've experienced errors on this website. Personally, I prefer to
>> rely on the C++ standard.
>>
> Good to know.
>
>
> Could you point to me some errors on the cplusplus site? I use it a
> lot, so I really would like to know about the errors that maybe I'm
> doing when trusting in the site.
It's hard to collect all the issues off the top of my head, but just a
couple of them:
For instance, example on this page is incorrect:
http://www.cplusplus.com/reference/iostream/fstream/open/
because combination of std::ios::in and std::ios::app is not specified
as valid in the C++ standard, 27.8.1.3 table 92 and
"If mode is not some combination of flags shown in the table
then the open fails"
std::ios::app can be combined only with std::ios::out,
std::ios::out + std::ios::binary, nothing else.
(I'm not speaking about what compilers accept, I'm speaking what is
considered as a standard behaviour as that is supposed to be taught
by that website.)
the following may be does not qualify as an error, but at it is at least
imprecise information that may lead to wrong assumptions regarding other
std containers. It should say size_type or give explanation why size_t
is equivalent to size_type for std::string:
http://www.cplusplus.com/reference/string/string/size/
http://www.cplusplus.com/reference/string/string/find/
Best regards,
-- Mateusz Loskot, http://mateusz.loskot.net
Geometry list run by mateusz at loskot.net