File: static_warning.html

package info (click to toggle)
boost1.42 1.42.0-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 277,864 kB
  • ctags: 401,076
  • sloc: cpp: 1,235,659; xml: 74,142; ansic: 41,313; python: 26,756; sh: 11,840; cs: 2,118; makefile: 655; perl: 494; yacc: 456; asm: 353; csh: 6
file content (53 lines) | stat: -rw-r--r-- 2,536 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!--
(C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . 
Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../boost.css">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Serialization - BOOST_STATIC_WARNING</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header">
  <tr> 
    <td valign="top" width="300"> 
      <h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../boost.png" border="0"></a></h3>
    </td>
    <td valign="top"> 
      <h1 align="center">Serialization</h1>
      <h2 align="center"><code>BOOST_STATIC_WARNING</code></h2>
    </td>
  </tr>
</table>
<hr>

The header <code>&lt;boost/serialization/static_warning.hpp&gt;</code> supplies a single macro 
<code style="white-space: normal">BOOST_STATIC_WARNING(x)</code>, which generates a compile time warning message if 
the integral-constant-expression x is not true. 
<p>
Note that if the condition is true, then the macro will generate neither 
code nor data - and the macro can also be used at either namespace, 
class or function scope. When used in a template, the expression x 
will be evaluated at the time the template is instantiated; this is 
particularly useful for validating template parameters. 
<p>
It is intended that the functioning of <code style="white-space: normal">BOOST_STATIC_WARNING(x)</code>
be identical to that of <code style="white-space: normal">BOOST_STATIC_ASSERT(x)</code>
except that rather than resulting in a compilation error, it will result in
a compiler warning.  In all other respects it should be the same.  So
for more information on using <code style="white-space: normal">BOOST_STATIC_WARNING(x)</code>
consult the documentation for <code style="white-space: normal">BOOST_STATIC_ASSERT(x)</code>
<a href="../../../doc/html/boost_staticassert.html">here</a>.

<hr>
<p><i>&copy; Copyright <a href="http://www.rrsd.com">Robert Ramey</a> 2002-2004. 
Distributed under the Boost Software License, Version 1.0. (See
accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</i></p>
</body>
</html>