- Is this safe? - 14 Updates
Tim Rentsch <tr.17687@z991.linuxsc.com>: Feb 24 03:24PM -0800 > and such aspects are documented for isupper (and others) but /not/ for > isdigit. That a distinction is pointless unless isdigit is supposed to > be an exception. I think you may be misreading what is being said here (meaning in section 7.4 paragraph 2). The behavior of all <ctype.h> functions is (potentially) affected by the current locale. The functions that are noted are _only_ those functions whose locale-specific aspects occur in locales other than the "C" locale (but must not occur in the "C" locale). A function that does not have a note might still have locale-specific aspects, and in fact may have locale-specific aspects even for the "C" locale. For example, in section 7.4.1.4, there is no mention of the "C" locale, but the function iscntrl() tests for a locale-specific set of characters; thus iscntrl() may yield nonzero for control characters besides those mentioned in section 5.2.1 paragraph 3, even when called while the "C" locale is in effect. None of the above changes what isdigit() is allowed to do, which is specified as exactly the ten characters listed as decimal digits in section 5.2.1 paragraph 3. |
"Alf P. Steinbach" <alf.p.steinbach@gmail.com>: Feb 25 06:47AM +0100 On 2023-02-24 6:39 PM, David Brown wrote: > some uses of the C++ "new" operator require inclusion of a standard > library header, and both languages have standard library functions that > cannot be implemented purely in the language itself. #include <initializer_list> // std::initializer_list, for use in range based `for`. #include <new> // std::operator new, for placement `new` expressions. #include <typeinfo> // std::type/info, for using `typeid`. #if CPP_VERSION >= CPP20 # include <compare> // for checking result of spaceship operator `<=>`.
Subscribe to:
Post Comments (Atom)
|
No comments:
Post a Comment