diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
commit | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch) | |
tree | 7a7053ceb8874b28ec4b868d4c49b500008a102e /doc/html/boost_staticassert.html | |
parent | bb4dd8289b351fae6b55e303f189127a394a1edd (diff) | |
download | boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2 boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip |
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'doc/html/boost_staticassert.html')
-rw-r--r-- | doc/html/boost_staticassert.html | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/doc/html/boost_staticassert.html b/doc/html/boost_staticassert.html index 03651e18ba..efc2444c2d 100644 --- a/doc/html/boost_staticassert.html +++ b/doc/html/boost_staticassert.html @@ -1,9 +1,9 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> -<title>Chapter 26. Boost.StaticAssert</title> +<title>Chapter 28. Boost.StaticAssert</title> <link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> <link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries (BoostBook Subset)"> <link rel="prev" href="signals2/tests.html" title="Testsuite"> @@ -25,7 +25,7 @@ <div class="chapter"> <div class="titlepage"><div> <div><h2 class="title"> -<a name="boost_staticassert"></a>Chapter 26. Boost.StaticAssert</h2></div> +<a name="boost_staticassert"></a>Chapter 28. Boost.StaticAssert</h2></div> <div><div class="author"><h3 class="author"> <span class="firstname">John</span> <span class="surname">Maddock</span> </h3></div></div> @@ -43,7 +43,7 @@ </div></div> <div class="toc"> <p><b>Table of Contents</b></p> -<dl> +<dl class="toc"> <dt><span class="section"><a href="boost_staticassert.html#boost_staticassert.intro">Overview and Tutorial</a></span></dt> <dd><dl> <dt><span class="section"><a href="boost_staticassert.html#boost_staticassert.namespace">Use at namespace scope.</a></span></dt> @@ -62,14 +62,14 @@ <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="boost_staticassert.intro"></a>Overview and Tutorial</h2></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="boost_staticassert.html#boost_staticassert.namespace">Use at namespace scope.</a></span></dt> <dt><span class="section"><a href="boost_staticassert.html#boost_staticassert.function">Use at function scope</a></span></dt> <dt><span class="section"><a href="boost_staticassert.html#boost_staticassert.class">Use at class scope</a></span></dt> <dt><span class="section"><a href="boost_staticassert.html#boost_staticassert.templates">Use in templates</a></span></dt> </dl></div> <p> - The header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">static_assert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> + The header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="keyword">static_assert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> supplies two macros: </p> <pre class="programlisting"><span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span> @@ -87,22 +87,22 @@ template parameters. </p> <p> - If the C++0x <code class="computeroutput"><span class="identifier">static_assert</span></code> - feature is available, both macros will use it. For <code class="computeroutput"><span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>, - the error message with be a stringized version of <code class="computeroutput"><span class="identifier">x</span></code>. + If the C++0x <code class="computeroutput"><span class="keyword">static_assert</span></code> feature + is available, both macros will use it. For <code class="computeroutput"><span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>, + the error message will be a stringized version of <code class="computeroutput"><span class="identifier">x</span></code>. For <code class="computeroutput"><span class="identifier">BOOST_STATIC_ASSERT_MSG</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">msg</span><span class="special">)</span></code>, the error message will be the <code class="computeroutput"><span class="identifier">msg</span></code> string. </p> <p> - If the C++0x <code class="computeroutput"><span class="identifier">static_assert</span></code> - feature is not available, <code class="computeroutput"><span class="identifier">BOOST_STATIC_ASSERT_MSG</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> + If the C++0x <code class="computeroutput"><span class="keyword">static_assert</span></code> feature + is not available, <code class="computeroutput"><span class="identifier">BOOST_STATIC_ASSERT_MSG</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">msg</span><span class="special">)</span></code> will be treated as <code class="computeroutput"><span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>. </p> <p> - The material that follows assumes the C++0x <code class="computeroutput"><span class="identifier">static_assert</span></code> + The material that follows assumes the C++0x <code class="computeroutput"><span class="keyword">static_assert</span></code> feature is not available. </p> <p> @@ -134,7 +134,7 @@ <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">climits</span><span class="special">></span> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">cwchar</span><span class="special">></span> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">limits</span><span class="special">></span> -<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">static_assert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="keyword">static_assert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="keyword">namespace</span> <span class="identifier">my_conditions</span> <span class="special">{</span> @@ -177,7 +177,7 @@ obvious to the user that the template is being misused. </p> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iterator</span><span class="special">></span> -<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">static_assert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="keyword">static_assert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">RandomAccessIterator</span> <span class="special">></span> @@ -217,16 +217,16 @@ like this: </p> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">limits</span><span class="special">></span> -<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">static_assert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="keyword">static_assert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">UnsignedInt</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">myclass</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> - <span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="identifier">UnsignedInt</span><span class="special">>::</span><span class="identifier">digits</span> <span class="special">>=</span> <span class="number">16</span><span class="special">)</span> - <span class="special">&&</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="identifier">UnsignedInt</span><span class="special">>::</span><span class="identifier">is_specialized</span> - <span class="special">&&</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="identifier">UnsignedInt</span><span class="special">>::</span><span class="identifier">is_integer</span> - <span class="special">&&</span> <span class="special">!</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="identifier">UnsignedInt</span><span class="special">>::</span><span class="identifier">is_signed</span><span class="special">);</span> + <span class="identifier">BOOST_STATIC_ASSERT_MSG</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="identifier">UnsignedInt</span><span class="special">>::</span><span class="identifier">is_specialized</span><span class="special">,</span> <span class="string">"myclass can only be specialized for types with numeric_limits support."</span><span class="special">);</span> + <span class="identifier">BOOST_STATIC_ASSERT_MSG</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="identifier">UnsignedInt</span><span class="special">>::</span><span class="identifier">digits</span> <span class="special">>=</span> <span class="number">16</span><span class="special">,</span> <span class="string">"Template argument UnsignedInt must have at least 16 bits precision."</span><span class="special">)</span> + <span class="identifier">BOOST_STATIC_ASSERT_MSG</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="identifier">UnsignedInt</span><span class="special">>::</span><span class="identifier">is_integer</span><span class="special">,</span> <span class="string">"Template argument UnsignedInt must be an integer."</span><span class="special">);</span> + <span class="identifier">BOOST_STATIC_ASSERT_MSG</span><span class="special">(!</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="identifier">UnsignedInt</span><span class="special">>::</span><span class="identifier">is_signed</span><span class="special">,</span> <span class="string">"Template argument UnsignedInt must not be signed."</span><span class="special">);</span> <span class="keyword">public</span><span class="special">:</span> <span class="comment">/* details here */</span> <span class="special">};</span> @@ -266,7 +266,7 @@ </div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> -<td align="left"><p><small>Last revised: April 25, 2011 at 18:27:05 +0100</small></p></td> +<td align="left"></td> <td align="right"><div class="copyright-footer"></div></td> </tr></table> <hr> |