Преглед изворни кода

re-worded wchar_t workaround (thanks to Ed Brey)

[SVN r8918]
Jens Maurer пре 25 година
родитељ
комит
c0d0481239
1 измењених фајлова са 9 додато и 8 уклоњено
  1. 9 8
      more/microsoft_vcpp.html

+ 9 - 8
more/microsoft_vcpp.html

@@ -41,7 +41,7 @@ The preprocessor symbol <code>_MSC_VER</code> is defined for all
 Microsoft C++ compilers.  Its value is the internal version number of the
 compiler interpreted as a decimal number.  Since a few other compilers
 also define this symbol, boost provides the symbol
-<code>BOOST_MSVC</code> defined in
+<code>BOOST_MSVC</code>, which is defined in
 <a href="../boost/config.hpp">boost/config.hpp</a>
 to the value of _MSC_VER if and only if the compiler is really
 Microsoft Visual C++.
@@ -244,14 +244,15 @@ The type <code>wchar_t</code> is not a built-in type.
 wchar_t x;  // &quot;missing storage class or type identifier&quot;
 </pre>
 
-<strong>Workaround:</strong> The header <code>&lt;cstddef></code>
-provides a typedef for <code>wchar_t</code> and
+<strong>Workaround:</strong> When using Microsoft Visual C++, the
+header
 <a href="../boost/config.hpp">boost/config.hpp</a>
-includes it to provide the workaround.  Note that this is not a
-distinct type from any other built-in type as required by the
-standard, so ambiguities when overloading on <code>wchar_t</code> may
-emanate.
-
+includes <code>&lt;cstddef></code>, which defines defines
+<code>wchar_t</code> as a typedef for <code>unsigned
+short</code>. Note that this means that the compiler does not see
+<code>wchar_t</code> and <code>unsigned short</code> as distinct
+types, as is required by the standard, and so ambiguities may emanate
+when overloading on <code>wchar_t</code>.
 
 <h2>
 Standard Library</h2>

粤ICP备19079148号