forked from boostorg/conversion
Merge quickbook workaround and fix some links.
Merged revisions 48987,49230-49231 via svnmerge from https://svn.boost.org/svn/boost/trunk ........ r48987 | danieljames | 2008-09-28 13:21:39 +0100 (Sun, 28 Sep 2008) | 1 line Clean up some link errors. ........ r49230 | danieljames | 2008-10-09 23:13:48 +0100 (Thu, 09 Oct 2008) | 1 line position_iterator is meant to be a forward iterator, so avoid using operator+ with it. ........ r49231 | danieljames | 2008-10-09 23:14:14 +0100 (Thu, 09 Oct 2008) | 4 lines Work around the problems with window newlines in position_iterator. (I'm about to fix them, but this will get quickbook working immediately). Fixes #2155 ........ [SVN r49242]
This commit is contained in:
@@ -81,7 +81,7 @@
|
|||||||
conversions, such as where precision or formatting need tighter control than is
|
conversions, such as where precision or formatting need tighter control than is
|
||||||
offered by the default behavior of <code>lexical_cast</code>, the conventional <code>
|
offered by the default behavior of <code>lexical_cast</code>, the conventional <code>
|
||||||
stringstream</code> approach is recommended. Where the conversions are
|
stringstream</code> approach is recommended. Where the conversions are
|
||||||
numeric to numeric, <code><a href="../numeric/conversion/doc/numeric_cast.html">numeric_cast</a></code>
|
numeric to numeric, <code><a href="../numeric/conversion/doc/html/boost_numericconversion/improved_numeric_cast__.html">numeric_cast</a></code>
|
||||||
may offer more reasonable behavior than <code>lexical_cast</code>.
|
may offer more reasonable behavior than <code>lexical_cast</code>.
|
||||||
<p>
|
<p>
|
||||||
For a good discussion of the options and issues involved in string-based
|
For a good discussion of the options and issues involved in string-based
|
||||||
@@ -202,9 +202,9 @@ public:
|
|||||||
Lexical conversion to these types is simply reading a byte from source but since the source has
|
Lexical conversion to these types is simply reading a byte from source but since the source has
|
||||||
more than one byte, the exception is thrown.
|
more than one byte, the exception is thrown.
|
||||||
<p>Please use other integer types such as <code>int</code> or <code>short int</code>. If bounds checking
|
<p>Please use other integer types such as <code>int</code> or <code>short int</code>. If bounds checking
|
||||||
is important, you can also call <a href="../../libs/numeric/conversion/doc/numeric_cast.html">numeric_cast</a>:
|
is important, you can also call <a href="../../libs/numeric/conversion/doc/html/boost_numericconversion/improved_numeric_cast__.html">numeric_cast</a>:
|
||||||
|
|
||||||
<pre><a href="../../libs/numeric/conversion/doc/numeric_cast.html">numeric_cast</a><int8_t>(lexical_cast<int>("127"));</pre>
|
<pre><a href="../../libs/numeric/conversion/doc/html/boost_numericconversion/improved_numeric_cast__.html">numeric_cast</a><int8_t>(lexical_cast<int>("127"));</pre>
|
||||||
|
|
||||||
<p> Q: What does <code>lexical_cast<std::string></code> of an <code>int8_t</code> or <code>uint8_t</code> not do what I expect?
|
<p> Q: What does <code>lexical_cast<std::string></code> of an <code>int8_t</code> or <code>uint8_t</code> not do what I expect?
|
||||||
<br> A: As above, note that <code>int8_t</code> and <code>uint8_t</code> are actually chars and are formatted as such. To avoid this, cast to an integer type first:
|
<br> A: As above, note that <code>int8_t</code> and <code>uint8_t</code> are actually chars and are formatted as such. To avoid this, cast to an integer type first:
|
||||||
|
Reference in New Issue
Block a user