After browsing the docs using ddox it is obvious that the standard of "one line short summary and the following lines for in depth descriptions" is not followed in phobos. This commit is mostly to see if such a fixes are wanted/accepted at all.
It's better to define enum Color { no, yes } because this enables
writing compact code like if (color) { ... }. Further setting the
variable is done using std.conv's parse which makes the code more
compact and throws if the conversion fails.
getopt does not allow handling enums. This commit introduces the
necessary changes. It updates the documentation accordingly and provides
some unittests.
r1557 relaxed some unittests, as some platforms had accuracy problem with strtold(). But the strict unittests were requirements for D; so r1557 should be reverted.
With this change, these unittests will fail on some platforms such as OSX and Gentoo. However, the unittests SHOULD fail because using strtold() on these platforms is a 'bug' -- we should provide an accurate implementation.
Related issues:
3758: Create D impementation of to!(float, string), etc.
4200: "to!real(to!string(real.min_normal))" raises std.conv.ConvError
* std.contracts: Added file and line information to enforce. Added errnoEnforce that reads and formats a message according to errno. Added corresponding ErrnoException class.
* std.encoding: For now commented out std.encoding.to.
* std.file: Fixed bug 2065
* std.format: Fixed bug in raw write for arrays
* std.getopt: Added new option stopOnFirstNonOption. Also automatically expand dubious option groups with embedded in them (useful for shebang scripts)
* std.math: improved integral powers
* std.md5: Improved signature of sum so it takes multiple arrays. Added getDigestString.
* std.path: changed signatures of test functions from bool to int. Implemented rel2abs for Windows. Improved join so that it accepts multiple paths. Got rid of some gotos with the help of scope statements.
* std.process: added getenv and setenv. Improved system() so it returns the exit code correctly on Linux.
* std.random: added the dice function - a handy (possibly biased) dice.
* std.file: added support for opening large files (not yet tested)
* std.utf: added the codeLength function. Got rid of some gotos.