]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/vmd/doc/vmd_vc_isms.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / vmd / doc / vmd_vc_isms.qbk
CommitLineData
7c673cae
FG
1[/
2 (C) Copyright Edward Diener 2011-2015
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt).
6]
7
8[section:vmd_vc_isms Visual C++ gotchas in VMD]
9
10I have discussed throughout the documentation areas of VMD which need to be
11considered when using Microsoft's Visual C++ compilers. The VMD library
12supports VC++ versions 8 through the latest 14. These correspond to
13Visual Studio 2005 through the current Visual Studio 2015.
14
15I will give here fairly briefly the VC++ quirks which should be taken
16into account when using VMD. These quirks exist because the VC++ compiler
17does not have a C++ standard conforming preprocessor. More specifically
18the VC++ compiler does not follow all of the rules correctly for expanding
19a macro when a macro is invoked. Here is a list for things to consider
20when using VMD with VC++:
21
22* The BOOST_VMD_IS_EMPTY macro will expand erroneously to 1 if the input resolves
23to a function-like macro name, which when it is called with an empty parameter
24expands to a tuple.
25
26* The BOOST_VMD_ASSERT macro, and the corresponding individual VMD ASSERT macros
27for the various data types, do not cause an immediate compiler error, but instead
28generate invalid C++ if the ASSERT occurs.
29
30* When the BOOST_VMD_ASSERT macro, or one of the corresponding individual VMD ASSERT macros
31for the various data types, does not generate an error, and the macro in which it is
32being used does generate some output, it is necessary to use BOOST_PP_CAT to
33concatenate the empty result of the VMD ASSERT macro with the normally generated output
34to correctly generate the final expansion of the macro in which the VMD ASSERT occurs.
35
36* When using BOOST_VMD_EMPTY following some non-empty expansion, or when using
37BOOST_VMD_IDENTITY, the value returned needs to be concatenated using BOOST_PP_CAT
38with an empty value. You can use BOOST_VMD_IDENTITY_RESULT to accomplish this
39transparently.
40
41* Avoid using an empty parenthesis to pass no data as a tuple or seq if VC++8 might
42be used as the compiler.
43
44[endsect]