123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
- <title>Visual C++ gotchas in VMD</title>
- <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
- <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
- <link rel="home" href="../index.html" title="Chapter 1. The Variadic Macro Data Library 1.9">
- <link rel="up" href="../index.html" title="Chapter 1. The Variadic Macro Data Library 1.9">
- <link rel="prev" href="vmd_dynamic_typing.html" title="Input as dynamic types">
- <link rel="next" href="vmd_conv.html" title="Version 1.7 to 1.8 conversion">
- </head>
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
- <table cellpadding="2" width="100%"><tr>
- <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
- <td align="center"><a href="../../../../../index.html">Home</a></td>
- <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
- <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
- <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
- <td align="center"><a href="../../../../../more/index.htm">More</a></td>
- </tr></table>
- <hr>
- <div class="spirit-nav">
- <a accesskey="p" href="vmd_dynamic_typing.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="vmd_conv.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
- </div>
- <div class="section">
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
- <a name="variadic_macro_data.vmd_vc_isms"></a><a class="link" href="vmd_vc_isms.html" title="Visual C++ gotchas in VMD">Visual C++ gotchas in
- VMD</a>
- </h2></div></div></div>
- <p>
- I have discussed throughout the documentation areas of VMD which need to be
- considered when using Microsoft's Visual C++ compilers. The VMD library supports
- VC++ versions 8 through the latest 14. These correspond to Visual Studio 2005
- through the current Visual Studio 2015.
- </p>
- <p>
- I will give here fairly briefly the VC++ quirks which should be taken into
- account when using VMD. These quirks exist because the VC++ compiler does not
- have a C++ standard conforming preprocessor. More specifically the VC++ compiler
- does not follow all of the rules correctly for expanding a macro when a macro
- is invoked. Here is a list for things to consider when using VMD with VC++:
- </p>
- <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
- <li class="listitem">
- The BOOST_VMD_IS_EMPTY macro will expand erroneously to 1 if the input
- resolves to a function-like macro name, which when it is called with an
- empty parameter expands to a tuple.
- </li>
- <li class="listitem">
- The BOOST_VMD_ASSERT macro, and the corresponding individual VMD ASSERT
- macros for the various data types, do not cause an immediate compiler error,
- but instead generate invalid C++ if the ASSERT occurs.
- </li>
- <li class="listitem">
- When the BOOST_VMD_ASSERT macro, or one of the corresponding individual
- VMD ASSERT macros for the various data types, does not generate an error,
- and the macro in which it is being used does generate some output, it is
- necessary to use BOOST_PP_CAT to concatenate the empty result of the VMD
- ASSERT macro with the normally generated output to correctly generate the
- final expansion of the macro in which the VMD ASSERT occurs.
- </li>
- <li class="listitem">
- When using BOOST_VMD_EMPTY following some non-empty expansion, or when
- using BOOST_VMD_IDENTITY, the value returned needs to be concatenated using
- BOOST_PP_CAT with an empty value. You can use BOOST_VMD_IDENTITY_RESULT
- to accomplish this transparently.
- </li>
- <li class="listitem">
- Avoid using an empty parenthesis to pass no data as a tuple or seq if VC++8
- might be used as the compiler.
- </li>
- </ul></div>
- </div>
- <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
- <td align="left"></td>
- <td align="right"><div class="copyright-footer">Copyright © 2010-2017 Tropic Software
- East Inc</div></td>
- </tr></table>
- <hr>
- <div class="spirit-nav">
- <a accesskey="p" href="vmd_dynamic_typing.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="vmd_conv.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
- </div>
- </body>
- </html>
|