1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Macro BOOST_VMD_ASSERT_IS_IDENTIFIER</title> 5<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="index.html" title="Chapter 1. The Variadic Macro Data Library 1.9"> 8<link rel="up" href="header/boost/vmd/assert_is_identifier_hpp.html" title="Header <boost/vmd/assert_is_identifier.hpp>"> 9<link rel="prev" href="header/boost/vmd/assert_is_identifier_hpp.html" title="Header <boost/vmd/assert_is_identifier.hpp>"> 10<link rel="next" href="BOOST_VM_idm46026473094384.html" title="Macro BOOST_VMD_ASSERT_IS_IDENTIFIER_D"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 15<td align="center"><a href="../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="header/boost/vmd/assert_is_identifier_hpp.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="header/boost/vmd/assert_is_identifier_hpp.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="BOOST_VM_idm46026473094384.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="refentry"> 26<a name="BOOST_VM_idm46026473102464"></a><div class="titlepage"></div> 27<div class="refnamediv"> 28<h2><span class="refentrytitle">Macro BOOST_VMD_ASSERT_IS_IDENTIFIER</span></h2> 29<p>BOOST_VMD_ASSERT_IS_IDENTIFIER — Asserts that the sequence is an identifier. </p> 30</div> 31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="header/boost/vmd/assert_is_identifier_hpp.html" title="Header <boost/vmd/assert_is_identifier.hpp>">boost/vmd/assert_is_identifier.hpp</a>> 33 34</span>BOOST_VMD_ASSERT_IS_IDENTIFIER(...)</pre></div> 35<div class="refsect1"> 36<a name="idm46219109389648"></a><h2>Description</h2> 37<p>The macro checks that the sequence is an identifier. If it is not an identifier, it forces a compiler error.</p> 38<p>The macro normally checks for an identifier only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.</p> 39<p>... = variadic parameters</p> 40<p>The variadic parameters are:</p> 41<p>sequence = A sequence to test as an identifier. <br> 42 ids (optional) = The data may take one of two forms: it is either one or more single identifiers or a single Boost PP tuple of identifiers.</p> 43<pre class="programlisting"><span class="identifier">returns</span> <span class="special">=</span> <span class="identifier">Normally</span> <span class="identifier">the</span> <span class="identifier">macro</span> <span class="identifier">returns</span> <span class="identifier">nothing</span><span class="special">.</span> 44 45 <span class="identifier">If</span> <span class="identifier">the</span> <span class="identifier">sequence</span> <span class="identifier">is</span> <span class="identifier">an</span> <span class="identifier">identifier</span><span class="special">,</span> <span class="identifier">nothing</span> <span class="identifier">is</span> 46 <span class="identifier">output</span><span class="special">.</span> <span class="identifier">If</span> <span class="identifier">optional</span> <span class="identifier">ids</span> <span class="identifier">are</span> <span class="identifier">specified</span><span class="special">,</span> <span class="keyword">for</span> <span class="identifier">the</span> 47 <span class="identifier">sequence</span> <span class="identifier">to</span> <span class="identifier">be</span> <span class="identifier">an</span> <span class="identifier">identifier</span> <span class="identifier">it</span> <span class="identifier">must</span> <span class="identifier">be</span> <span class="identifier">an</span> 48 <span class="identifier">identifier</span> <span class="identifier">that</span> <span class="identifier">matches</span> <span class="identifier">one</span> <span class="identifier">of</span> <span class="identifier">the</span> <span class="identifier">optional</span> 49 <span class="identifier">ids</span><span class="special">.</span> 50 51 <span class="identifier">For</span> <span class="identifier">VC</span><span class="special">++</span><span class="special">,</span> <span class="identifier">because</span> <span class="identifier">there</span> <span class="identifier">is</span> <span class="identifier">no</span> <span class="identifier">sure</span> <span class="identifier">way</span> <span class="identifier">of</span> <span class="identifier">forcing</span> 52 <span class="identifier">a</span> <span class="identifier">compiler</span> <span class="identifier">error</span> <span class="identifier">from</span> <span class="identifier">within</span> <span class="identifier">a</span> <span class="identifier">macro</span> <span class="identifier">without</span> <span class="identifier">producing</span> 53 <span class="identifier">output</span><span class="special">,</span> <span class="keyword">if</span> <span class="identifier">the</span> <span class="identifier">sequence</span> <span class="identifier">is</span> <span class="identifier">not</span> <span class="identifier">an</span> <span class="identifier">identifier</span> <span class="identifier">the</span> 54 <span class="identifier">macro</span> <span class="identifier">forces</span> <span class="identifier">a</span> <span class="identifier">compiler</span> <span class="identifier">error</span> <span class="identifier">by</span> <span class="identifier">outputting</span> <span class="identifier">invalid</span> <span class="identifier">C</span><span class="special">++</span><span class="special">.</span> 55 56 <span class="identifier">For</span> <span class="identifier">all</span> <span class="identifier">other</span> <span class="identifier">compilers</span> <span class="identifier">a</span> <span class="identifier">compiler</span> <span class="identifier">error</span> <span class="identifier">is</span> <span class="identifier">forced</span> 57 <span class="identifier">without</span> <span class="identifier">producing</span> <span class="identifier">output</span> <span class="keyword">if</span> <span class="identifier">the</span> <span class="identifier">sequence</span> <span class="identifier">is</span> <span class="identifier">not</span> <span class="identifier">an</span> 58 <span class="identifier">identifier</span><span class="special">.</span> 59</pre> 60<p>Identifiers are registered in VMD with:</p> 61<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_VMD_REG_XXX</span> <span class="special">(</span><span class="identifier">XXX</span><span class="special">)</span> <span class="identifier">where</span> <span class="identifier">XXX</span> <span class="identifier">is</span> <span class="identifier">a</span> <span class="identifier">v</span><span class="special">-</span><span class="identifier">identifier</span><span class="special">.</span> 62</pre> 63<p>The identifier must be registered to be found.</p> 64<p>Identifiers are pre-detected in VMD with:</p> 65<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_VMD_DETECT_XXX_XXX</span> <span class="identifier">where</span> <span class="identifier">XXX</span> <span class="identifier">is</span> <span class="identifier">an</span> <span class="identifier">identifier</span><span class="special">.</span> 66</pre> 67<p>If you specify optional ids and have not specified the detection of an optional id, that id will never match an identifier. </p> 68</div> 69</div> 70<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 71<td align="left"></td> 72<td align="right"><div class="copyright-footer">Copyright © 2010-2017 Tropic Software 73 East Inc</div></td> 74</tr></table> 75<hr> 76<div class="spirit-nav"> 77<a accesskey="p" href="header/boost/vmd/assert_is_identifier_hpp.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="header/boost/vmd/assert_is_identifier_hpp.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="BOOST_VM_idm46026473094384.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 78</div> 79</body> 80</html> 81