forked from boostorg/type_traits
Fixed license text.
[SVN r40925]
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Background and Tutorial</title>
|
||||
<title>Background and Tutorial</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="intro.html" title=" Introduction">
|
||||
<link rel="next" href="category.html" title=" Type Traits by Category">
|
||||
<link rel="prev" href="intro.html" title="Introduction">
|
||||
<link rel="next" href="category.html" title="Type Traits by Category">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.background"></a><a href="background.html" title=" Background and Tutorial"> Background and Tutorial</a></h2></div></div></div>
|
||||
<a name="boost_typetraits.background"></a><a href="background.html" title="Background and Tutorial"> Background and Tutorial</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
The following is an updated version of the article "C++ Type traits"
|
||||
by John Maddock and Steve Cleary that appeared in the October 2000 issue of
|
||||
@@ -45,29 +46,29 @@
|
||||
Consider an example: when working with character strings, one common operation
|
||||
is to determine the length of a null terminated string. Clearly it's possible
|
||||
to write generic code that can do this, but it turns out that there are much
|
||||
more efficient methods available: for example, the C library functions <tt class="computeroutput"><span class="identifier">strlen</span></tt> and <tt class="computeroutput"><span class="identifier">wcslen</span></tt>
|
||||
more efficient methods available: for example, the C library functions <code class="computeroutput"><span class="identifier">strlen</span></code> and <code class="computeroutput"><span class="identifier">wcslen</span></code>
|
||||
are usually written in assembler, and with suitable hardware support can be
|
||||
considerably faster than a generic version written in C++. The authors of the
|
||||
C++ standard library realized this, and abstracted the properties of <tt class="computeroutput"><span class="keyword">char</span></tt> and <tt class="computeroutput"><span class="keyword">wchar_t</span></tt>
|
||||
into the class <tt class="computeroutput"><span class="identifier">char_traits</span></tt>.
|
||||
Generic code that works with character strings can simply use <tt class="computeroutput"><span class="identifier">char_traits</span><span class="special"><>::</span><span class="identifier">length</span></tt> to determine the length of a null
|
||||
terminated string, safe in the knowledge that specializations of <tt class="computeroutput"><span class="identifier">char_traits</span></tt> will use the most appropriate
|
||||
C++ standard library realized this, and abstracted the properties of <code class="computeroutput"><span class="keyword">char</span></code> and <code class="computeroutput"><span class="keyword">wchar_t</span></code>
|
||||
into the class <code class="computeroutput"><span class="identifier">char_traits</span></code>.
|
||||
Generic code that works with character strings can simply use <code class="computeroutput"><span class="identifier">char_traits</span><span class="special"><>::</span><span class="identifier">length</span></code> to determine the length of a null
|
||||
terminated string, safe in the knowledge that specializations of <code class="computeroutput"><span class="identifier">char_traits</span></code> will use the most appropriate
|
||||
method available to them.
|
||||
</p>
|
||||
<a name="boost_typetraits.background.type_traits"></a><h4>
|
||||
<a name="id385346"></a>
|
||||
<a name="boost_typetraits.background.type_traits"></a><h5>
|
||||
<a name="id437803"></a>
|
||||
<a href="background.html#boost_typetraits.background.type_traits">Type Traits</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
Class <tt class="computeroutput"><span class="identifier">char_traits</span></tt> is a classic
|
||||
Class <code class="computeroutput"><span class="identifier">char_traits</span></code> is a classic
|
||||
example of a collection of type specific properties wrapped up in a single
|
||||
class - what Nathan Myers termed a <span class="emphasis"><em>baggage class</em></span><a href="background.html#background.references">[1]</a>. In the Boost type-traits library,
|
||||
we<a href="background.html#background.references">[2]</a> have written a set of very
|
||||
specific traits classes, each of which encapsulate a single trait from the
|
||||
C++ type system; for example, is a type a pointer or a reference type? Or does
|
||||
a type have a trivial constructor, or a const-qualifier? The type-traits classes
|
||||
share a unified design: each class inherits from a the type <a href="reference/integral_constant.html" title=" integral_constant">true_type</a>
|
||||
if the type has the specified property and inherits from <a href="reference/integral_constant.html" title=" integral_constant">false_type</a>
|
||||
share a unified design: each class inherits from a the type <a href="reference/integral_constant.html" title="integral_constant">true_type</a>
|
||||
if the type has the specified property and inherits from <a href="reference/integral_constant.html" title="integral_constant">false_type</a>
|
||||
otherwise. As we will show, these classes can be used in generic programming
|
||||
to determine the properties of a given type and introduce optimizations that
|
||||
are appropriate for that case.
|
||||
@@ -76,51 +77,51 @@
|
||||
The type-traits library also contains a set of classes that perform a specific
|
||||
transformation on a type; for example, they can remove a top-level const or
|
||||
volatile qualifier from a type. Each class that performs a transformation defines
|
||||
a single typedef-member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
a single typedef-member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
that is the result of the transformation. All of the type-traits classes are
|
||||
defined inside namespace <tt class="computeroutput"><span class="identifier">boost</span></tt>;
|
||||
defined inside namespace <code class="computeroutput"><span class="identifier">boost</span></code>;
|
||||
for brevity, namespace-qualification is omitted in most of the code samples
|
||||
given.
|
||||
</p>
|
||||
<a name="boost_typetraits.background.implementation"></a><h4>
|
||||
<a name="id385469"></a>
|
||||
<a name="boost_typetraits.background.implementation"></a><h5>
|
||||
<a name="id437920"></a>
|
||||
<a href="background.html#boost_typetraits.background.implementation">Implementation</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
There are far too many separate classes contained in the type-traits library
|
||||
to give a full implementation here - see the source code in the Boost library
|
||||
for the full details - however, most of the implementation is fairly repetitive
|
||||
anyway, so here we will just give you a flavor for how some of the classes
|
||||
are implemented. Beginning with possibly the simplest class in the library,
|
||||
<tt class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></tt> inherits
|
||||
from <tt class="computeroutput"><a href="reference/integral_constant.html" title=" integral_constant">true_type</a></tt>
|
||||
only if <tt class="computeroutput"><span class="identifier">T</span></tt> is <tt class="computeroutput"><span class="keyword">void</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></code> inherits
|
||||
from <code class="computeroutput"><a href="reference/integral_constant.html" title="integral_constant">true_type</a></code>
|
||||
only if <code class="computeroutput"><span class="identifier">T</span></code> is <code class="computeroutput"><span class="keyword">void</span></code>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_void.html" title=" is_void">is_void</a> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title=" integral_constant">false_type</a><span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_void.html" title="is_void">is_void</a> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title="integral_constant">false_type</a><span class="special">{};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><></span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_void.html" title=" is_void">is_void</a><span class="special"><</span><span class="keyword">void</span><span class="special">></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title=" integral_constant">true_type</a><span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_void.html" title="is_void">is_void</a><span class="special"><</span><span class="keyword">void</span><span class="special">></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
Here we define a primary version of the template class <tt class="computeroutput"><a href="reference/is_void.html" title=" is_void">is_void</a></tt>,
|
||||
and provide a full-specialization when <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
is <tt class="computeroutput"><span class="keyword">void</span></tt>. While full specialization
|
||||
Here we define a primary version of the template class <code class="computeroutput"><a href="reference/is_void.html" title="is_void">is_void</a></code>,
|
||||
and provide a full-specialization when <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
is <code class="computeroutput"><span class="keyword">void</span></code>. While full specialization
|
||||
of a template class is an important technique, sometimes we need a solution
|
||||
that is halfway between a fully generic solution, and a full specialization.
|
||||
This is exactly the situation for which the standards committee defined partial
|
||||
template-class specialization. As an example, consider the class <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></tt>:
|
||||
template-class specialization. As an example, consider the class <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></code>:
|
||||
here we needed a primary version that handles all the cases where T is not
|
||||
a pointer, and a partial specialization to handle all the cases where T is
|
||||
a pointer:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_pointer.html" title=" is_pointer">is_pointer</a> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title=" integral_constant">false_type</a><span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_pointer.html" title="is_pointer">is_pointer</a> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title="integral_constant">false_type</a><span class="special">{};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_pointer.html" title=" is_pointer">is_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">*></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title=" integral_constant">true_type</a><span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_pointer.html" title="is_pointer">is_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">*></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
The syntax for partial specialization is somewhat arcane and could easily occupy
|
||||
@@ -152,35 +153,35 @@
|
||||
and close enough to the actual rule to be useful for everyday use.
|
||||
</p>
|
||||
<p>
|
||||
As a more complex example of partial specialization consider the class <tt class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></tt>. This
|
||||
class defines a single typedef-member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
As a more complex example of partial specialization consider the class <code class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></code>. This
|
||||
class defines a single typedef-member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
that is the same type as T but with any top-level array bounds removed; this
|
||||
is an example of a traits class that performs a transformation on a type:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="reference/remove_extent.html" title=" remove_extent">remove_extent</a>
|
||||
<span class="keyword">struct</span> <a href="reference/remove_extent.html" title="remove_extent">remove_extent</a>
|
||||
<span class="special">{</span> <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span> <span class="special">};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="reference/remove_extent.html" title=" remove_extent">remove_extent</a><span class="special"><</span><span class="identifier">T</span><span class="special">[</span><span class="identifier">N</span><span class="special">]></span>
|
||||
<span class="keyword">struct</span> <a href="reference/remove_extent.html" title="remove_extent">remove_extent</a><span class="special"><</span><span class="identifier">T</span><span class="special">[</span><span class="identifier">N</span><span class="special">]></span>
|
||||
<span class="special">{</span> <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span> <span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
The aim of <tt class="computeroutput"><a href="reference/remove_extent.html" title=" remove_extent">remove_extent</a></tt>
|
||||
The aim of <code class="computeroutput"><a href="reference/remove_extent.html" title="remove_extent">remove_extent</a></code>
|
||||
is this: imagine a generic algorithm that is passed an array type as a template
|
||||
parameter, <tt class="computeroutput"><a href="reference/remove_extent.html" title=" remove_extent">remove_extent</a></tt>
|
||||
parameter, <code class="computeroutput"><a href="reference/remove_extent.html" title="remove_extent">remove_extent</a></code>
|
||||
provides a means of determining the underlying type of the array. For example
|
||||
<tt class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">4</span><span class="special">][</span><span class="number">5</span><span class="special">]>::</span><span class="identifier">type</span></tt> would evaluate to the type <tt class="computeroutput"><span class="keyword">int</span><span class="special">[</span><span class="number">5</span><span class="special">]</span></tt>. This example also shows that the number of
|
||||
<code class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">4</span><span class="special">][</span><span class="number">5</span><span class="special">]>::</span><span class="identifier">type</span></code> would evaluate to the type <code class="computeroutput"><span class="keyword">int</span><span class="special">[</span><span class="number">5</span><span class="special">]</span></code>. This example also shows that the number of
|
||||
template parameters in a partial specialization does not have to match the
|
||||
number in the default template. However, the number of parameters that appear
|
||||
after the class name do have to match the number and type of the parameters
|
||||
in the default template.
|
||||
</p>
|
||||
<a name="boost_typetraits.background.optimized_copy"></a><h4>
|
||||
<a name="id456458"></a>
|
||||
<a name="boost_typetraits.background.optimized_copy"></a><h5>
|
||||
<a name="id490307"></a>
|
||||
<a href="background.html#boost_typetraits.background.optimized_copy">Optimized copy</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
As an example of how the type traits classes can be used, consider the standard
|
||||
library algorithm copy:
|
||||
@@ -191,24 +192,24 @@
|
||||
</pre>
|
||||
<p>
|
||||
Obviously, there's no problem writing a generic version of copy that works
|
||||
for all iterator types <tt class="computeroutput"><span class="identifier">Iter1</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">Iter2</span></tt>; however, there are
|
||||
for all iterator types <code class="computeroutput"><span class="identifier">Iter1</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">Iter2</span></code>; however, there are
|
||||
some circumstances when the copy operation can best be performed by a call
|
||||
to <tt class="computeroutput"><span class="identifier">memcpy</span></tt>. In order to implement
|
||||
copy in terms of <tt class="computeroutput"><span class="identifier">memcpy</span></tt> all
|
||||
to <code class="computeroutput"><span class="identifier">memcpy</span></code>. In order to implement
|
||||
copy in terms of <code class="computeroutput"><span class="identifier">memcpy</span></code> all
|
||||
of the following conditions need to be met:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Both of the iterator types <tt class="computeroutput"><span class="identifier">Iter1</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">Iter2</span></tt> must be pointers.
|
||||
Both of the iterator types <code class="computeroutput"><span class="identifier">Iter1</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">Iter2</span></code> must be pointers.
|
||||
</li>
|
||||
<li>
|
||||
Both <tt class="computeroutput"><span class="identifier">Iter1</span></tt> and <tt class="computeroutput"><span class="identifier">Iter2</span></tt> must point to the same type - excluding
|
||||
Both <code class="computeroutput"><span class="identifier">Iter1</span></code> and <code class="computeroutput"><span class="identifier">Iter2</span></code> must point to the same type - excluding
|
||||
const and volatile-qualifiers.
|
||||
</li>
|
||||
<li>
|
||||
The type pointed to by <tt class="computeroutput"><span class="identifier">Iter1</span></tt>
|
||||
The type pointed to by <code class="computeroutput"><span class="identifier">Iter1</span></code>
|
||||
must have a trivial assignment operator.
|
||||
</li>
|
||||
</ul></div>
|
||||
@@ -228,34 +229,33 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
If all these conditions are met then a type can be copied using <tt class="computeroutput"><span class="identifier">memcpy</span></tt> rather than using a compiler generated
|
||||
assignment operator. The type-traits library provides a class <tt class="computeroutput"><a href="reference/has_trivial_assign.html" title=" has_trivial_assign">has_trivial_assign</a></tt>,
|
||||
such that <tt class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span></tt> is true only if T has a trivial assignment
|
||||
If all these conditions are met then a type can be copied using <code class="computeroutput"><span class="identifier">memcpy</span></code> rather than using a compiler generated
|
||||
assignment operator. The type-traits library provides a class <code class="computeroutput"><a href="reference/has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a></code>,
|
||||
such that <code class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span></code> is true only if T has a trivial assignment
|
||||
operator. This class "just works" for scalar types, but has to be
|
||||
explicitly specialised for class/struct types that also happen to have a trivial
|
||||
assignment operator. In other words if <a href="reference/has_trivial_assign.html" title=" has_trivial_assign">has_trivial_assign</a>
|
||||
assignment operator. In other words if <a href="reference/has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a>
|
||||
gives the wrong answer, it will give the "safe" wrong answer - that
|
||||
trivial assignment is not allowable.
|
||||
</p>
|
||||
<p>
|
||||
The code for an optimized version of copy that uses <tt class="computeroutput"><span class="identifier">memcpy</span></tt>
|
||||
where appropriate is given in <a href="examples/copy.html" title=" An Optimized Version
|
||||
of std::copy">the
|
||||
examples</a>. The code begins by defining a template function <tt class="computeroutput"><span class="identifier">do_copy</span></tt> that performs a "slow but safe"
|
||||
copy. The last parameter passed to this function may be either a <tt class="computeroutput"><a href="reference/integral_constant.html" title=" integral_constant">true_type</a></tt>
|
||||
or a <tt class="computeroutput"><a href="reference/integral_constant.html" title=" integral_constant">false_type</a></tt>.
|
||||
The code for an optimized version of copy that uses <code class="computeroutput"><span class="identifier">memcpy</span></code>
|
||||
where appropriate is given in <a href="examples/copy.html" title="An Optimized Version of std::copy">the
|
||||
examples</a>. The code begins by defining a template function <code class="computeroutput"><span class="identifier">do_copy</span></code> that performs a "slow but safe"
|
||||
copy. The last parameter passed to this function may be either a <code class="computeroutput"><a href="reference/integral_constant.html" title="integral_constant">true_type</a></code>
|
||||
or a <code class="computeroutput"><a href="reference/integral_constant.html" title="integral_constant">false_type</a></code>.
|
||||
Following that there is an overload of do<span class="underline">copy that
|
||||
uses `memcpy`: this time the iterators are required to actually be pointers
|
||||
to the same type, and the final parameter must be a `</span>_true_type<tt class="computeroutput"><span class="special">.</span> <span class="identifier">Finally</span><span class="special">,</span> <span class="identifier">the</span> <span class="identifier">version</span>
|
||||
<span class="identifier">of</span> </tt>copy<tt class="computeroutput"> <span class="identifier">calls</span>
|
||||
</tt>do<span class="underline">copy`, passing `</span>_has_trivial_assign<value_type>()`
|
||||
to the same type, and the final parameter must be a `</span>_true_type<code class="computeroutput"><span class="special">.</span> <span class="identifier">Finally</span><span class="special">,</span> <span class="identifier">the</span> <span class="identifier">version</span>
|
||||
<span class="identifier">of</span> </code>copy<code class="computeroutput"> <span class="identifier">calls</span>
|
||||
</code>do<span class="underline">copy`, passing `</span>_has_trivial_assign<value_type>()`
|
||||
as the final parameter: this will dispatch to the optimized version where appropriate,
|
||||
otherwise it will call the "slow but safe version".
|
||||
</p>
|
||||
<a name="boost_typetraits.background.was_it_worth_it_"></a><h4>
|
||||
<a name="id456995"></a>
|
||||
<a name="boost_typetraits.background.was_it_worth_it_"></a><h5>
|
||||
<a name="id490852"></a>
|
||||
<a href="background.html#boost_typetraits.background.was_it_worth_it_">Was it worth it?</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
It has often been repeated in these columns that "premature optimization
|
||||
is the root of all evil" <a href="background.html#background.references">[4]</a>.
|
||||
@@ -286,9 +286,9 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<div class="table">
|
||||
<a name="id457059"></a><p class="title"><b>Table 1.1. Time taken to copy 1000 elements using `copy<const
|
||||
<a name="id490923"></a><p class="title"><b>Table 1.1. Time taken to copy 1000 elements using `copy<const
|
||||
T*, T*>` (times in micro-seconds)</b></p>
|
||||
<table class="table" summary="Time taken to copy 1000 elements using `copy<const
|
||||
<div class="table-contents"><table class="table" summary="Time taken to copy 1000 elements using `copy<const
|
||||
T*, T*>` (times in micro-seconds)">
|
||||
<colgroup>
|
||||
<col>
|
||||
@@ -382,12 +382,12 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<a name="boost_typetraits.background.pair_of_references"></a><h4>
|
||||
<a name="id457209"></a>
|
||||
<br class="table-break"><a name="boost_typetraits.background.pair_of_references"></a><h5>
|
||||
<a name="id491080"></a>
|
||||
<a href="background.html#boost_typetraits.background.pair_of_references">Pair of References</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The optimized copy example shows how type traits may be used to perform optimization
|
||||
decisions at compile-time. Another important usage of type traits is to allow
|
||||
@@ -397,7 +397,7 @@
|
||||
references <a href="background.html#background.references">[6]</a>.
|
||||
</p>
|
||||
<p>
|
||||
First, let us examine the definition of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></tt>, omitting
|
||||
First, let us examine the definition of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>, omitting
|
||||
the comparison operators, default constructor, and template copy constructor
|
||||
for simplicity:
|
||||
</p>
|
||||
@@ -423,8 +423,8 @@
|
||||
to hold non-reference types, references, and constant references:
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id457580"></a><p class="title"><b>Table 1.2. Required Constructor Argument Types</b></p>
|
||||
<table class="table" summary="Required Constructor Argument Types">
|
||||
<a name="id491443"></a><p class="title"><b>Table 1.2. Required Constructor Argument Types</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Required Constructor Argument Types">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -432,7 +432,7 @@
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
Type of <tt class="computeroutput"><span class="identifier">T1</span></tt>
|
||||
Type of <code class="computeroutput"><span class="identifier">T1</span></code>
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
@@ -479,18 +479,18 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<p>
|
||||
<br class="table-break"><p>
|
||||
A little familiarity with the type traits classes allows us to construct a
|
||||
single mapping that allows us to determine the type of parameter from the type
|
||||
of the contained class. The type traits classes provide a transformation <a href="reference/add_reference.html" title=" add_reference">add_reference</a>, which
|
||||
of the contained class. The type traits classes provide a transformation <a href="reference/add_reference.html" title="add_reference">add_reference</a>, which
|
||||
adds a reference to its type, unless it is already a reference.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id457708"></a><p class="title"><b>Table 1.3. Using add_reference to synthesize the correct constructor
|
||||
<a name="id491567"></a><p class="title"><b>Table 1.3. Using add_reference to synthesize the correct constructor
|
||||
type</b></p>
|
||||
<table class="table" summary="Using add_reference to synthesize the correct constructor
|
||||
<div class="table-contents"><table class="table" summary="Using add_reference to synthesize the correct constructor
|
||||
type">
|
||||
<colgroup>
|
||||
<col>
|
||||
@@ -500,17 +500,17 @@
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
Type of <tt class="computeroutput"><span class="identifier">T1</span></tt>
|
||||
Type of <code class="computeroutput"><span class="identifier">T1</span></code>
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
Type of <tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">T1</span></tt>
|
||||
Type of <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">T1</span></code>
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
Type of <tt class="computeroutput"><span class="identifier">add_reference</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">T1</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
Type of <code class="computeroutput"><span class="identifier">add_reference</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">T1</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</th>
|
||||
</tr></thead>
|
||||
@@ -567,10 +567,10 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<p>
|
||||
This allows us to build a primary template definition for <tt class="computeroutput"><span class="identifier">pair</span></tt>
|
||||
<br class="table-break"><p>
|
||||
This allows us to build a primary template definition for <code class="computeroutput"><span class="identifier">pair</span></code>
|
||||
that can contain non-reference types, reference types, and constant reference
|
||||
types:
|
||||
</p>
|
||||
@@ -584,20 +584,20 @@
|
||||
<span class="identifier">T1</span> <span class="identifier">first</span><span class="special">;</span>
|
||||
<span class="identifier">T2</span> <span class="identifier">second</span><span class="special">;</span>
|
||||
|
||||
<span class="identifier">pair</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><a href="reference/add_reference.html" title=" add_reference">add_reference</a><span class="special"><</span><span class="keyword">const</span> <span class="identifier">T1</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">nfirst</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><a href="reference/add_reference.html" title=" add_reference">add_reference</a><span class="special"><</span><span class="keyword">const</span> <span class="identifier">T2</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">nsecond</span><span class="special">)</span>
|
||||
<span class="identifier">pair</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><a href="reference/add_reference.html" title="add_reference">add_reference</a><span class="special"><</span><span class="keyword">const</span> <span class="identifier">T1</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">nfirst</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><a href="reference/add_reference.html" title="add_reference">add_reference</a><span class="special"><</span><span class="keyword">const</span> <span class="identifier">T2</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">nsecond</span><span class="special">)</span>
|
||||
<span class="special">:</span><span class="identifier">first</span><span class="special">(</span><span class="identifier">nfirst</span><span class="special">),</span> <span class="identifier">second</span><span class="special">(</span><span class="identifier">nsecond</span><span class="special">)</span> <span class="special">{</span> <span class="special">}</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
Add back in the standard comparison operators, default constructor, and template
|
||||
copy constructor (which are all the same), and you have a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></tt> that
|
||||
copy constructor (which are all the same), and you have a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code> that
|
||||
can hold reference types!
|
||||
</p>
|
||||
<p>
|
||||
This same extension could have been done using partial template specialization
|
||||
of <tt class="computeroutput"><span class="identifier">pair</span></tt>, but to specialize
|
||||
<tt class="computeroutput"><span class="identifier">pair</span></tt> in this way would require
|
||||
of <code class="computeroutput"><span class="identifier">pair</span></code>, but to specialize
|
||||
<code class="computeroutput"><span class="identifier">pair</span></code> in this way would require
|
||||
three partial specializations, plus the primary template. Type traits allows
|
||||
us to define a single primary template that adjusts itself auto-magically to
|
||||
any of these partial specializations, instead of a brute-force partial specialization
|
||||
@@ -605,10 +605,10 @@
|
||||
partial specialization to the type traits classes, resulting in code that is
|
||||
easier to maintain and easier to understand.
|
||||
</p>
|
||||
<a name="boost_typetraits.background.conclusion"></a><h4>
|
||||
<a name="id458327"></a>
|
||||
<a name="boost_typetraits.background.conclusion"></a><h5>
|
||||
<a name="id492190"></a>
|
||||
<a href="background.html#boost_typetraits.background.conclusion">Conclusion</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
We hope that in this article we have been able to give you some idea of what
|
||||
type-traits are all about. A more complete listing of the available classes
|
||||
@@ -618,18 +618,18 @@
|
||||
does not have to sink to the lowest common denominator, and that templates
|
||||
can be optimal as well as generic.
|
||||
</p>
|
||||
<a name="boost_typetraits.background.acknowledgements"></a><h4>
|
||||
<a name="id458374"></a>
|
||||
<a name="boost_typetraits.background.acknowledgements"></a><h5>
|
||||
<a name="id492491"></a>
|
||||
<a href="background.html#boost_typetraits.background.acknowledgements">Acknowledgements</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The authors would like to thank Beman Dawes and Howard Hinnant for their helpful
|
||||
comments when preparing this article.
|
||||
</p>
|
||||
<a name="background.references"></a><a name="boost_typetraits.background.references"></a><h4>
|
||||
<a name="id458410"></a>
|
||||
<a name="background.references"></a><a name="boost_typetraits.background.references"></a><h5>
|
||||
<a name="id492525"></a>
|
||||
<a href="background.html#boost_typetraits.background.references">References</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
Nathan C. Myers, C++ Report, June 1995.
|
||||
@@ -682,8 +682,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Type Traits by Category</title>
|
||||
<title>Type Traits by Category</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="background.html" title=" Background and Tutorial">
|
||||
<link rel="next" href="category/value_traits.html" title=" Type Traits
|
||||
that Describe the Properties of a Type">
|
||||
<link rel="prev" href="background.html" title="Background and Tutorial">
|
||||
<link rel="next" href="category/value_traits.html" title="Type Traits that Describe the Properties of a Type">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.category"></a><a href="category.html" title=" Type Traits by Category"> Type Traits by Category</a></h2></div></div></div>
|
||||
<a name="boost_typetraits.category"></a><a href="category.html" title="Type Traits by Category"> Type Traits by Category</a>
|
||||
</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="category/value_traits.html"> Type Traits
|
||||
that Describe the Properties of a Type</a></span></dt>
|
||||
@@ -52,8 +52,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Synthesizing Types
|
||||
with Specific Alignments</title>
|
||||
<title>Synthesizing Types with Specific Alignments</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../category.html" title=" Type Traits by Category">
|
||||
<link rel="prev" href="transform.html" title=" Type Traits that
|
||||
Transform One Type to Another">
|
||||
<link rel="next" href="function.html" title=" Decomposing Function
|
||||
Types">
|
||||
<link rel="up" href="../category.html" title="Type Traits by Category">
|
||||
<link rel="prev" href="transform.html" title="Type Traits that Transform One Type to Another">
|
||||
<link rel="next" href="function.html" title="Decomposing Function Types">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -27,24 +24,24 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.category.alignment"></a><a href="alignment.html" title=" Synthesizing Types
|
||||
with Specific Alignments"> Synthesizing Types
|
||||
with Specific Alignments</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.category.alignment"></a><a href="alignment.html" title="Synthesizing Types with Specific Alignments"> Synthesizing Types
|
||||
with Specific Alignments</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Some low level memory management routines need to synthesize a POD type with
|
||||
specific alignment properties. The template <tt class="computeroutput"><a href="../reference/type_with_alignment.html" title=" type_with_alignment">type_with_alignment</a></tt>
|
||||
finds the smallest type with a specified alignment, while template <tt class="computeroutput"><a href="../reference/aligned_storage.html" title=" aligned_storage">aligned_storage</a></tt>
|
||||
specific alignment properties. The template <code class="computeroutput"><a href="../reference/type_with_alignment.html" title="type_with_alignment">type_with_alignment</a></code>
|
||||
finds the smallest type with a specified alignment, while template <code class="computeroutput"><a href="../reference/aligned_storage.html" title="aligned_storage">aligned_storage</a></code>
|
||||
creates a type with a specific size and alignment.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Synopsis</b></span>
|
||||
<span class="bold"><strong>Synopsis</strong></span>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Align</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/type_with_alignment.html" title=" type_with_alignment">type_with_alignment</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/type_with_alignment.html" title="type_with_alignment">type_with_alignment</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Size</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Align</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/aligned_storage.html" title=" aligned_storage">aligned_storage</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/aligned_storage.html" title="aligned_storage">aligned_storage</a><span class="special">;</span>
|
||||
</pre>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -54,8 +51,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Decomposing Function
|
||||
Types</title>
|
||||
<title>Decomposing Function Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../category.html" title=" Type Traits by Category">
|
||||
<link rel="prev" href="alignment.html" title=" Synthesizing Types
|
||||
with Specific Alignments">
|
||||
<link rel="next" href="../user_defined.html" title=" User Defined Specializations">
|
||||
<link rel="up" href="../category.html" title="Type Traits by Category">
|
||||
<link rel="prev" href="alignment.html" title="Synthesizing Types with Specific Alignments">
|
||||
<link rel="next" href="../user_defined.html" title="User Defined Specializations">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -26,21 +24,21 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.category.function"></a><a href="function.html" title=" Decomposing Function
|
||||
Types"> Decomposing Function
|
||||
Types</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.category.function"></a><a href="function.html" title="Decomposing Function Types"> Decomposing Function
|
||||
Types</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The class template <a href="../reference/function_traits.html" title=" function_traits">function_traits</a>
|
||||
extracts information from function types (see also <a href="../reference/is_function.html" title=" is_function">is_function</a>).
|
||||
The class template <a href="../reference/function_traits.html" title="function_traits">function_traits</a>
|
||||
extracts information from function types (see also <a href="../reference/is_function.html" title="is_function">is_function</a>).
|
||||
This traits class allows you to tell how many arguments a function takes,
|
||||
what those argument types are, and what the return type is.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Synopsis</b></span>
|
||||
<span class="bold"><strong>Synopsis</strong></span>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Align</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/function_traits.html" title=" function_traits">function_traits</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/function_traits.html" title="function_traits">function_traits</a><span class="special">;</span>
|
||||
</pre>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -50,8 +48,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Type Traits that
|
||||
Transform One Type to Another</title>
|
||||
<title>Type Traits that Transform One Type to Another</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../category.html" title=" Type Traits by Category">
|
||||
<link rel="prev" href="value_traits/relate.html" title=" Relationships
|
||||
Between Two Types">
|
||||
<link rel="next" href="alignment.html" title=" Synthesizing Types
|
||||
with Specific Alignments">
|
||||
<link rel="up" href="../category.html" title="Type Traits by Category">
|
||||
<link rel="prev" href="value_traits/relate.html" title="Relationships Between Two Types">
|
||||
<link rel="next" href="alignment.html" title="Synthesizing Types with Specific Alignments">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -27,79 +24,78 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.category.transform"></a><a href="transform.html" title=" Type Traits that
|
||||
Transform One Type to Another"> Type Traits that
|
||||
Transform One Type to Another</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.category.transform"></a><a href="transform.html" title="Type Traits that Transform One Type to Another"> Type Traits that
|
||||
Transform One Type to Another</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The following templates transform one type to another, based upon some well-defined
|
||||
rule. Each template has a single member called <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
rule. Each template has a single member called <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
that is the result of applying the transformation to the template argument
|
||||
<tt class="computeroutput"><span class="identifier">T</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">T</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Synopsis:</b></span>
|
||||
<span class="bold"><strong>Synopsis:</strong></span>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/add_const.html" title=" add_const">add_const</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/add_const.html" title="add_const">add_const</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/add_cv.html" title=" add_cv">add_cv</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/add_cv.html" title="add_cv">add_cv</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/add_pointer.html" title=" add_pointer">add_pointer</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/add_pointer.html" title="add_pointer">add_pointer</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/add_reference.html" title=" add_reference">add_reference</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/add_reference.html" title="add_reference">add_reference</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/add_volatile.html" title=" add_volatile">add_volatile</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/add_volatile.html" title="add_volatile">add_volatile</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/decay.html" title=" decay">decay</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/decay.html" title="decay">decay</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/floating_point_promotion.html" title="
|
||||
floating_point_promotion">floating_point_promotion</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/floating_point_promotion.html" title="floating_point_promotion">floating_point_promotion</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/integral_promotion.html" title=" integral_promotion">integral_promotion</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/integral_promotion.html" title="integral_promotion">integral_promotion</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/make_signed.html" title=" make_signed">make_signed</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/make_signed.html" title="make_signed">make_signed</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/make_unsigned.html" title=" make_unsigned">make_unsigned</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/make_unsigned.html" title="make_unsigned">make_unsigned</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/promote.html" title=" promote">promote</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/promote.html" title="promote">promote</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_all_extents.html" title=" remove_all_extents">remove_all_extents</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_all_extents.html" title="remove_all_extents">remove_all_extents</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_const.html" title=" remove_const">remove_const</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_const.html" title="remove_const">remove_const</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_cv.html" title=" remove_cv">remove_cv</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_cv.html" title="remove_cv">remove_cv</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_extent.html" title=" remove_extent">remove_extent</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_extent.html" title="remove_extent">remove_extent</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_pointer.html" title=" remove_pointer">remove_pointer</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_pointer.html" title="remove_pointer">remove_pointer</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_reference.html" title=" remove_reference">remove_reference</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_reference.html" title="remove_reference">remove_reference</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_volatile.html" title=" remove_volatile">remove_volatile</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../reference/remove_volatile.html" title="remove_volatile">remove_volatile</a><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="boost_typetraits.category.transform.broken_compiler_workarounds_"></a><h4>
|
||||
<a name="id462389"></a>
|
||||
<a name="boost_typetraits.category.transform.broken_compiler_workarounds_"></a><h5>
|
||||
<a name="id496340"></a>
|
||||
<a href="transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
|
||||
Compiler Workarounds:</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
For all of these templates support for partial specialization of class templates
|
||||
is required to correctly implement the transformation. On the other hand,
|
||||
@@ -133,8 +129,8 @@
|
||||
</pre>
|
||||
<p>
|
||||
and the second part provides the library's users with a mechanism to make
|
||||
the above code work not only for <tt class="computeroutput"><span class="keyword">char</span></tt>,
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt> or other built-in type,
|
||||
the above code work not only for <code class="computeroutput"><span class="keyword">char</span></code>,
|
||||
<code class="computeroutput"><span class="keyword">int</span></code> or other built-in type,
|
||||
but for their own types as well:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
@@ -150,7 +146,7 @@
|
||||
</span></pre>
|
||||
<p>
|
||||
Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates
|
||||
to nothing on those compilers that <span class="bold"><b>do</b></span> support
|
||||
to nothing on those compilers that <span class="bold"><strong>do</strong></span> support
|
||||
partial specialization.
|
||||
</p>
|
||||
</div>
|
||||
@@ -161,8 +157,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Type Traits
|
||||
that Describe the Properties of a Type</title>
|
||||
<title>Type Traits that Describe the Properties of a Type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../category.html" title=" Type Traits by Category">
|
||||
<link rel="prev" href="../category.html" title=" Type Traits by Category">
|
||||
<link rel="next" href="value_traits/primary.html" title=" Categorizing
|
||||
a Type">
|
||||
<link rel="up" href="../category.html" title="Type Traits by Category">
|
||||
<link rel="prev" href="../category.html" title="Type Traits by Category">
|
||||
<link rel="next" href="value_traits/primary.html" title="Categorizing a Type">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -26,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.category.value_traits"></a><a href="value_traits.html" title=" Type Traits
|
||||
that Describe the Properties of a Type"> Type Traits
|
||||
that Describe the Properties of a Type</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.category.value_traits"></a><a href="value_traits.html" title="Type Traits that Describe the Properties of a Type"> Type Traits
|
||||
that Describe the Properties of a Type</a>
|
||||
</h3></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="value_traits/primary.html"> Categorizing
|
||||
a Type</a></span></dt>
|
||||
@@ -39,13 +37,13 @@
|
||||
</dl></div>
|
||||
<p>
|
||||
These traits are all <span class="emphasis"><em>value traits</em></span>, which is to say the
|
||||
traits classes all inherit from <a href="../reference/integral_constant.html" title=" integral_constant">integral_constant</a>,
|
||||
traits classes all inherit from <a href="../reference/integral_constant.html" title="integral_constant">integral_constant</a>,
|
||||
and are used to access some numerical property of a type. Often this is a
|
||||
simple true or false Boolean value, but in a few cases may be some other
|
||||
integer value (for example when dealing with type alignments, or array bounds:
|
||||
see <tt class="computeroutput"><a href="../reference/alignment_of.html" title=" alignment_of">alignment_of</a></tt>,
|
||||
<tt class="computeroutput"><a href="../reference/rank.html" title=" rank">rank</a></tt>
|
||||
and <tt class="computeroutput"><a href="../reference/extent.html" title=" extent">extent</a></tt>).
|
||||
see <code class="computeroutput"><a href="../reference/alignment_of.html" title="alignment_of">alignment_of</a></code>,
|
||||
<code class="computeroutput"><a href="../reference/rank.html" title="rank">rank</a></code>
|
||||
and <code class="computeroutput"><a href="../reference/extent.html" title="extent">extent</a></code>).
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -55,8 +53,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Categorizing
|
||||
a Type</title>
|
||||
<title>Categorizing a Type</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../value_traits.html" title=" Type Traits
|
||||
that Describe the Properties of a Type">
|
||||
<link rel="prev" href="../value_traits.html" title=" Type Traits
|
||||
that Describe the Properties of a Type">
|
||||
<link rel="next" href="properties.html" title="
|
||||
General Type Properties">
|
||||
<link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
|
||||
<link rel="prev" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
|
||||
<link rel="next" href="properties.html" title="General Type Properties">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -28,71 +24,69 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_typetraits.category.value_traits.primary"></a><a href="primary.html" title=" Categorizing
|
||||
a Type"> Categorizing
|
||||
a Type</a></h4></div></div></div>
|
||||
<a name="boost_typetraits.category.value_traits.primary"></a><a href="primary.html" title="Categorizing a Type"> Categorizing
|
||||
a Type</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
These traits identify what "kind" of type some type <tt class="computeroutput"><span class="identifier">T</span></tt> is. These are split into two groups:
|
||||
These traits identify what "kind" of type some type <code class="computeroutput"><span class="identifier">T</span></code> is. These are split into two groups:
|
||||
primary traits which are all mutually exclusive, and composite traits that
|
||||
are compositions of one or more primary traits.
|
||||
</p>
|
||||
<p>
|
||||
For any given type, exactly one primary type trait will inherit from <a href="../../reference/integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
and all the others will inherit from <a href="../../reference/integral_constant.html" title=" integral_constant">false_type</a>,
|
||||
For any given type, exactly one primary type trait will inherit from <a href="../../reference/integral_constant.html" title="integral_constant">true_type</a>,
|
||||
and all the others will inherit from <a href="../../reference/integral_constant.html" title="integral_constant">false_type</a>,
|
||||
in other words these traits are mutually exclusive.
|
||||
</p>
|
||||
<p>
|
||||
This means that <tt class="computeroutput"><a href="../../reference/is_integral.html" title=" is_integral">is_integral</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
and <tt class="computeroutput"><a href="../../reference/is_floating_point.html" title=" is_floating_point">is_floating_point</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
This means that <code class="computeroutput"><a href="../../reference/is_integral.html" title="is_integral">is_integral</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
and <code class="computeroutput"><a href="../../reference/is_floating_point.html" title="is_floating_point">is_floating_point</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
will only ever be true for built-in types; if you want to check for a user-defined
|
||||
class type that behaves "as if" it is an integral or floating
|
||||
point type, then use the <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span>
|
||||
<span class="keyword">template</span></tt> instead.
|
||||
point type, then use the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span>
|
||||
<span class="keyword">template</span></code> instead.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Synopsis:</b></span>
|
||||
<span class="bold"><strong>Synopsis:</strong></span>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_array.html" title=" is_array">is_array</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_array.html" title="is_array">is_array</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_class.html" title=" is_class">is_class</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_class.html" title="is_class">is_class</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_complex.html" title=" is_complex">is_complex</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_complex.html" title="is_complex">is_complex</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_enum.html" title=" is_enum">is_enum</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_enum.html" title="is_enum">is_enum</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_floating_point.html" title=" is_floating_point">is_floating_point</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_floating_point.html" title="is_floating_point">is_floating_point</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_function.html" title=" is_function">is_function</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_function.html" title="is_function">is_function</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_integral.html" title=" is_integral">is_integral</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_integral.html" title="is_integral">is_integral</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_member_function_pointer.html" title="
|
||||
is_member_function_pointer">is_member_function_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_member_function_pointer.html" title="is_member_function_pointer">is_member_function_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_member_object_pointer.html" title="
|
||||
is_member_object_pointer">is_member_object_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_member_object_pointer.html" title="is_member_object_pointer">is_member_object_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_pointer.html" title=" is_pointer">is_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_pointer.html" title="is_pointer">is_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_reference.html" title=" is_reference">is_reference</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_reference.html" title="is_reference">is_reference</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_union.html" title=" is_union">is_union</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_union.html" title="is_union">is_union</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_void.html" title=" is_void">is_void</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_void.html" title="is_void">is_void</a><span class="special"><</span><span class="identifier">T</span><span class="special">>;</span>
|
||||
</pre>
|
||||
<p>
|
||||
The following traits are made up of the union of one or more type categorizations.
|
||||
@@ -101,22 +95,22 @@
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_arithmetic.html" title=" is_arithmetic">is_arithmetic</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_arithmetic.html" title="is_arithmetic">is_arithmetic</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_compound.html" title=" is_compound">is_compound</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_compound.html" title="is_compound">is_compound</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_fundamental.html" title=" is_fundamental">is_fundamental</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_fundamental.html" title="is_fundamental">is_fundamental</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_member_pointer.html" title=" is_member_pointer">is_member_pointer</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_member_pointer.html" title="is_member_pointer">is_member_pointer</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_object.html" title=" is_object">is_object</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_object.html" title="is_object">is_object</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_scalar.html" title=" is_scalar">is_scalar</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_scalar.html" title="is_scalar">is_scalar</a><span class="special">;</span>
|
||||
</pre>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -126,8 +120,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
General Type Properties</title>
|
||||
<title>General Type Properties</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../value_traits.html" title=" Type Traits
|
||||
that Describe the Properties of a Type">
|
||||
<link rel="prev" href="primary.html" title=" Categorizing
|
||||
a Type">
|
||||
<link rel="next" href="relate.html" title=" Relationships
|
||||
Between Two Types">
|
||||
<link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
|
||||
<link rel="prev" href="primary.html" title="Categorizing a Type">
|
||||
<link rel="next" href="relate.html" title="Relationships Between Two Types">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -28,91 +24,87 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_typetraits.category.value_traits.properties"></a><a href="properties.html" title="
|
||||
General Type Properties">
|
||||
General Type Properties</a></h4></div></div></div>
|
||||
<a name="boost_typetraits.category.value_traits.properties"></a><a href="properties.html" title="General Type Properties">
|
||||
General Type Properties</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The following templates describe the general properties of a type.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Synopsis:</b></span>
|
||||
<span class="bold"><strong>Synopsis:</strong></span>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/alignment_of.html" title=" alignment_of">alignment_of</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/alignment_of.html" title="alignment_of">alignment_of</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_nothrow_assign.html" title=" has_nothrow_assign">has_nothrow_assign</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_nothrow_assign.html" title="has_nothrow_assign">has_nothrow_assign</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_nothrow_constructor.html" title="
|
||||
has_nothrow_constructor">has_nothrow_constructor</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_nothrow_constructor.html" title="has_nothrow_constructor">has_nothrow_constructor</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_nothrow_constructor.html" title="
|
||||
has_nothrow_constructor">has_nothrow_default_constructor</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_nothrow_constructor.html" title="has_nothrow_constructor">has_nothrow_default_constructor</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_nothrow_copy.html" title=" has_nothrow_copy">has_nothrow_copy</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_nothrow_copy.html" title="has_nothrow_copy">has_nothrow_copy</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_nothrow_copy.html" title=" has_nothrow_copy">has_nothrow_copy_constructor</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_nothrow_copy.html" title="has_nothrow_copy">has_nothrow_copy_constructor</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_assign.html" title=" has_trivial_assign">has_trivial_assign</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_constructor.html" title="
|
||||
has_trivial_constructor">has_trivial_constructor</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_constructor.html" title="has_trivial_constructor">has_trivial_constructor</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_constructor.html" title="
|
||||
has_trivial_constructor">has_trivial_default_constructor</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_constructor.html" title="has_trivial_constructor">has_trivial_default_constructor</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_copy.html" title=" has_trivial_copy">has_trivial_copy</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_copy.html" title="has_trivial_copy">has_trivial_copy</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_copy.html" title=" has_trivial_copy">has_trivial_copy_constructor</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_copy.html" title="has_trivial_copy">has_trivial_copy_constructor</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_destructor.html" title=" has_trivial_destructor">has_trivial_destructor</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_trivial_destructor.html" title="has_trivial_destructor">has_trivial_destructor</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_virtual_destructor.html" title=" has_virtual_destructor">has_virtual_destructor</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/has_virtual_destructor.html" title="has_virtual_destructor">has_virtual_destructor</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_abstract.html" title=" is_abstract">is_abstract</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_abstract.html" title="is_abstract">is_abstract</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_const.html" title=" is_const">is_const</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_const.html" title="is_const">is_const</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_empty.html" title=" is_empty">is_empty</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_empty.html" title="is_empty">is_empty</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_stateless.html" title=" is_stateless">is_stateless</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_stateless.html" title="is_stateless">is_stateless</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_pod.html" title=" is_pod">is_pod</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_pod.html" title="is_pod">is_pod</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_polymorphic.html" title=" is_polymorphic">is_polymorphic</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_polymorphic.html" title="is_polymorphic">is_polymorphic</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_signed.html" title=" is_signed">is_signed</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_signed.html" title="is_signed">is_signed</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_unsigned.html" title=" is_unsigned">is_unsigned</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_unsigned.html" title="is_unsigned">is_unsigned</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_volatile.html" title=" is_volatile">is_volatile</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_volatile.html" title="is_volatile">is_volatile</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span> <span class="special">=</span> <span class="number">0</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/extent.html" title=" extent">extent</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/extent.html" title="extent">extent</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/rank.html" title=" rank">rank</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/rank.html" title="rank">rank</a><span class="special">;</span>
|
||||
</pre>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -122,8 +114,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Relationships
|
||||
Between Two Types</title>
|
||||
<title>Relationships Between Two Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../value_traits.html" title=" Type Traits
|
||||
that Describe the Properties of a Type">
|
||||
<link rel="prev" href="properties.html" title="
|
||||
General Type Properties">
|
||||
<link rel="next" href="../transform.html" title=" Type Traits that
|
||||
Transform One Type to Another">
|
||||
<link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
|
||||
<link rel="prev" href="properties.html" title="General Type Properties">
|
||||
<link rel="next" href="../transform.html" title="Type Traits that Transform One Type to Another">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -28,25 +24,25 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_typetraits.category.value_traits.relate"></a><a href="relate.html" title=" Relationships
|
||||
Between Two Types"> Relationships
|
||||
Between Two Types</a></h4></div></div></div>
|
||||
<a name="boost_typetraits.category.value_traits.relate"></a><a href="relate.html" title="Relationships Between Two Types"> Relationships
|
||||
Between Two Types</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
These templates determine the whether there is a relationship between two
|
||||
types:
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Synopsis:</b></span>
|
||||
<span class="bold"><strong>Synopsis:</strong></span>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Base</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_base_of.html" title=" is_base_of">is_base_of</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_base_of.html" title="is_base_of">is_base_of</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">From</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">To</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_convertible.html" title=" is_convertible">is_convertible</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_convertible.html" title="is_convertible">is_convertible</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_same.html" title=" is_same">is_same</a><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <a href="../../reference/is_same.html" title="is_same">is_same</a><span class="special">;</span>
|
||||
</pre>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -56,8 +52,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Credits</title>
|
||||
<title>Credits</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="reference/type_with_alignment.html" title=" type_with_alignment">
|
||||
<link rel="prev" href="reference/type_with_alignment.html" title="type_with_alignment">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -23,7 +23,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.credits"></a><a href="credits.html" title=" Credits"> Credits</a></h2></div></div></div>
|
||||
<a name="boost_typetraits.credits"></a><a href="credits.html" title="Credits"> Credits</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
This documentation was pulled together by John Maddock, using <a href="../../../tools/quickbook/doc/html/index.html" target="_top">Boost.Quickbook</a>
|
||||
and <a href="../boostbook.html" target="_top">Boost.DocBook</a>.
|
||||
@@ -48,7 +49,7 @@
|
||||
Aleksey Gurtovoy added MPL integration to the library.
|
||||
</p>
|
||||
<p>
|
||||
The <a href="reference/is_convertible.html" title=" is_convertible">is_convertible</a>
|
||||
The <a href="reference/is_convertible.html" title="is_convertible">is_convertible</a>
|
||||
template is based on code originally devised by Andrei Alexandrescu, see "<a href="http://www.cuj.com/experts/1810/alexandr.htm?topic=experts" target="_top">Generic<Programming>:
|
||||
Mappings between Types and Values</a>".
|
||||
</p>
|
||||
@@ -65,8 +66,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Examples</title>
|
||||
<title>Examples</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="mpl.html" title=" MPL Interoperability">
|
||||
<link rel="next" href="examples/copy.html" title=" An Optimized Version
|
||||
of std::copy">
|
||||
<link rel="prev" href="mpl.html" title="MPL Interoperability">
|
||||
<link rel="next" href="examples/copy.html" title="An Optimized Version of std::copy">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.examples"></a><a href="examples.html" title=" Examples"> Examples</a></h2></div></div></div>
|
||||
<a name="boost_typetraits.examples"></a><a href="examples.html" title="Examples"> Examples</a>
|
||||
</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="examples/copy.html"> An Optimized Version
|
||||
of std::copy</a></span></dt>
|
||||
@@ -46,8 +46,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> An Optimized Version
|
||||
of std::copy</title>
|
||||
<title>An Optimized Version of std::copy</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../examples.html" title=" Examples">
|
||||
<link rel="prev" href="../examples.html" title=" Examples">
|
||||
<link rel="next" href="fill.html" title=" An Optimised Version
|
||||
of std::fill">
|
||||
<link rel="up" href="../examples.html" title="Examples">
|
||||
<link rel="prev" href="../examples.html" title="Examples">
|
||||
<link rel="next" href="fill.html" title="An Optimised Version of std::fill">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -26,13 +24,13 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.examples.copy"></a><a href="copy.html" title=" An Optimized Version
|
||||
of std::copy"> An Optimized Version
|
||||
of std::copy</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.examples.copy"></a><a href="copy.html" title="An Optimized Version of std::copy"> An Optimized Version
|
||||
of std::copy</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Demonstrates a version of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span></tt>
|
||||
that uses <tt class="computeroutput"><a href="../reference/has_trivial_assign.html" title=" has_trivial_assign">has_trivial_assign</a></tt>
|
||||
to determine whether to use <tt class="computeroutput"><span class="identifier">memcpy</span></tt>
|
||||
Demonstrates a version of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span></code>
|
||||
that uses <code class="computeroutput"><a href="../reference/has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a></code>
|
||||
to determine whether to use <code class="computeroutput"><span class="identifier">memcpy</span></code>
|
||||
to optimise the copy operation (see <a href="../../../../libs/type_traits/examples/copy_example.cpp" target="_top">copy_example.cpp</a>):
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
@@ -45,7 +43,7 @@
|
||||
<span class="keyword">namespace</span> <span class="identifier">detail</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">I1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">I2</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">b</span><span class="special">></span>
|
||||
<span class="identifier">I2</span> <span class="identifier">copy_imp</span><span class="special">(</span><span class="identifier">I1</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">I1</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">I2</span> <span class="identifier">out</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span> <span class="identifier">b</span><span class="special">>&)</span>
|
||||
<span class="identifier">I2</span> <span class="identifier">copy_imp</span><span class="special">(</span><span class="identifier">I1</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">I1</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">I2</span> <span class="identifier">out</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span> <span class="identifier">b</span><span class="special">>&)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">while</span><span class="special">(</span><span class="identifier">first</span> <span class="special">!=</span> <span class="identifier">last</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
@@ -57,7 +55,7 @@
|
||||
<span class="special">}</span>
|
||||
|
||||
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="identifier">T</span><span class="special">*</span> <span class="identifier">copy_imp</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">first</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">out</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title=" integral_constant">true_type</a><span class="special">&)</span>
|
||||
<span class="identifier">T</span><span class="special">*</span> <span class="identifier">copy_imp</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">first</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">out</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">&)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">memcpy</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">first</span><span class="special">,</span> <span class="special">(</span><span class="identifier">last</span><span class="special">-</span><span class="identifier">first</span><span class="special">)*</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">));</span>
|
||||
<span class="keyword">return</span> <span class="identifier">out</span><span class="special">+(</span><span class="identifier">last</span><span class="special">-</span><span class="identifier">first</span><span class="special">);</span>
|
||||
@@ -75,7 +73,7 @@
|
||||
</span> <span class="comment">// requirement we detect with overload resolution):
|
||||
</span> <span class="comment">//
|
||||
</span> <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">I1</span><span class="special">>::</span><span class="identifier">value_type</span> <span class="identifier">value_type</span><span class="special">;</span>
|
||||
<span class="keyword">return</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">copy_imp</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/has_trivial_assign.html" title=" has_trivial_assign">has_trivial_assign</a><span class="special"><</span><span class="identifier">value_type</span><span class="special">>());</span>
|
||||
<span class="keyword">return</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">copy_imp</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a><span class="special"><</span><span class="identifier">value_type</span><span class="special">>());</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
</div>
|
||||
@@ -86,8 +84,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> An Example that
|
||||
Omits Destructor Calls For Types with Trivial Destructors</title>
|
||||
<title>An Example that Omits Destructor Calls For Types with Trivial Destructors</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../examples.html" title=" Examples">
|
||||
<link rel="prev" href="fill.html" title=" An Optimised Version
|
||||
of std::fill">
|
||||
<link rel="next" href="iter.html" title=" An improved Version
|
||||
of std::iter_swap">
|
||||
<link rel="up" href="../examples.html" title="Examples">
|
||||
<link rel="prev" href="fill.html" title="An Optimised Version of std::fill">
|
||||
<link rel="next" href="iter.html" title="An improved Version of std::iter_swap">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -27,11 +24,11 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.examples.destruct"></a><a href="destruct.html" title=" An Example that
|
||||
Omits Destructor Calls For Types with Trivial Destructors"> An Example that
|
||||
Omits Destructor Calls For Types with Trivial Destructors</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.examples.destruct"></a><a href="destruct.html" title="An Example that Omits Destructor Calls For Types with Trivial Destructors"> An Example that
|
||||
Omits Destructor Calls For Types with Trivial Destructors</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Demonstrates a simple algorithm that uses <tt class="computeroutput"><span class="identifier">__has_trivial_destruct</span></tt>
|
||||
Demonstrates a simple algorithm that uses <code class="computeroutput"><span class="identifier">__has_trivial_destruct</span></code>
|
||||
to determine whether to destructors need to be called (see <a href="../../../../libs/type_traits/examples/trivial_destructor_example.cpp" target="_top">trivial_destructor_example.cpp</a>):
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
@@ -44,7 +41,7 @@
|
||||
<span class="keyword">namespace</span> <span class="identifier">detail</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">void</span> <span class="identifier">do_destroy_array</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title=" integral_constant">false_type</a><span class="special">&)</span>
|
||||
<span class="keyword">void</span> <span class="identifier">do_destroy_array</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title="integral_constant">false_type</a><span class="special">&)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">while</span><span class="special">(</span><span class="identifier">first</span> <span class="special">!=</span> <span class="identifier">last</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
@@ -54,7 +51,7 @@
|
||||
<span class="special">}</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">inline</span> <span class="keyword">void</span> <span class="identifier">do_destroy_array</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title=" integral_constant">true_type</a><span class="special">&)</span>
|
||||
<span class="keyword">inline</span> <span class="keyword">void</span> <span class="identifier">do_destroy_array</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">&)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="special">}</span>
|
||||
|
||||
@@ -63,7 +60,7 @@
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">inline</span> <span class="keyword">void</span> <span class="identifier">destroy_array</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="identifier">p1</span><span class="special">,</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">p2</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">detail</span><span class="special">::</span><span class="identifier">do_destroy_array</span><span class="special">(</span><span class="identifier">p1</span><span class="special">,</span> <span class="identifier">p2</span><span class="special">,</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/has_trivial_destructor.html" title=" has_trivial_destructor">has_trivial_destructor</a><span class="special"><</span><span class="identifier">T</span><span class="special">>());</span>
|
||||
<span class="identifier">detail</span><span class="special">::</span><span class="identifier">do_destroy_array</span><span class="special">(</span><span class="identifier">p1</span><span class="special">,</span> <span class="identifier">p2</span><span class="special">,</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/has_trivial_destructor.html" title="has_trivial_destructor">has_trivial_destructor</a><span class="special"><</span><span class="identifier">T</span><span class="special">>());</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
</div>
|
||||
@@ -74,8 +71,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> An Optimised Version
|
||||
of std::fill</title>
|
||||
<title>An Optimised Version of std::fill</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../examples.html" title=" Examples">
|
||||
<link rel="prev" href="copy.html" title=" An Optimized Version
|
||||
of std::copy">
|
||||
<link rel="next" href="destruct.html" title=" An Example that
|
||||
Omits Destructor Calls For Types with Trivial Destructors">
|
||||
<link rel="up" href="../examples.html" title="Examples">
|
||||
<link rel="prev" href="copy.html" title="An Optimized Version of std::copy">
|
||||
<link rel="next" href="destruct.html" title="An Example that Omits Destructor Calls For Types with Trivial Destructors">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -27,13 +24,13 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.examples.fill"></a><a href="fill.html" title=" An Optimised Version
|
||||
of std::fill"> An Optimised Version
|
||||
of std::fill</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.examples.fill"></a><a href="fill.html" title="An Optimised Version of std::fill"> An Optimised Version
|
||||
of std::fill</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Demonstrates a version of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fill</span></tt>
|
||||
that uses <tt class="computeroutput"><a href="../reference/has_trivial_assign.html" title=" has_trivial_assign">has_trivial_assign</a></tt>
|
||||
to determine whether to use <tt class="computeroutput"><span class="identifier">memset</span></tt>
|
||||
Demonstrates a version of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fill</span></code>
|
||||
that uses <code class="computeroutput"><a href="../reference/has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a></code>
|
||||
to determine whether to use <code class="computeroutput"><span class="identifier">memset</span></code>
|
||||
to optimise the fill operation (see <a href="../../../../libs/type_traits/examples/fill_example.cpp" target="_top">fill_example.cpp</a>):
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
@@ -44,7 +41,7 @@
|
||||
</span><span class="keyword">namespace</span> <span class="identifier">detail</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">I</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">b</span><span class="special">></span>
|
||||
<span class="keyword">void</span> <span class="identifier">do_fill</span><span class="special">(</span><span class="identifier">I</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">I</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">val</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span> <span class="identifier">b</span><span class="special">>&)</span>
|
||||
<span class="keyword">void</span> <span class="identifier">do_fill</span><span class="special">(</span><span class="identifier">I</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">I</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">val</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span> <span class="identifier">b</span><span class="special">>&)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">while</span><span class="special">(</span><span class="identifier">first</span> <span class="special">!=</span> <span class="identifier">last</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
@@ -54,7 +51,7 @@
|
||||
<span class="special">}</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">void</span> <span class="identifier">do_fill</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">val</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title=" integral_constant">true_type</a><span class="special">&)</span>
|
||||
<span class="keyword">void</span> <span class="identifier">do_fill</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">last</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">val</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">&)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">memset</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">val</span><span class="special">,</span> <span class="identifier">last</span><span class="special">-</span><span class="identifier">first</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
@@ -68,8 +65,8 @@
|
||||
</span> <span class="comment">// We can do an optimised fill if T has a trivial assignment
|
||||
</span> <span class="comment">// operator and if it's size is one:
|
||||
</span> <span class="comment">//
|
||||
</span> <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span>
|
||||
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/has_trivial_assign.html" title=" has_trivial_assign">has_trivial_assign</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span> <span class="special">&&</span> <span class="special">(</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span> <span class="special">==</span> <span class="number">1</span><span class="special">)></span> <span class="identifier">truth_type</span><span class="special">;</span>
|
||||
</span> <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span>
|
||||
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span> <span class="special">&&</span> <span class="special">(</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span> <span class="special">==</span> <span class="number">1</span><span class="special">)></span> <span class="identifier">truth_type</span><span class="special">;</span>
|
||||
<span class="identifier">detail</span><span class="special">::</span><span class="identifier">do_fill</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">val</span><span class="special">,</span> <span class="identifier">truth_type</span><span class="special">());</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
@@ -81,8 +78,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> An improved Version
|
||||
of std::iter_swap</title>
|
||||
<title>An improved Version of std::iter_swap</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../examples.html" title=" Examples">
|
||||
<link rel="prev" href="destruct.html" title=" An Example that
|
||||
Omits Destructor Calls For Types with Trivial Destructors">
|
||||
<link rel="next" href="to_double.html" title=" Convert Numeric
|
||||
Types and Enums to double">
|
||||
<link rel="up" href="../examples.html" title="Examples">
|
||||
<link rel="prev" href="destruct.html" title="An Example that Omits Destructor Calls For Types with Trivial Destructors">
|
||||
<link rel="next" href="to_double.html" title="Convert Numeric Types and Enums to double">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -27,14 +24,14 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.examples.iter"></a><a href="iter.html" title=" An improved Version
|
||||
of std::iter_swap"> An improved Version
|
||||
of std::iter_swap</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.examples.iter"></a><a href="iter.html" title="An improved Version of std::iter_swap"> An improved Version
|
||||
of std::iter_swap</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Demonstrates a version of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iter_swap</span></tt>
|
||||
Demonstrates a version of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iter_swap</span></code>
|
||||
that use type traits to determine whether an it's arguments are proxying
|
||||
iterators or not, if they're not then it just does a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">swap</span></tt>
|
||||
of it's dereferenced arguments (the same as <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iter_swap</span></tt>
|
||||
iterators or not, if they're not then it just does a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">swap</span></code>
|
||||
of it's dereferenced arguments (the same as <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iter_swap</span></code>
|
||||
does), however if they are proxying iterators then takes special care over
|
||||
the swap to ensure that the algorithm works correctly for both proxying iterators,
|
||||
and even iterators of different types (see <a href="../../../../libs/type_traits/examples/iter_swap_example.cpp" target="_top">iter_swap_example.cpp</a>):
|
||||
@@ -48,7 +45,7 @@
|
||||
</span><span class="keyword">namespace</span> <span class="identifier">detail</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">I</span><span class="special">></span>
|
||||
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">do_swap</span><span class="special">(</span><span class="identifier">I</span> <span class="identifier">one</span><span class="special">,</span> <span class="identifier">I</span> <span class="identifier">two</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title=" integral_constant">false_type</a><span class="special">&)</span>
|
||||
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">do_swap</span><span class="special">(</span><span class="identifier">I</span> <span class="identifier">one</span><span class="special">,</span> <span class="identifier">I</span> <span class="identifier">two</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title="integral_constant">false_type</a><span class="special">&)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">value_type</span> <span class="identifier">v_t</span><span class="special">;</span>
|
||||
<span class="identifier">v_t</span> <span class="identifier">v</span> <span class="special">=</span> <span class="special">*</span><span class="identifier">one</span><span class="special">;</span>
|
||||
@@ -56,7 +53,7 @@
|
||||
<span class="special">*</span><span class="identifier">two</span> <span class="special">=</span> <span class="identifier">v</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">I</span><span class="special">></span>
|
||||
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">do_swap</span><span class="special">(</span><span class="identifier">I</span> <span class="identifier">one</span><span class="special">,</span> <span class="identifier">I</span> <span class="identifier">two</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title=" integral_constant">true_type</a><span class="special">&)</span>
|
||||
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">do_swap</span><span class="special">(</span><span class="identifier">I</span> <span class="identifier">one</span><span class="special">,</span> <span class="identifier">I</span> <span class="identifier">two</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">&)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">swap</span><span class="special">;</span>
|
||||
<span class="identifier">swap</span><span class="special">(*</span><span class="identifier">one</span><span class="special">,</span> <span class="special">*</span><span class="identifier">two</span><span class="special">);</span>
|
||||
@@ -74,10 +71,10 @@
|
||||
</span> <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">I1</span><span class="special">>::</span><span class="identifier">reference</span> <span class="identifier">r1_t</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">I2</span><span class="special">>::</span><span class="identifier">reference</span> <span class="identifier">r2_t</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span>
|
||||
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/is_reference.html" title=" is_reference">is_reference</a><span class="special"><</span><span class="identifier">r1_t</span><span class="special">>::</span><span class="identifier">value</span>
|
||||
<span class="special">&&</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/is_reference.html" title=" is_reference">is_reference</a><span class="special"><</span><span class="identifier">r2_t</span><span class="special">>::</span><span class="identifier">value</span>
|
||||
<span class="special">&&</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/is_same.html" title=" is_same">is_same</a><span class="special"><</span><span class="identifier">r1_t</span><span class="special">,</span> <span class="identifier">r2_t</span><span class="special">>::</span><span class="identifier">value</span><span class="special">></span> <span class="identifier">truth_type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><a href="../reference/integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span>
|
||||
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/is_reference.html" title="is_reference">is_reference</a><span class="special"><</span><span class="identifier">r1_t</span><span class="special">>::</span><span class="identifier">value</span>
|
||||
<span class="special">&&</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/is_reference.html" title="is_reference">is_reference</a><span class="special"><</span><span class="identifier">r2_t</span><span class="special">>::</span><span class="identifier">value</span>
|
||||
<span class="special">&&</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><a href="../reference/is_same.html" title="is_same">is_same</a><span class="special"><</span><span class="identifier">r1_t</span><span class="special">,</span> <span class="identifier">r2_t</span><span class="special">>::</span><span class="identifier">value</span><span class="special">></span> <span class="identifier">truth_type</span><span class="special">;</span>
|
||||
|
||||
<span class="identifier">detail</span><span class="special">::</span><span class="identifier">do_swap</span><span class="special">(</span><span class="identifier">one</span><span class="special">,</span> <span class="identifier">two</span><span class="special">,</span> <span class="identifier">truth_type</span><span class="special">());</span>
|
||||
<span class="special">}</span>
|
||||
@@ -90,8 +87,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Convert Numeric
|
||||
Types and Enums to double</title>
|
||||
<title>Convert Numeric Types and Enums to double</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../examples.html" title=" Examples">
|
||||
<link rel="prev" href="iter.html" title=" An improved Version
|
||||
of std::iter_swap">
|
||||
<link rel="next" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="up" href="../examples.html" title="Examples">
|
||||
<link rel="prev" href="iter.html" title="An improved Version of std::iter_swap">
|
||||
<link rel="next" href="../reference.html" title="Alphabetical Reference">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -26,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.examples.to_double"></a><a href="to_double.html" title=" Convert Numeric
|
||||
Types and Enums to double"> Convert Numeric
|
||||
Types and Enums to double</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.examples.to_double"></a><a href="to_double.html" title="Convert Numeric Types and Enums to double"> Convert Numeric
|
||||
Types and Enums to double</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Demonstrates a conversion of <a href="../../../../libs/numeric/conversion/doc/definitions.html#numtypes" target="_top">Numeric
|
||||
Types</a> and enum types to double:
|
||||
@@ -49,8 +47,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Support for Compiler Intrinsics</title>
|
||||
<title>Support for Compiler Intrinsics</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="user_defined.html" title=" User Defined Specializations">
|
||||
<link rel="next" href="mpl.html" title=" MPL Interoperability">
|
||||
<link rel="prev" href="user_defined.html" title="User Defined Specializations">
|
||||
<link rel="next" href="mpl.html" title="MPL Interoperability">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.intrinsics"></a><a href="intrinsics.html" title=" Support for Compiler Intrinsics"> Support for Compiler Intrinsics</a></h2></div></div></div>
|
||||
<a name="boost_typetraits.intrinsics"></a><a href="intrinsics.html" title="Support for Compiler Intrinsics"> Support for Compiler Intrinsics</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
There are some traits that can not be implemented within the current C++ language:
|
||||
to make these traits "just work" with user defined types, some kind
|
||||
@@ -37,18 +38,16 @@
|
||||
for all types (but all have safe fallback positions if this support is unavailable):
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="reference/is_union.html" title=" is_union">is_union</a></li>
|
||||
<li><a href="reference/is_pod.html" title=" is_pod">is_pod</a></li>
|
||||
<li><a href="reference/has_trivial_constructor.html" title="
|
||||
has_trivial_constructor">has_trivial_constructor</a></li>
|
||||
<li><a href="reference/has_trivial_copy.html" title=" has_trivial_copy">has_trivial_copy</a></li>
|
||||
<li><a href="reference/has_trivial_assign.html" title=" has_trivial_assign">has_trivial_assign</a></li>
|
||||
<li><a href="reference/has_trivial_destructor.html" title=" has_trivial_destructor">has_trivial_destructor</a></li>
|
||||
<li><a href="reference/has_nothrow_constructor.html" title="
|
||||
has_nothrow_constructor">has_nothrow_constructor</a></li>
|
||||
<li><a href="reference/has_nothrow_copy.html" title=" has_nothrow_copy">has_nothrow_copy</a></li>
|
||||
<li><a href="reference/has_nothrow_assign.html" title=" has_nothrow_assign">has_nothrow_assign</a></li>
|
||||
<li><a href="reference/has_virtual_destructor.html" title=" has_virtual_destructor">has_virtual_destructor</a></li>
|
||||
<li><a href="reference/is_union.html" title="is_union">is_union</a></li>
|
||||
<li><a href="reference/is_pod.html" title="is_pod">is_pod</a></li>
|
||||
<li><a href="reference/has_trivial_constructor.html" title="has_trivial_constructor">has_trivial_constructor</a></li>
|
||||
<li><a href="reference/has_trivial_copy.html" title="has_trivial_copy">has_trivial_copy</a></li>
|
||||
<li><a href="reference/has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a></li>
|
||||
<li><a href="reference/has_trivial_destructor.html" title="has_trivial_destructor">has_trivial_destructor</a></li>
|
||||
<li><a href="reference/has_nothrow_constructor.html" title="has_nothrow_constructor">has_nothrow_constructor</a></li>
|
||||
<li><a href="reference/has_nothrow_copy.html" title="has_nothrow_copy">has_nothrow_copy</a></li>
|
||||
<li><a href="reference/has_nothrow_assign.html" title="has_nothrow_assign">has_nothrow_assign</a></li>
|
||||
<li><a href="reference/has_virtual_destructor.html" title="has_virtual_destructor">has_virtual_destructor</a></li>
|
||||
</ul></div>
|
||||
<p>
|
||||
The following traits classes can't be portably implemented in the C++ language,
|
||||
@@ -56,15 +55,15 @@
|
||||
all the compilers we know about:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="reference/is_empty.html" title=" is_empty">is_empty</a></li>
|
||||
<li><a href="reference/is_polymorphic.html" title=" is_polymorphic">is_polymorphic</a></li>
|
||||
<li><a href="reference/is_empty.html" title="is_empty">is_empty</a></li>
|
||||
<li><a href="reference/is_polymorphic.html" title="is_polymorphic">is_polymorphic</a></li>
|
||||
</ul></div>
|
||||
<p>
|
||||
The following traits classes are dependent on one or more of the above:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="reference/is_class.html" title=" is_class">is_class</a></li>
|
||||
<li><a href="reference/is_stateless.html" title=" is_stateless">is_stateless</a></li>
|
||||
<li><a href="reference/is_class.html" title="is_class">is_class</a></li>
|
||||
<li><a href="reference/is_stateless.html" title="is_stateless">is_stateless</a></li>
|
||||
</ul></div>
|
||||
<p>
|
||||
The hooks for compiler-intrinsic support are defined in <a href="../../../boost/type_traits/intrinsics.hpp" target="_top">boost/type_traits/intrinsics.hpp</a>,
|
||||
@@ -72,8 +71,8 @@
|
||||
of the following macros:
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id464633"></a><p class="title"><b>Table 1.4. Macros for Compiler Intrinsics</b></p>
|
||||
<table class="table" summary="Macros for Compiler Intrinsics">
|
||||
<a name="id498584"></a><p class="title"><b>Table 1.4. Macros for Compiler Intrinsics</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Macros for Compiler Intrinsics">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -175,8 +174,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Should evaluate to true if <tt class="computeroutput"><span class="identifier">T</span>
|
||||
<span class="identifier">x</span><span class="special">;</span></tt>
|
||||
Should evaluate to true if <code class="computeroutput"><span class="identifier">T</span>
|
||||
<span class="identifier">x</span><span class="special">;</span></code>
|
||||
can not throw
|
||||
</p>
|
||||
</td>
|
||||
@@ -189,7 +188,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Should evaluate to true if <tt class="computeroutput"><span class="identifier">T</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></tt> can not throw
|
||||
Should evaluate to true if <code class="computeroutput"><span class="identifier">T</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></code> can not throw
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -201,11 +200,11 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Should evaluate to true if <tt class="computeroutput"><span class="identifier">T</span>
|
||||
Should evaluate to true if <code class="computeroutput"><span class="identifier">T</span>
|
||||
<span class="identifier">t</span><span class="special">,</span>
|
||||
<span class="identifier">u</span><span class="special">;</span>
|
||||
<span class="identifier">t</span> <span class="special">=</span>
|
||||
<span class="identifier">u</span></tt> can not throw
|
||||
<span class="identifier">u</span></code> can not throw
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -222,8 +221,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -232,8 +232,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Introduction</title>
|
||||
<title>Introduction</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="next" href="background.html" title=" Background and Tutorial">
|
||||
<link rel="next" href="background.html" title="Background and Tutorial">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.intro"></a><a href="intro.html" title=" Introduction"> Introduction</a></h2></div></div></div>
|
||||
<a name="boost_typetraits.intro"></a><a href="intro.html" title="Introduction"> Introduction</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
The Boost type-traits library contains a set of very specific traits classes,
|
||||
each of which encapsulate a single trait from the C++ type system; for example,
|
||||
@@ -33,15 +34,15 @@
|
||||
</p>
|
||||
<p>
|
||||
The type-traits classes share a unified design: each class inherits from a
|
||||
the type <a href="reference/integral_constant.html" title=" integral_constant">true_type</a>
|
||||
if the type has the specified property and inherits from <a href="reference/integral_constant.html" title=" integral_constant">false_type</a>
|
||||
the type <a href="reference/integral_constant.html" title="integral_constant">true_type</a>
|
||||
if the type has the specified property and inherits from <a href="reference/integral_constant.html" title="integral_constant">false_type</a>
|
||||
otherwise.
|
||||
</p>
|
||||
<p>
|
||||
The type-traits library also contains a set of classes that perform a specific
|
||||
transformation on a type; for example, they can remove a top-level const or
|
||||
volatile qualifier from a type. Each class that performs a transformation defines
|
||||
a single typedef-member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
a single typedef-member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
that is the result of the transformation.
|
||||
</p>
|
||||
</div>
|
||||
@@ -52,8 +53,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> MPL Interoperability</title>
|
||||
<title>MPL Interoperability</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="intrinsics.html" title=" Support for Compiler Intrinsics">
|
||||
<link rel="next" href="examples.html" title=" Examples">
|
||||
<link rel="prev" href="intrinsics.html" title="Support for Compiler Intrinsics">
|
||||
<link rel="next" href="examples.html" title="Examples">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.mpl"></a><a href="mpl.html" title=" MPL Interoperability"> MPL Interoperability</a></h2></div></div></div>
|
||||
<a name="boost_typetraits.mpl"></a><a href="mpl.html" title="MPL Interoperability"> MPL Interoperability</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
All the value based traits in this library conform to MPL's requirements for
|
||||
an <a href="../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">Integral
|
||||
@@ -32,14 +33,14 @@
|
||||
for broken compilers.
|
||||
</p>
|
||||
<p>
|
||||
Purely as an implementation detail, this means that <tt class="computeroutput"><a href="reference/integral_constant.html" title=" integral_constant">true_type</a></tt>
|
||||
inherits from <a href="../../../libs/mpl/doc/refmanual/bool.html" target="_top"><tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt></a>,
|
||||
<tt class="computeroutput"><a href="reference/integral_constant.html" title=" integral_constant">false_type</a></tt>
|
||||
inherits from <a href="../../../libs/mpl/doc/refmanual/bool.html" target="_top"><tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt></a>,
|
||||
and <tt class="computeroutput"><a href="reference/integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">T</span><span class="special">,</span>
|
||||
<span class="identifier">v</span><span class="special">></span></tt>
|
||||
inherits from <a href="../../../libs/mpl/doc/refmanual/integral-c.html" target="_top"><tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special"><</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">v</span><span class="special">></span></tt></a>
|
||||
(provided <tt class="computeroutput"><span class="identifier">T</span></tt> is not <tt class="computeroutput"><span class="keyword">bool</span></tt>)
|
||||
Purely as an implementation detail, this means that <code class="computeroutput"><a href="reference/integral_constant.html" title="integral_constant">true_type</a></code>
|
||||
inherits from <a href="../../../libs/mpl/doc/refmanual/bool.html" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code></a>,
|
||||
<code class="computeroutput"><a href="reference/integral_constant.html" title="integral_constant">false_type</a></code>
|
||||
inherits from <a href="../../../libs/mpl/doc/refmanual/bool.html" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code></a>,
|
||||
and <code class="computeroutput"><a href="reference/integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">T</span><span class="special">,</span>
|
||||
<span class="identifier">v</span><span class="special">></span></code>
|
||||
inherits from <a href="../../../libs/mpl/doc/refmanual/integral-c.html" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special"><</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">v</span><span class="special">></span></code></a>
|
||||
(provided <code class="computeroutput"><span class="identifier">T</span></code> is not <code class="computeroutput"><span class="keyword">bool</span></code>)
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -49,8 +50,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Alphabetical Reference</title>
|
||||
<title>Alphabetical Reference</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="examples/to_double.html" title=" Convert Numeric
|
||||
Types and Enums to double">
|
||||
<link rel="next" href="reference/add_const.html" title=" add_const">
|
||||
<link rel="prev" href="examples/to_double.html" title="Convert Numeric Types and Enums to double">
|
||||
<link rel="next" href="reference/add_const.html" title="add_const">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.reference"></a><a href="reference.html" title=" Alphabetical Reference"> Alphabetical Reference</a></h2></div></div></div>
|
||||
<a name="boost_typetraits.reference"></a><a href="reference.html" title="Alphabetical Reference"> Alphabetical Reference</a>
|
||||
</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="reference/add_const.html"> add_const</a></span></dt>
|
||||
<dt><span class="section"><a href="reference/add_cv.html"> add_cv</a></span></dt>
|
||||
@@ -109,8 +109,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> add_const</title>
|
||||
<title>add_const</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="next" href="add_cv.html" title=" add_cv">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="next" href="add_cv.html" title="add_cv">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,37 +24,38 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_const"></a><a href="add_const.html" title=" add_const"> add_const</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.add_const"></a><a href="add_const.html" title="add_const"> add_const</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">add_const</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> The same type as <tt class="computeroutput"><span class="identifier">T</span>
|
||||
<span class="keyword">const</span></tt> for all <tt class="computeroutput"><span class="identifier">T</span></tt>.
|
||||
<span class="bold"><strong>type:</strong></span> The same type as <code class="computeroutput"><span class="identifier">T</span>
|
||||
<span class="keyword">const</span></code> for all <code class="computeroutput"><span class="identifier">T</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">add_const</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">add_const</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id469779"></a><p class="title"><b>Table 1.5. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id503727"></a><p class="title"><b>Table 1.5. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -75,55 +76,56 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">*</span>
|
||||
<span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">*</span>
|
||||
<span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -132,8 +134,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> add_cv</title>
|
||||
<title>add_cv</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="add_const.html" title=" add_const">
|
||||
<link rel="next" href="add_pointer.html" title=" add_pointer">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_const.html" title="add_const">
|
||||
<link rel="next" href="add_pointer.html" title="add_pointer">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,38 +24,39 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_cv"></a><a href="add_cv.html" title=" add_cv"> add_cv</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.add_cv"></a><a href="add_cv.html" title="add_cv"> add_cv</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">add_cv</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> The same type as <tt class="computeroutput"><span class="identifier">T</span>
|
||||
<span class="keyword">const</span> <span class="keyword">volatile</span></tt>
|
||||
for all <tt class="computeroutput"><span class="identifier">T</span></tt>.
|
||||
<span class="bold"><strong>type:</strong></span> The same type as <code class="computeroutput"><span class="identifier">T</span>
|
||||
<span class="keyword">const</span> <span class="keyword">volatile</span></code>
|
||||
for all <code class="computeroutput"><span class="identifier">T</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">add_cv</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">add_cv</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id470419"></a><p class="title"><b>Table 1.6. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id504366"></a><p class="title"><b>Table 1.6. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -76,57 +77,58 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_cv</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_cv</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_cv</span><span class="special"><</span><span class="keyword">int</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_cv</span><span class="special"><</span><span class="keyword">int</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_cv</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_cv</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">*</span>
|
||||
<span class="keyword">const</span> <span class="keyword">volatile</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">*</span>
|
||||
<span class="keyword">const</span> <span class="keyword">volatile</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_cv</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_cv</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -135,8 +137,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> add_pointer</title>
|
||||
<title>add_pointer</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="add_cv.html" title=" add_cv">
|
||||
<link rel="next" href="add_reference.html" title=" add_reference">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_cv.html" title="add_cv">
|
||||
<link rel="next" href="add_reference.html" title="add_reference">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,40 +24,41 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_pointer"></a><a href="add_pointer.html" title=" add_pointer"> add_pointer</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.add_pointer"></a><a href="add_pointer.html" title="add_pointer"> add_pointer</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">add_pointer</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> The same type as <tt class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span><span class="special">*</span></tt>.
|
||||
<span class="bold"><strong>type:</strong></span> The same type as <code class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span><span class="special">*</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
The rationale for this template is that it produces the same type as <tt class="computeroutput"><span class="identifier">TYPEOF</span><span class="special">(&</span><span class="identifier">t</span><span class="special">)</span></tt>, where
|
||||
<tt class="computeroutput"><span class="identifier">t</span></tt> is an object of type <tt class="computeroutput"><span class="identifier">T</span></tt>.
|
||||
The rationale for this template is that it produces the same type as <code class="computeroutput"><span class="identifier">TYPEOF</span><span class="special">(&</span><span class="identifier">t</span><span class="special">)</span></code>, where
|
||||
<code class="computeroutput"><span class="identifier">t</span></code> is an object of type <code class="computeroutput"><span class="identifier">T</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 8.3.1.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 8.3.1.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">add_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">add_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id471134"></a><p class="title"><b>Table 1.7. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id505080"></a><p class="title"><b>Table 1.7. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -78,54 +79,55 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">**</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">**</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">*&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">*&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">**</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">**</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -134,8 +136,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> add_reference</title>
|
||||
<title>add_reference</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="add_pointer.html" title=" add_pointer">
|
||||
<link rel="next" href="add_volatile.html" title=" add_volatile">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_pointer.html" title="add_pointer">
|
||||
<link rel="next" href="add_volatile.html" title="add_volatile">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,37 +24,38 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_reference"></a><a href="add_reference.html" title=" add_reference"> add_reference</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.add_reference"></a><a href="add_reference.html" title="add_reference"> add_reference</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">add_reference</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> If <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
is not a reference type then <tt class="computeroutput"><span class="identifier">T</span><span class="special">&</span></tt>, otherwise <tt class="computeroutput"><span class="identifier">T</span></tt>.
|
||||
<span class="bold"><strong>type:</strong></span> If <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
is not a reference type then <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span></code>, otherwise <code class="computeroutput"><span class="identifier">T</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 8.3.2.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 8.3.2.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">add_reference</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">add_reference</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id471775"></a><p class="title"><b>Table 1.8. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id505719"></a><p class="title"><b>Table 1.8. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -75,54 +76,55 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_reference</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_reference</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">*&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">*&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">*&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">*&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">*&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">*&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -131,8 +133,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> add_volatile</title>
|
||||
<title>add_volatile</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="add_reference.html" title=" add_reference">
|
||||
<link rel="next" href="aligned_storage.html" title=" aligned_storage">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_reference.html" title="add_reference">
|
||||
<link rel="next" href="aligned_storage.html" title="aligned_storage">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,37 +24,38 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_volatile"></a><a href="add_volatile.html" title=" add_volatile"> add_volatile</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.add_volatile"></a><a href="add_volatile.html" title="add_volatile"> add_volatile</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">add_volatile</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> The same type as <tt class="computeroutput"><span class="identifier">T</span>
|
||||
<span class="keyword">volatile</span></tt> for all <tt class="computeroutput"><span class="identifier">T</span></tt>.
|
||||
<span class="bold"><strong>type:</strong></span> The same type as <code class="computeroutput"><span class="identifier">T</span>
|
||||
<span class="keyword">volatile</span></code> for all <code class="computeroutput"><span class="identifier">T</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">add_volatile</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">add_volatile</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id472405"></a><p class="title"><b>Table 1.9. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id506349"></a><p class="title"><b>Table 1.9. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -75,56 +76,57 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_volatile</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_volatile</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">volatile</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">volatile</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_volatile</span><span class="special"><</span><span class="keyword">int</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_volatile</span><span class="special"><</span><span class="keyword">int</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_volatile</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_volatile</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">*</span>
|
||||
<span class="keyword">volatile</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">*</span>
|
||||
<span class="keyword">volatile</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">add_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">add_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -133,8 +135,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> aligned_storage</title>
|
||||
<title>aligned_storage</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="add_volatile.html" title=" add_volatile">
|
||||
<link rel="next" href="alignment_of.html" title=" alignment_of">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_volatile.html" title="add_volatile">
|
||||
<link rel="next" href="alignment_of.html" title="alignment_of">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,23 +24,24 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.aligned_storage"></a><a href="aligned_storage.html" title=" aligned_storage"> aligned_storage</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.aligned_storage"></a><a href="aligned_storage.html" title="aligned_storage"> aligned_storage</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Size</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Align</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">aligned_storage</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> a built-in or POD type with size
|
||||
<tt class="computeroutput"><span class="identifier">Size</span></tt> and an alignment that
|
||||
is a multiple of <tt class="computeroutput"><span class="identifier">Align</span></tt>.
|
||||
<span class="bold"><strong>type:</strong></span> a built-in or POD type with size
|
||||
<code class="computeroutput"><span class="identifier">Size</span></code> and an alignment that
|
||||
is a multiple of <code class="computeroutput"><span class="identifier">Align</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">aligned_storage</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">aligned_storage</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -50,8 +51,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> alignment_of</title>
|
||||
<title>alignment_of</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="aligned_storage.html" title=" aligned_storage">
|
||||
<link rel="next" href="decay.html" title=" decay">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="aligned_storage.html" title="aligned_storage">
|
||||
<link rel="next" href="decay.html" title="decay">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,35 +24,36 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.alignment_of"></a><a href="alignment_of.html" title=" alignment_of"> alignment_of</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.alignment_of"></a><a href="alignment_of.html" title="alignment_of"> alignment_of</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">alignment_of</span> <span class="special">:</span> <span class="keyword">public</span> <a href="integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">ALIGNOF</span><span class="special">(</span><span class="identifier">T</span><span class="special">)></span> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">alignment_of</span> <span class="special">:</span> <span class="keyword">public</span> <a href="integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">ALIGNOF</span><span class="special">(</span><span class="identifier">T</span><span class="special">)></span> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> Class template alignment<span class="underline">of inherits from `</span>_integral_constant<std::size_t,
|
||||
ALIGNOF(T)><tt class="computeroutput"><span class="special">,</span> <span class="identifier">where</span>
|
||||
</tt>ALIGNOF(T)` is the alignment of type T.
|
||||
<span class="bold"><strong>Inherits:</strong></span> Class template alignment<span class="underline">of inherits from `</span>_integral_constant<std::size_t,
|
||||
ALIGNOF(T)><code class="computeroutput"><span class="special">,</span> <span class="identifier">where</span>
|
||||
</code>ALIGNOF(T)` is the alignment of type T.
|
||||
</p>
|
||||
<p>
|
||||
<span class="emphasis"><em>Note: strictly speaking you should only rely on the value of <tt class="computeroutput"><span class="identifier">ALIGNOF</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></tt> being
|
||||
<span class="emphasis"><em>Note: strictly speaking you should only rely on the value of <code class="computeroutput"><span class="identifier">ALIGNOF</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code> being
|
||||
a multiple of the true alignment of T, although in practice it does compute
|
||||
the correct value in all the cases we know about.</em></span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">alignment_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">alignment_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">alignment_of</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">ALIGNOF</span><span class="special">(</span><span class="keyword">int</span><span class="special">)></span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">alignment_of</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">ALIGNOF</span><span class="special">(</span><span class="keyword">int</span><span class="special">)></span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -61,7 +62,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">alignment_of</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">ALIGNOF</span><span class="special">(</span><span class="keyword">char</span><span class="special">)></span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">alignment_of</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">ALIGNOF</span><span class="special">(</span><span class="keyword">char</span><span class="special">)></span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -70,8 +71,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">alignment_of</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
with value <tt class="computeroutput"><span class="identifier">ALIGNOF</span><span class="special">(</span><span class="keyword">double</span><span class="special">)</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">alignment_of</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
with value <code class="computeroutput"><span class="identifier">ALIGNOF</span><span class="special">(</span><span class="keyword">double</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -80,7 +81,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">alignment_of</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">alignment_of</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -93,8 +94,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> decay</title>
|
||||
<title>decay</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="alignment_of.html" title=" alignment_of">
|
||||
<link rel="next" href="extent.html" title=" extent">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="alignment_of.html" title="alignment_of">
|
||||
<link rel="next" href="extent.html" title="extent">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,32 +24,33 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.decay"></a><a href="decay.html" title=" decay"> decay</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.decay"></a><a href="decay.html" title="decay"> decay</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">decay</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> Let <tt class="computeroutput"><span class="identifier">U</span></tt>
|
||||
be the result of <tt class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span></tt>, then if <tt class="computeroutput"><span class="identifier">U</span></tt>
|
||||
is an array type, the result is <tt class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="identifier">U</span><span class="special">>*</span></tt>,
|
||||
otherwise if <tt class="computeroutput"><span class="identifier">U</span></tt> is a function
|
||||
type then the result is <tt class="computeroutput"><span class="identifier">U</span><span class="special">*</span></tt>, otherwise the result is <tt class="computeroutput"><span class="identifier">U</span></tt>.
|
||||
<span class="bold"><strong>type:</strong></span> Let <code class="computeroutput"><span class="identifier">U</span></code>
|
||||
be the result of <code class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span></code>, then if <code class="computeroutput"><span class="identifier">U</span></code>
|
||||
is an array type, the result is <code class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="identifier">U</span><span class="special">>*</span></code>,
|
||||
otherwise if <code class="computeroutput"><span class="identifier">U</span></code> is a function
|
||||
type then the result is <code class="computeroutput"><span class="identifier">U</span><span class="special">*</span></code>, otherwise the result is <code class="computeroutput"><span class="identifier">U</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.1.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.1.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">decay</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">decay</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id474069"></a><p class="title"><b>Table 1.10. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id508010"></a><p class="title"><b>Table 1.10. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -70,66 +71,67 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">decay</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">3</span><span class="special">]>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">decay</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">3</span><span class="special">]>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">]*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">]*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">decay</span><span class="special"><</span><span class="keyword">int</span><span class="special">(&)[</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">decay</span><span class="special"><</span><span class="keyword">int</span><span class="special">(&)[</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">decay</span><span class="special"><</span><span class="keyword">int</span><span class="special">(&)(</span><span class="keyword">double</span><span class="special">)>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">decay</span><span class="special"><</span><span class="keyword">int</span><span class="special">(&)(</span><span class="keyword">double</span><span class="special">)>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">(*)(</span><span class="keyword">double</span><span class="special">)</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">(*)(</span><span class="keyword">double</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">(*)(</span><span class="keyword">double</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">(*)(</span><span class="keyword">double</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">(*)(</span><span class="keyword">double</span><span class="special">)</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">(*)(</span><span class="keyword">double</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">)</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">(*)(</span><span class="keyword">double</span><span class="special">)</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">(*)(</span><span class="keyword">double</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -138,8 +140,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> extent</title>
|
||||
<title>extent</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="decay.html" title=" decay">
|
||||
<link rel="next" href="floating_point_promotion.html" title="
|
||||
floating_point_promotion">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="decay.html" title="decay">
|
||||
<link rel="next" href="floating_point_promotion.html" title="floating_point_promotion">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,36 +24,37 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.extent"></a><a href="extent.html" title=" extent"> extent</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.extent"></a><a href="extent.html" title="extent"> extent</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span> <span class="special">=</span> <span class="number">0</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">extent</span> <span class="special">:</span> <span class="keyword">public</span> <a href="integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">EXTENT</span><span class="special">(</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">N</span><span class="special">)></span> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">extent</span> <span class="special">:</span> <span class="keyword">public</span> <a href="integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">EXTENT</span><span class="special">(</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">N</span><span class="special">)></span> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> Class template extent inherits
|
||||
from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">EXTENT</span><span class="special">(</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">N</span><span class="special">)></span></tt>,
|
||||
where <tt class="computeroutput"><span class="identifier">EXTENT</span><span class="special">(</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">N</span><span class="special">)</span></tt> is the number of elements in the N'th array
|
||||
dimention of type <tt class="computeroutput"><span class="identifier">T</span></tt>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> Class template extent inherits
|
||||
from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">EXTENT</span><span class="special">(</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">N</span><span class="special">)></span></code>,
|
||||
where <code class="computeroutput"><span class="identifier">EXTENT</span><span class="special">(</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">N</span><span class="special">)</span></code> is the number of elements in the N'th array
|
||||
dimention of type <code class="computeroutput"><span class="identifier">T</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
If <tt class="computeroutput"><span class="identifier">T</span></tt> is not an array type,
|
||||
or if <tt class="computeroutput"><span class="identifier">N</span> <span class="special">></span>
|
||||
<a href="rank.html" title=" rank">rank</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span></tt>, or if the N'th array bound is incomplete,
|
||||
then <tt class="computeroutput"><span class="identifier">EXTENT</span><span class="special">(</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">N</span><span class="special">)</span></tt> is zero.
|
||||
If <code class="computeroutput"><span class="identifier">T</span></code> is not an array type,
|
||||
or if <code class="computeroutput"><span class="identifier">N</span> <span class="special">></span>
|
||||
<a href="rank.html" title="rank">rank</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span></code>, or if the N'th array bound is incomplete,
|
||||
then <code class="computeroutput"><span class="identifier">EXTENT</span><span class="special">(</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">N</span><span class="special">)</span></code> is zero.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">extent</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">extent</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">1</span><span class="special">]></span></tt> inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="number">1</span><span class="special">></span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">1</span><span class="special">]></span></code> inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="number">1</span><span class="special">></span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -63,8 +63,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">double</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">3</span><span class="special">][</span><span class="number">4</span><span class="special">],</span>
|
||||
<span class="number">1</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="number">3</span><span class="special">></span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">double</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">3</span><span class="special">][</span><span class="number">4</span><span class="special">],</span>
|
||||
<span class="number">1</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="number">3</span><span class="special">></span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -73,7 +73,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">4</span><span class="special">]>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">4</span><span class="special">]>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>4</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -83,7 +83,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[][</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[][</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>0</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -93,7 +93,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[][</span><span class="number">2</span><span class="special">],</span> <span class="number">1</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[][</span><span class="number">2</span><span class="special">],</span> <span class="number">1</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>2</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -103,7 +103,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>0</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -113,7 +113,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">extent</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -126,8 +126,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
floating_point_promotion</title>
|
||||
<title>floating_point_promotion</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="extent.html" title=" extent">
|
||||
<link rel="next" href="function_traits.html" title=" function_traits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="extent.html" title="extent">
|
||||
<link rel="next" href="function_traits.html" title="function_traits">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,34 +24,34 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.floating_point_promotion"></a><a href="floating_point_promotion.html" title="
|
||||
floating_point_promotion">
|
||||
floating_point_promotion</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.floating_point_promotion"></a><a href="floating_point_promotion.html" title="floating_point_promotion">
|
||||
floating_point_promotion</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">floating_point_promotion</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> If floating point promotion can be
|
||||
applied to an rvalue of type <tt class="computeroutput"><span class="identifier">T</span></tt>,
|
||||
then applies floating point promotion to <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
and keeps cv-qualifiers of <tt class="computeroutput"><span class="identifier">T</span></tt>,
|
||||
otherwise leaves <tt class="computeroutput"><span class="identifier">T</span></tt> unchanged.
|
||||
<span class="bold"><strong>type:</strong></span> If floating point promotion can be
|
||||
applied to an rvalue of type <code class="computeroutput"><span class="identifier">T</span></code>,
|
||||
then applies floating point promotion to <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
and keeps cv-qualifiers of <code class="computeroutput"><span class="identifier">T</span></code>,
|
||||
otherwise leaves <code class="computeroutput"><span class="identifier">T</span></code> unchanged.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 4.6.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 4.6.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">floating_point_promotion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">floating_point_promotion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id475860"></a><p class="title"><b>Table 1.11. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id509798"></a><p class="title"><b>Table 1.11. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -73,43 +72,44 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">floating_point_promotion</span><span class="special"><</span><span class="keyword">float</span>
|
||||
<span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">floating_point_promotion</span><span class="special"><</span><span class="keyword">float</span>
|
||||
<span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">double</span> <span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">double</span> <span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">floating_point_promotion</span><span class="special"><</span><span class="keyword">float</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">floating_point_promotion</span><span class="special"><</span><span class="keyword">float</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">float</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">float</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">floating_point_promotion</span><span class="special"><</span><span class="keyword">short</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">floating_point_promotion</span><span class="special"><</span><span class="keyword">short</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">short</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">short</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -118,8 +118,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> function_traits</title>
|
||||
<title>function_traits</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="floating_point_promotion.html" title="
|
||||
floating_point_promotion">
|
||||
<link rel="next" href="has_nothrow_assign.html" title=" has_nothrow_assign">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="floating_point_promotion.html" title="floating_point_promotion">
|
||||
<link rel="next" href="has_nothrow_assign.html" title="has_nothrow_assign">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,14 +24,15 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.function_traits"></a><a href="function_traits.html" title=" function_traits"> function_traits</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.function_traits"></a><a href="function_traits.html" title="function_traits"> function_traits</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">function_traits</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">arity</span> <span class="special">=</span> <i class="replaceable"><tt>see-below</tt></i><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">result_type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> arg<i class="replaceable"><tt>N</tt></i>_type<span class="special">;</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">arity</span> <span class="special">=</span> <em class="replaceable"><code>see-below</code></em><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">result_type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> arg<em class="replaceable"><code>N</code></em>_type<span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
@@ -43,8 +43,8 @@
|
||||
The compiler supports partial specialization of class templates.
|
||||
</li>
|
||||
<li>
|
||||
The template argument <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
is a <span class="emphasis"><em>function type</em></span>, note that this <span class="emphasis"><em><span class="bold"><b>is not</b></span></em></span> the same thing as a <span class="emphasis"><em>pointer
|
||||
The template argument <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
is a <span class="emphasis"><em>function type</em></span>, note that this <span class="emphasis"><em><span class="bold"><strong>is not</strong></span></em></span> the same thing as a <span class="emphasis"><em>pointer
|
||||
to a function</em></span>.
|
||||
</li>
|
||||
</ul></div>
|
||||
@@ -53,15 +53,15 @@
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../../../../doc/html/images/tip.png"></td>
|
||||
<th align="left">Tip</th>
|
||||
</tr>
|
||||
<tr><td colspan="2" align="left" valign="top"><p>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
function_traits is intended to introspect only C++ functions of the form
|
||||
R (), R( A1 ), R ( A1, ... etc. ) and not function pointers or class member
|
||||
functions. To convert a function pointer type to a suitable type use <a href="remove_pointer.html" title=" remove_pointer">remove_pointer</a>.
|
||||
functions. To convert a function pointer type to a suitable type use <a href="remove_pointer.html" title="remove_pointer">remove_pointer</a>.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<div class="table">
|
||||
<a name="id476342"></a><p class="title"><b>Table 1.12. Function Traits Members</b></p>
|
||||
<table class="table" summary="Function Traits Members">
|
||||
<a name="id510280"></a><p class="title"><b>Table 1.12. Function Traits Members</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Function Traits Members">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -82,49 +82,49 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">arity</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">arity</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
An integral constant expression that gives the number of arguments
|
||||
accepted by the function type <tt class="computeroutput"><span class="identifier">F</span></tt>.
|
||||
accepted by the function type <code class="computeroutput"><span class="identifier">F</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">result_type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">result_type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type returned by function type <tt class="computeroutput"><span class="identifier">F</span></tt>.
|
||||
The type returned by function type <code class="computeroutput"><span class="identifier">F</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span>arg<i class="replaceable"><tt>N</tt></i>_type</tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span>arg<em class="replaceable"><code>N</code></em>_type</code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The <i class="replaceable"><tt>N</tt></i>th argument type of function type <tt class="computeroutput"><span class="identifier">F</span></tt>,
|
||||
where <tt class="computeroutput"><span class="number">1</span> <span class="special"><=</span>
|
||||
The <em class="replaceable"><code>N</code></em>th argument type of function type <code class="computeroutput"><span class="identifier">F</span></code>,
|
||||
where <code class="computeroutput"><span class="number">1</span> <span class="special"><=</span>
|
||||
<span class="identifier">N</span> <span class="special"><=</span>
|
||||
<span class="identifier">arity</span></tt> of <tt class="computeroutput"><span class="identifier">F</span></tt>.
|
||||
<span class="identifier">arity</span></code> of <code class="computeroutput"><span class="identifier">F</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<a name="id476620"></a><p class="title"><b>Table 1.13. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id510557"></a><p class="title"><b>Table 1.13. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -145,7 +145,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">void</span> <span class="special">(</span><span class="keyword">void</span><span class="special">)>::</span><span class="identifier">arity</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">void</span> <span class="special">(</span><span class="keyword">void</span><span class="special">)>::</span><span class="identifier">arity</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@@ -157,7 +157,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)>::</span><span class="identifier">arity</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)>::</span><span class="identifier">arity</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@@ -169,7 +169,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">long</span><span class="special">,</span> <span class="keyword">double</span><span class="special">,</span> <span class="keyword">void</span><span class="special">*)>::</span><span class="identifier">arity</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">long</span><span class="special">,</span> <span class="keyword">double</span><span class="special">,</span> <span class="keyword">void</span><span class="special">*)>::</span><span class="identifier">arity</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@@ -181,60 +181,60 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">void</span> <span class="special">(</span><span class="keyword">void</span><span class="special">)>::</span><span class="identifier">result_type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">void</span> <span class="special">(</span><span class="keyword">void</span><span class="special">)>::</span><span class="identifier">result_type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type <tt class="computeroutput"><span class="keyword">void</span></tt>.
|
||||
The type <code class="computeroutput"><span class="keyword">void</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)>::</span><span class="identifier">result_type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)>::</span><span class="identifier">result_type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type <tt class="computeroutput"><span class="keyword">long</span></tt>.
|
||||
The type <code class="computeroutput"><span class="keyword">long</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)>::</span><span class="identifier">arg1_type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)>::</span><span class="identifier">arg1_type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type <tt class="computeroutput"><span class="keyword">int</span></tt>.
|
||||
The type <code class="computeroutput"><span class="keyword">int</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">long</span><span class="special">,</span> <span class="keyword">double</span><span class="special">,</span> <span class="keyword">void</span><span class="special">*)>::</span><span class="identifier">arg4_type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">long</span><span class="special">,</span> <span class="keyword">double</span><span class="special">,</span> <span class="keyword">void</span><span class="special">*)>::</span><span class="identifier">arg4_type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type <tt class="computeroutput"><span class="keyword">void</span><span class="special">*</span></tt>.
|
||||
The type <code class="computeroutput"><span class="keyword">void</span><span class="special">*</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">long</span><span class="special">,</span> <span class="keyword">double</span><span class="special">,</span> <span class="keyword">void</span><span class="special">*)>::</span><span class="identifier">arg5_type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">long</span><span class="special">,</span> <span class="keyword">double</span><span class="special">,</span> <span class="keyword">void</span><span class="special">*)>::</span><span class="identifier">arg5_type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
A compiler error: there is no <tt class="computeroutput"><span class="identifier">arg4_type</span></tt>
|
||||
A compiler error: there is no <code class="computeroutput"><span class="identifier">arg4_type</span></code>
|
||||
since there are only three arguments.
|
||||
</p>
|
||||
</td>
|
||||
@@ -242,7 +242,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(*)(</span><span class="keyword">void</span><span class="special">)>::</span><span class="identifier">arity</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(*)(</span><span class="keyword">void</span><span class="special">)>::</span><span class="identifier">arity</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@@ -253,8 +253,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -263,8 +264,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> has_nothrow_default_constructor</title>
|
||||
<title>has_nothrow_default_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_cp_cons.html" title=" has_nothrow_copy_constructor">
|
||||
<link rel="next" href="has_trivial_assign.html" title=" has_trivial_assign">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_cp_cons.html" title="has_nothrow_copy_constructor">
|
||||
<link rel="next" href="has_trivial_assign.html" title="has_trivial_assign">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,10 +24,10 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_no_throw_def_cons"></a><a href="has_no_throw_def_cons.html" title=" has_nothrow_default_constructor"> has_nothrow_default_constructor</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_no_throw_def_cons"></a><a href="has_no_throw_def_cons.html" title="has_nothrow_default_constructor"> has_nothrow_default_constructor</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
See <a href="has_nothrow_constructor.html" title="
|
||||
has_nothrow_constructor">has_nothrow_constructor</a>.
|
||||
See <a href="has_nothrow_constructor.html" title="has_nothrow_constructor">has_nothrow_constructor</a>.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -37,8 +37,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> has_nothrow_assign</title>
|
||||
<title>has_nothrow_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="function_traits.html" title=" function_traits">
|
||||
<link rel="next" href="has_nothrow_constructor.html" title="
|
||||
has_nothrow_constructor">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="function_traits.html" title="function_traits">
|
||||
<link rel="next" href="has_nothrow_constructor.html" title="has_nothrow_constructor">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,34 +24,35 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_nothrow_assign"></a><a href="has_nothrow_assign.html" title=" has_nothrow_assign"> has_nothrow_assign</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_nothrow_assign"></a><a href="has_nothrow_assign.html" title="has_nothrow_assign"> has_nothrow_assign</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_nothrow_assign</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_nothrow_assign</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
type with a non-throwing assignment-operator then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
Type <tt class="computeroutput"><span class="identifier">T</span></tt> must be a complete
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
type with a non-throwing assignment-operator then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
Type <code class="computeroutput"><span class="identifier">T</span></code> must be a complete
|
||||
type.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with function types.
|
||||
</p>
|
||||
<p>
|
||||
Without some (as yet unspecified) help from the compiler, <tt class="computeroutput"><span class="identifier">has_nothrow_assign</span></tt>
|
||||
Without some (as yet unspecified) help from the compiler, <code class="computeroutput"><span class="identifier">has_nothrow_assign</span></code>
|
||||
will never report that a class or struct has a non-throwing assignment-operator;
|
||||
this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual
|
||||
C++ 8 has the necessary compiler support to ensure that this trait "just
|
||||
works".
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">has_nothrow_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">has_nothrow_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -62,8 +62,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
has_nothrow_constructor</title>
|
||||
<title>has_nothrow_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_assign.html" title=" has_nothrow_assign">
|
||||
<link rel="next" href="has_nothrow_copy.html" title=" has_nothrow_copy">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_assign.html" title="has_nothrow_assign">
|
||||
<link rel="next" href="has_nothrow_copy.html" title="has_nothrow_copy">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,42 +24,42 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_nothrow_constructor"></a><a href="has_nothrow_constructor.html" title="
|
||||
has_nothrow_constructor">
|
||||
has_nothrow_constructor</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_nothrow_constructor"></a><a href="has_nothrow_constructor.html" title="has_nothrow_constructor">
|
||||
has_nothrow_constructor</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_nothrow_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_nothrow_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_nothrow_default_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_nothrow_default_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
type with a non-throwing default-constructor then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
Type <tt class="computeroutput"><span class="identifier">T</span></tt> must be a complete
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
type with a non-throwing default-constructor then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
Type <code class="computeroutput"><span class="identifier">T</span></code> must be a complete
|
||||
type.
|
||||
</p>
|
||||
<p>
|
||||
These two traits are synonyms for each other.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with function types.
|
||||
</p>
|
||||
<p>
|
||||
Without some (as yet unspecified) help from the compiler, <tt class="computeroutput"><span class="identifier">has_nothrow_constructor</span></tt>
|
||||
Without some (as yet unspecified) help from the compiler, <code class="computeroutput"><span class="identifier">has_nothrow_constructor</span></code>
|
||||
will never report that a class or struct has a non-throwing default-constructor;
|
||||
this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual
|
||||
C++ 8 has the necessary compiler <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>
|
||||
C++ 8 has the necessary compiler <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>
|
||||
to ensure that this trait "just works".
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">has_nothrow_constructor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">has_nothrow_constructor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -70,8 +69,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> has_nothrow_copy</title>
|
||||
<title>has_nothrow_copy</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_constructor.html" title="
|
||||
has_nothrow_constructor">
|
||||
<link rel="next" href="has_nothrow_cp_cons.html" title=" has_nothrow_copy_constructor">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_constructor.html" title="has_nothrow_constructor">
|
||||
<link rel="next" href="has_nothrow_cp_cons.html" title="has_nothrow_copy_constructor">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,40 +24,41 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_nothrow_copy"></a><a href="has_nothrow_copy.html" title=" has_nothrow_copy"> has_nothrow_copy</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_nothrow_copy"></a><a href="has_nothrow_copy.html" title="has_nothrow_copy"> has_nothrow_copy</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_nothrow_copy</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_nothrow_copy</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_nothrow_copy_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_nothrow_copy_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
type with a non-throwing copy-constructor then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
Type <tt class="computeroutput"><span class="identifier">T</span></tt> must be a complete
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
type with a non-throwing copy-constructor then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
Type <code class="computeroutput"><span class="identifier">T</span></code> must be a complete
|
||||
type.
|
||||
</p>
|
||||
<p>
|
||||
These two traits are synonyms for each other.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with function types.
|
||||
</p>
|
||||
<p>
|
||||
Without some (as yet unspecified) help from the compiler, <tt class="computeroutput"><span class="identifier">has_nothrow_copy</span></tt>
|
||||
Without some (as yet unspecified) help from the compiler, <code class="computeroutput"><span class="identifier">has_nothrow_copy</span></code>
|
||||
will never report that a class or struct has a non-throwing copy-constructor;
|
||||
this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual
|
||||
C++ 8 has the necessary compiler <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>
|
||||
C++ 8 has the necessary compiler <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>
|
||||
to ensure that this trait "just works".
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">has_nothrow_copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">has_nothrow_copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -68,8 +68,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> has_nothrow_copy_constructor</title>
|
||||
<title>has_nothrow_copy_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_copy.html" title=" has_nothrow_copy">
|
||||
<link rel="next" href="has_no_throw_def_cons.html" title=" has_nothrow_default_constructor">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_copy.html" title="has_nothrow_copy">
|
||||
<link rel="next" href="has_no_throw_def_cons.html" title="has_nothrow_default_constructor">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,9 +24,10 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_nothrow_cp_cons"></a><a href="has_nothrow_cp_cons.html" title=" has_nothrow_copy_constructor"> has_nothrow_copy_constructor</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_nothrow_cp_cons"></a><a href="has_nothrow_cp_cons.html" title="has_nothrow_copy_constructor"> has_nothrow_copy_constructor</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
See <a href="has_nothrow_copy.html" title=" has_nothrow_copy">has_nothrow_copy</a>.
|
||||
See <a href="has_nothrow_copy.html" title="has_nothrow_copy">has_nothrow_copy</a>.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -36,8 +37,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> has_trivial_assign</title>
|
||||
<title>has_trivial_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_no_throw_def_cons.html" title=" has_nothrow_default_constructor">
|
||||
<link rel="next" href="has_trivial_constructor.html" title="
|
||||
has_trivial_constructor">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_no_throw_def_cons.html" title="has_nothrow_default_constructor">
|
||||
<link rel="next" href="has_trivial_constructor.html" title="has_trivial_constructor">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,23 +24,24 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_assign"></a><a href="has_trivial_assign.html" title=" has_trivial_assign"> has_trivial_assign</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_trivial_assign"></a><a href="has_trivial_assign.html" title="has_trivial_assign"> has_trivial_assign</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_assign</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_assign</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
type with a trivial assignment-operator then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
type with a trivial assignment-operator then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
If a type has a trivial assignment-operator then the operator has the same
|
||||
effect as copying the bits of one object to the other: calls to the operator
|
||||
can be safely replaced with a call to <tt class="computeroutput"><span class="identifier">memcpy</span></tt>.
|
||||
can be safely replaced with a call to <code class="computeroutput"><span class="identifier">memcpy</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with function types.
|
||||
</p>
|
||||
@@ -49,26 +49,26 @@
|
||||
Without some (as yet unspecified) help from the compiler, has_trivial_assign
|
||||
will never report that a user-defined class or struct has a trivial constructor;
|
||||
this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW
|
||||
9 and Visual C++ 8 have the necessary compiler <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>
|
||||
9 and Visual C++ 8 have the necessary compiler <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>
|
||||
to detect user-defined classes with trivial constructors.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 12.8p11.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 12.8p11.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">has_trivial_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">has_trivial_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -77,7 +77,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="keyword">char</span><span class="special">*>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="keyword">char</span><span class="special">*>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -86,7 +86,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -96,7 +96,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -106,7 +106,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_assign</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -119,8 +119,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
has_trivial_constructor</title>
|
||||
<title>has_trivial_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_assign.html" title=" has_trivial_assign">
|
||||
<link rel="next" href="has_trivial_copy.html" title=" has_trivial_copy">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_assign.html" title="has_trivial_assign">
|
||||
<link rel="next" href="has_trivial_copy.html" title="has_trivial_copy">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,20 +24,20 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_constructor"></a><a href="has_trivial_constructor.html" title="
|
||||
has_trivial_constructor">
|
||||
has_trivial_constructor</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_trivial_constructor"></a><a href="has_trivial_constructor.html" title="has_trivial_constructor">
|
||||
has_trivial_constructor</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_default_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_default_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
type with a trivial default-constructor then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
type with a trivial default-constructor then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
These two traits are synonyms for each other.
|
||||
@@ -51,7 +50,7 @@
|
||||
some benefit in terms of code size and speed can be obtained.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with function types.
|
||||
</p>
|
||||
@@ -59,25 +58,25 @@
|
||||
Without some (as yet unspecified) help from the compiler, has_trivial_constructor
|
||||
will never report that a user-defined class or struct has a trivial constructor;
|
||||
this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW
|
||||
9 and Visual C++ 8 have the necessary compiler <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>
|
||||
9 and Visual C++ 8 have the necessary compiler <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>
|
||||
to detect user-defined classes with trivial constructors.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 12.1p6.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 12.1p6.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">has_trivial_constructor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">has_trivial_constructor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_constructor</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></tt> inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_constructor</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code> inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -86,8 +85,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_constructor</span><span class="special"><</span><span class="keyword">char</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_constructor</span><span class="special"><</span><span class="keyword">char</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -96,7 +95,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_constructor</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_constructor</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -106,7 +105,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_constructor</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_constructor</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -116,8 +115,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_constructor</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt>
|
||||
is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_constructor</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code>
|
||||
is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -130,8 +129,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> has_trivial_copy</title>
|
||||
<title>has_trivial_copy</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_constructor.html" title="
|
||||
has_trivial_constructor">
|
||||
<link rel="next" href="has_trivial_cp_cons.html" title=" has_trivial_copy_constructor">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_constructor.html" title="has_trivial_constructor">
|
||||
<link rel="next" href="has_trivial_cp_cons.html" title="has_trivial_copy_constructor">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,18 +24,19 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_copy"></a><a href="has_trivial_copy.html" title=" has_trivial_copy"> has_trivial_copy</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_trivial_copy"></a><a href="has_trivial_copy.html" title="has_trivial_copy"> has_trivial_copy</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_copy</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_copy</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_copy_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_copy_constructor</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
type with a trivial copy-constructor then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
type with a trivial copy-constructor then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
These two traits are synonyms for each other.
|
||||
@@ -44,10 +44,10 @@
|
||||
<p>
|
||||
If a type has a trivial copy-constructor then the constructor has the same
|
||||
effect as copying the bits of one object to the other: calls to the constructor
|
||||
can be safely replaced with a call to <tt class="computeroutput"><span class="identifier">memcpy</span></tt>.
|
||||
can be safely replaced with a call to <code class="computeroutput"><span class="identifier">memcpy</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with function types.
|
||||
</p>
|
||||
@@ -55,26 +55,26 @@
|
||||
Without some (as yet unspecified) help from the compiler, has_trivial_copy
|
||||
will never report that a user-defined class or struct has a trivial constructor;
|
||||
this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW
|
||||
9 and Visual C++ 8 have the necessary compiler <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>
|
||||
9 and Visual C++ 8 have the necessary compiler <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>
|
||||
to detect user-defined classes with trivial constructors.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 12.8p6.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 12.8p6.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">has_trivial_copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">has_trivial_copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_copy</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_copy</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -83,7 +83,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_copy</span><span class="special"><</span><span class="keyword">char</span><span class="special">*>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_copy</span><span class="special"><</span><span class="keyword">char</span><span class="special">*>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -92,7 +92,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_copy</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_copy</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -102,7 +102,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_copy</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_copy</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -112,7 +112,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_copy</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_copy</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -125,8 +125,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> has_trivial_copy_constructor</title>
|
||||
<title>has_trivial_copy_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_copy.html" title=" has_trivial_copy">
|
||||
<link rel="next" href="has_trivial_def_cons.html" title=" has_trivial_default_constructor">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_copy.html" title="has_trivial_copy">
|
||||
<link rel="next" href="has_trivial_def_cons.html" title="has_trivial_default_constructor">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,9 +24,10 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_cp_cons"></a><a href="has_trivial_cp_cons.html" title=" has_trivial_copy_constructor"> has_trivial_copy_constructor</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_trivial_cp_cons"></a><a href="has_trivial_cp_cons.html" title="has_trivial_copy_constructor"> has_trivial_copy_constructor</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
See <a href="has_trivial_copy.html" title=" has_trivial_copy">has_trivial_copy</a>.
|
||||
See <a href="has_trivial_copy.html" title="has_trivial_copy">has_trivial_copy</a>.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -36,8 +37,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> has_trivial_default_constructor</title>
|
||||
<title>has_trivial_default_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_cp_cons.html" title=" has_trivial_copy_constructor">
|
||||
<link rel="next" href="has_trivial_destructor.html" title=" has_trivial_destructor">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_cp_cons.html" title="has_trivial_copy_constructor">
|
||||
<link rel="next" href="has_trivial_destructor.html" title="has_trivial_destructor">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,10 +24,10 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_def_cons"></a><a href="has_trivial_def_cons.html" title=" has_trivial_default_constructor"> has_trivial_default_constructor</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_trivial_def_cons"></a><a href="has_trivial_def_cons.html" title="has_trivial_default_constructor"> has_trivial_default_constructor</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
See <a href="has_trivial_constructor.html" title="
|
||||
has_trivial_constructor">has_trivial_constructor</a>.
|
||||
See <a href="has_trivial_constructor.html" title="has_trivial_constructor">has_trivial_constructor</a>.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -37,8 +37,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> has_trivial_destructor</title>
|
||||
<title>has_trivial_destructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_def_cons.html" title=" has_trivial_default_constructor">
|
||||
<link rel="next" href="has_virtual_destructor.html" title=" has_virtual_destructor">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_def_cons.html" title="has_trivial_default_constructor">
|
||||
<link rel="next" href="has_virtual_destructor.html" title="has_virtual_destructor">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,15 +24,16 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_destructor"></a><a href="has_trivial_destructor.html" title=" has_trivial_destructor"> has_trivial_destructor</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_trivial_destructor"></a><a href="has_trivial_destructor.html" title="has_trivial_destructor"> has_trivial_destructor</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_destructor</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_trivial_destructor</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
type with a trivial destructor then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
type with a trivial destructor then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
If a type has a trivial destructor then the destructor has no effect: calls
|
||||
@@ -42,7 +43,7 @@
|
||||
some benefit in terms of code size and speed can be obtained.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with function types.
|
||||
</p>
|
||||
@@ -50,25 +51,25 @@
|
||||
Without some (as yet unspecified) help from the compiler, has_trivial_destructor
|
||||
will never report that a user-defined class or struct has a trivial destructor;
|
||||
this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW
|
||||
9 and Visual C++ 8 have the necessary compiler <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>
|
||||
9 and Visual C++ 8 have the necessary compiler <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>
|
||||
to detect user-defined classes with trivial constructors.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 12.4p3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 12.4p3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">has_trivial_destructor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">has_trivial_destructor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_destructor</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></tt> inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_destructor</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code> inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -77,8 +78,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_destructor</span><span class="special"><</span><span class="keyword">char</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_destructor</span><span class="special"><</span><span class="keyword">char</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -87,7 +88,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_destructor</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_destructor</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -97,7 +98,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_destructor</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_destructor</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -107,8 +108,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">has_trivial_destructor</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt>
|
||||
is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">has_trivial_destructor</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code>
|
||||
is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -121,8 +122,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> has_virtual_destructor</title>
|
||||
<title>has_virtual_destructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_destructor.html" title=" has_trivial_destructor">
|
||||
<link rel="next" href="integral_constant.html" title=" integral_constant">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_destructor.html" title="has_trivial_destructor">
|
||||
<link rel="next" href="integral_constant.html" title="integral_constant">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,33 +24,34 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_virtual_destructor"></a><a href="has_virtual_destructor.html" title=" has_virtual_destructor"> has_virtual_destructor</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.has_virtual_destructor"></a><a href="has_virtual_destructor.html" title="has_virtual_destructor"> has_virtual_destructor</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_virtual_destructor</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">has_virtual_destructor</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
type with a virtual destructor then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
type with a virtual destructor then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> This trait is provided
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> This trait is provided
|
||||
for completeness, since it's part of the Technical Report on C++ Library
|
||||
Extensions. However, there is currently no way to portably implement this
|
||||
trait. The default version provided always inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>,
|
||||
trait. The default version provided always inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>,
|
||||
and has to be explicitly specialized for types with virtual destructors unless
|
||||
the compiler used has compiler <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>
|
||||
the compiler used has compiler <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>
|
||||
that enable the trait to do the right thing: currently (May 2005) only Visual
|
||||
C++ 8 has the necessary <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>.
|
||||
C++ 8 has the necessary <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 12.4.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 12.4.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">has_virtual_destructor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">has_virtual_destructor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -60,8 +61,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> integral_constant</title>
|
||||
<title>integral_constant</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="has_virtual_destructor.html" title=" has_virtual_destructor">
|
||||
<link rel="next" href="integral_promotion.html" title=" integral_promotion">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_virtual_destructor.html" title="has_virtual_destructor">
|
||||
<link rel="next" href="integral_promotion.html" title="integral_promotion">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.integral_constant"></a><a href="integral_constant.html" title=" integral_constant"> integral_constant</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.integral_constant"></a><a href="integral_constant.html" title="integral_constant"> integral_constant</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">val</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">integral_constant</span>
|
||||
@@ -38,9 +39,9 @@
|
||||
<span class="keyword">typedef</span> <span class="identifier">integral_constant</span><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span> <span class="keyword">false</span><span class="special">></span> <span class="identifier">false_type</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
Class template <tt class="computeroutput"><span class="identifier">integral_constant</span></tt>
|
||||
Class template <code class="computeroutput"><span class="identifier">integral_constant</span></code>
|
||||
is the common base class for all the value-based type traits. The two typedef's
|
||||
<tt class="computeroutput"><span class="identifier">true_type</span></tt> and <tt class="computeroutput"><span class="identifier">false_type</span></tt> are provided for convenience:
|
||||
<code class="computeroutput"><span class="identifier">true_type</span></code> and <code class="computeroutput"><span class="identifier">false_type</span></code> are provided for convenience:
|
||||
most of the value traits are Boolean properties and so will inherit from
|
||||
one of these.
|
||||
</p>
|
||||
@@ -52,8 +53,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> integral_promotion</title>
|
||||
<title>integral_promotion</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="integral_constant.html" title=" integral_constant">
|
||||
<link rel="next" href="is_abstract.html" title=" is_abstract">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="integral_constant.html" title="integral_constant">
|
||||
<link rel="next" href="is_abstract.html" title="is_abstract">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,33 +24,34 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.integral_promotion"></a><a href="integral_promotion.html" title=" integral_promotion"> integral_promotion</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.integral_promotion"></a><a href="integral_promotion.html" title="integral_promotion"> integral_promotion</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">integral_promotion</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> If integral promotion can be applied
|
||||
to an rvalue of type <tt class="computeroutput"><span class="identifier">T</span></tt>, then
|
||||
applies integral promotion to <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
and keeps cv-qualifiers of <tt class="computeroutput"><span class="identifier">T</span></tt>,
|
||||
otherwise leaves <tt class="computeroutput"><span class="identifier">T</span></tt> unchanged.
|
||||
<span class="bold"><strong>type:</strong></span> If integral promotion can be applied
|
||||
to an rvalue of type <code class="computeroutput"><span class="identifier">T</span></code>, then
|
||||
applies integral promotion to <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
and keeps cv-qualifiers of <code class="computeroutput"><span class="identifier">T</span></code>,
|
||||
otherwise leaves <code class="computeroutput"><span class="identifier">T</span></code> unchanged.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 4.5 except 4.5/3
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 4.5 except 4.5/3
|
||||
(integral bit-field).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">integral_promotion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">integral_promotion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id482141"></a><p class="title"><b>Table 1.14. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id516064"></a><p class="title"><b>Table 1.14. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -71,43 +72,44 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">integral_promotion</span><span class="special"><</span><span class="keyword">short</span>
|
||||
<span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">integral_promotion</span><span class="special"><</span><span class="keyword">short</span>
|
||||
<span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">integral_promotion</span><span class="special"><</span><span class="keyword">short</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">integral_promotion</span><span class="special"><</span><span class="keyword">short</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">short</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">short</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">integral_promotion</span><span class="special"><</span><span class="keyword">enum</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">float_round_style</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">integral_promotion</span><span class="special"><</span><span class="keyword">enum</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">float_round_style</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -116,8 +118,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_abstract</title>
|
||||
<title>is_abstract</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="integral_promotion.html" title=" integral_promotion">
|
||||
<link rel="next" href="is_arithmetic.html" title=" is_arithmetic">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="integral_promotion.html" title="integral_promotion">
|
||||
<link rel="next" href="is_arithmetic.html" title="is_arithmetic">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,28 +24,29 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_abstract"></a><a href="is_abstract.html" title=" is_abstract"> is_abstract</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_abstract"></a><a href="is_abstract.html" title="is_abstract"> is_abstract</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_abstract</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_abstract</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
abstract type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
abstract type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 10.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 10.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_abstract</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_abstract</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> The compiler must
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> The compiler must
|
||||
support DR337 (as of April 2005: GCC 3.4, VC++ 7.1 (and later), Intel C++
|
||||
7 (and later), and Comeau 4.3.2). Otherwise behaves the same as <a href="is_polymorphic.html" title=" is_polymorphic">is_polymorphic</a>;
|
||||
7 (and later), and Comeau 4.3.2). Otherwise behaves the same as <a href="is_polymorphic.html" title="is_polymorphic">is_polymorphic</a>;
|
||||
this is the "safe fallback position" for which polymorphic types
|
||||
are always regarded as potentially abstract. The macro BOOST_NO_IS_ABSTRACT
|
||||
is used to signify that the implementation is buggy, users should check for
|
||||
@@ -53,13 +54,13 @@
|
||||
their particular use-case.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Given: <tt class="computeroutput"><span class="keyword">class</span> <span class="identifier">abc</span><span class="special">{</span> <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">abc</span><span class="special">()</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="special">};</span></tt>
|
||||
Given: <code class="computeroutput"><span class="keyword">class</span> <span class="identifier">abc</span><span class="special">{</span> <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">abc</span><span class="special">()</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="special">};</span></code>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -68,8 +69,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_abstract</span><span class="special"><</span><span class="identifier">abc</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_abstract</span><span class="special"><</span><span class="identifier">abc</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -78,7 +79,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_abstract</span><span class="special"><</span><span class="identifier">abc</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_abstract</span><span class="special"><</span><span class="identifier">abc</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -87,7 +88,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_abstract</span><span class="special"><</span><span class="identifier">abc</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_abstract</span><span class="special"><</span><span class="identifier">abc</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -97,7 +98,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_abstract</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_abstract</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -110,8 +111,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_arithmetic</title>
|
||||
<title>is_arithmetic</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_abstract.html" title=" is_abstract">
|
||||
<link rel="next" href="is_array.html" title=" is_array">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_abstract.html" title="is_abstract">
|
||||
<link rel="next" href="is_array.html" title="is_array">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,35 +24,36 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_arithmetic"></a><a href="is_arithmetic.html" title=" is_arithmetic"> is_arithmetic</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_arithmetic"></a><a href="is_arithmetic.html" title="is_arithmetic"> is_arithmetic</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_arithmetic</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_arithmetic</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
arithmetic type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
Arithmetic types include integral and floating point types (see also <a href="is_integral.html" title=" is_integral">is_integral</a> and
|
||||
<a href="is_floating_point.html" title=" is_floating_point">is_floating_point</a>).
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
arithmetic type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
Arithmetic types include integral and floating point types (see also <a href="is_integral.html" title="is_integral">is_integral</a> and
|
||||
<a href="is_floating_point.html" title="is_floating_point">is_floating_point</a>).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.1p8.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.1p8.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_arithmetic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_arithmetic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_arithmetic</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_arithmetic</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -61,7 +62,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_arithmetic</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_arithmetic</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -70,7 +71,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_arithmetic</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_arithmetic</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -80,7 +81,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_arithmetic</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_arithmetic</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -93,8 +94,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_array</title>
|
||||
<title>is_array</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_arithmetic.html" title=" is_arithmetic">
|
||||
<link rel="next" href="is_base_of.html" title=" is_base_of">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_arithmetic.html" title="is_arithmetic">
|
||||
<link rel="next" href="is_base_of.html" title="is_base_of">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,37 +24,38 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_array"></a><a href="is_array.html" title=" is_array"> is_array</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_array"></a><a href="is_array.html" title="is_array"> is_array</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_array</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_array</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
array type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
array type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.2 and 8.3.4.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2 and 8.3.4.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_array</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_array</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can give the wrong result with function types.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_array</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">]></span></tt> inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_array</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">]></span></code> inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -63,8 +64,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_array</span><span class="special"><</span><span class="keyword">char</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">3</span><span class="special">]>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_array</span><span class="special"><</span><span class="keyword">char</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">3</span><span class="special">]>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -73,7 +74,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_array</span><span class="special"><</span><span class="keyword">double</span><span class="special">[]>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_array</span><span class="special"><</span><span class="keyword">double</span><span class="special">[]>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -83,7 +84,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_array</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_array</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -96,8 +97,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_base_of</title>
|
||||
<title>is_base_of</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_array.html" title=" is_array">
|
||||
<link rel="next" href="is_class.html" title=" is_class">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_array.html" title="is_array">
|
||||
<link rel="next" href="is_class.html" title="is_class">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,56 +24,57 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_base_of"></a><a href="is_base_of.html" title=" is_base_of"> is_base_of</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_base_of"></a><a href="is_base_of.html" title="is_base_of"> is_base_of</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Base</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_base_of</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_base_of</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If Base is base class of type
|
||||
Derived or if both types are the same then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If Base is base class of type
|
||||
Derived or if both types are the same then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
This template will detect non-public base classes, and ambiguous base classes.
|
||||
</p>
|
||||
<p>
|
||||
Note that <tt class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">X</span><span class="special">,</span><span class="identifier">X</span><span class="special">></span></tt> will always inherit from <a href="integral_constant.html" title=" integral_constant">true_type</a>.
|
||||
<span class="bold"><b>This is the case even if <tt class="computeroutput"><span class="identifier">X</span></tt>
|
||||
is not a class type</b></span>. This is a change in behaviour from Boost-1.33
|
||||
Note that <code class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">X</span><span class="special">,</span><span class="identifier">X</span><span class="special">></span></code> will always inherit from <a href="integral_constant.html" title="integral_constant">true_type</a>.
|
||||
<span class="bold"><strong>This is the case even if <code class="computeroutput"><span class="identifier">X</span></code>
|
||||
is not a class type</strong></span>. This is a change in behaviour from Boost-1.33
|
||||
in order to track the Technical Report on C++ Library Extensions.
|
||||
</p>
|
||||
<p>
|
||||
Types <tt class="computeroutput"><span class="identifier">Base</span></tt> and <tt class="computeroutput"><span class="identifier">Derived</span></tt> must not be incomplete types.
|
||||
Types <code class="computeroutput"><span class="identifier">Base</span></code> and <code class="computeroutput"><span class="identifier">Derived</span></code> must not be incomplete types.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 10.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 10.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_base_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_base_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with function types. There are some older compilers which
|
||||
will produce compiler errors if <tt class="computeroutput"><span class="identifier">Base</span></tt>
|
||||
is a private base class of <tt class="computeroutput"><span class="identifier">Derived</span></tt>,
|
||||
or if <tt class="computeroutput"><span class="identifier">Base</span></tt> is an ambiguous
|
||||
base of <tt class="computeroutput"><span class="identifier">Derived</span></tt>. These compilers
|
||||
will produce compiler errors if <code class="computeroutput"><span class="identifier">Base</span></code>
|
||||
is a private base class of <code class="computeroutput"><span class="identifier">Derived</span></code>,
|
||||
or if <code class="computeroutput"><span class="identifier">Base</span></code> is an ambiguous
|
||||
base of <code class="computeroutput"><span class="identifier">Derived</span></code>. These compilers
|
||||
include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and
|
||||
older versions of EDG based compilers.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Given: <tt class="computeroutput"> <span class="keyword">class</span> <span class="identifier">Base</span><span class="special">{};</span> <span class="keyword">class</span> <span class="identifier">Derived</span> <span class="special">:</span>
|
||||
<span class="keyword">public</span> <span class="identifier">Base</span><span class="special">{};</span></tt>
|
||||
Given: <code class="computeroutput"> <span class="keyword">class</span> <span class="identifier">Base</span><span class="special">{};</span> <span class="keyword">class</span> <span class="identifier">Derived</span> <span class="special">:</span>
|
||||
<span class="keyword">public</span> <span class="identifier">Base</span><span class="special">{};</span></code>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -82,8 +83,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -92,7 +93,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -101,7 +102,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -111,7 +112,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -121,7 +122,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Base</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Base</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>: a class is regarded as it's
|
||||
own base.
|
||||
</p>
|
||||
@@ -132,7 +133,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -145,8 +146,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_class</title>
|
||||
<title>is_class</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_base_of.html" title=" is_base_of">
|
||||
<link rel="next" href="is_complex.html" title=" is_complex">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_base_of.html" title="is_base_of">
|
||||
<link rel="next" href="is_complex.html" title="is_complex">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,40 +24,41 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_class"></a><a href="is_class.html" title=" is_class"> is_class</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_class"></a><a href="is_class.html" title="is_class"> is_class</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_class</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_class</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
class type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
class type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.2 and 9.2.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2 and 9.2.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_class</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_class</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> Without (some as
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> Without (some as
|
||||
yet unspecified) help from the compiler, we cannot distinguish between union
|
||||
and class types, as a result this type will erroneously inherit from <a href="integral_constant.html" title=" integral_constant">true_type</a> for
|
||||
union types. See also <a href="is_union.html" title=" is_union">is_union</a>.
|
||||
Currently (May 2005) only Visual C++ 8 has the necessary compiler <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>
|
||||
and class types, as a result this type will erroneously inherit from <a href="integral_constant.html" title="integral_constant">true_type</a> for
|
||||
union types. See also <a href="is_union.html" title="is_union">is_union</a>.
|
||||
Currently (May 2005) only Visual C++ 8 has the necessary compiler <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>
|
||||
to correctly identify union types, and therefore make is_class function correctly.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Given: <tt class="computeroutput"><span class="keyword">class</span> <span class="identifier">MyClass</span><span class="special">;</span></tt> then:
|
||||
Given: <code class="computeroutput"><span class="keyword">class</span> <span class="identifier">MyClass</span><span class="special">;</span></code> then:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -66,8 +67,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -76,8 +77,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -86,7 +87,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -96,7 +97,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">&>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">&>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -106,7 +107,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">*>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">*>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -116,7 +117,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -129,8 +130,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_complex</title>
|
||||
<title>is_complex</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_class.html" title=" is_class">
|
||||
<link rel="next" href="is_compound.html" title=" is_compound">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_class.html" title="is_class">
|
||||
<link rel="next" href="is_compound.html" title="is_compound">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,24 +24,25 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_complex"></a><a href="is_complex.html" title=" is_complex"> is_complex</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_complex"></a><a href="is_complex.html" title="is_complex"> is_complex</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_complex</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_complex</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
is a complex number type then true (of type <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span></tt>
|
||||
for some type <tt class="computeroutput"><span class="identifier">U</span></tt>), otherwise
|
||||
<span class="bold"><strong>Inherits:</strong></span> If <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
is a complex number type then true (of type <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span></code>
|
||||
for some type <code class="computeroutput"><span class="identifier">U</span></code>), otherwise
|
||||
false.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 26.2.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 26.2.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_complex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_complex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -51,8 +52,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_compound</title>
|
||||
<title>is_compound</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_complex.html" title=" is_complex">
|
||||
<link rel="next" href="is_const.html" title=" is_const">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_complex.html" title="is_complex">
|
||||
<link rel="next" href="is_const.html" title="is_const">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,34 +24,35 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_compound"></a><a href="is_compound.html" title=" is_compound"> is_compound</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_compound"></a><a href="is_compound.html" title="is_compound"> is_compound</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_compound</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_compound</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
compound type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
Any type that is not a fundamental type is a compound type (see also <a href="is_fundamental.html" title=" is_fundamental">is_fundamental</a>).
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
compound type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
Any type that is not a fundamental type is a compound type (see also <a href="is_fundamental.html" title="is_fundamental">is_fundamental</a>).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.2.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_compound</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_compound</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -60,7 +61,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="identifier">MyEnum</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="identifier">MyEnum</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -69,7 +70,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -79,7 +80,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="keyword">int</span><span class="special">&>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="keyword">int</span><span class="special">&>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -89,7 +90,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -99,7 +100,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_compound</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -112,8 +113,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_const</title>
|
||||
<title>is_const</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_compound.html" title=" is_compound">
|
||||
<link rel="next" href="is_convertible.html" title=" is_convertible">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_compound.html" title="is_compound">
|
||||
<link rel="next" href="is_convertible.html" title="is_convertible">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,32 +24,33 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_const"></a><a href="is_const.html" title=" is_const"> is_const</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_const"></a><a href="is_const.html" title="is_const"> is_const</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_const</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_const</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (top level) const-qualified
|
||||
type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (top level) const-qualified
|
||||
type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_const</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_const</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">></span></tt> inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">></span></code> inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -58,7 +59,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -67,7 +68,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">*</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">*</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -77,7 +78,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>false</em></span>:
|
||||
the const-qualifier is not at the top level in this case.
|
||||
</p>
|
||||
@@ -88,7 +89,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>false</em></span>:
|
||||
the const-qualifier is not at the top level in this case.
|
||||
</p>
|
||||
@@ -99,7 +100,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -109,7 +110,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_const</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -122,8 +123,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_convertible</title>
|
||||
<title>is_convertible</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_const.html" title=" is_const">
|
||||
<link rel="next" href="is_empty.html" title=" is_empty">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_const.html" title="is_const">
|
||||
<link rel="next" href="is_empty.html" title="is_empty">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,16 +24,17 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_convertible"></a><a href="is_convertible.html" title=" is_convertible"> is_convertible</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_convertible"></a><a href="is_convertible.html" title="is_convertible"> is_convertible</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">From</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">To</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_convertible</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_convertible</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If an imaginary lvalue of type
|
||||
<tt class="computeroutput"><span class="identifier">From</span></tt> is convertible to type
|
||||
<tt class="computeroutput"><span class="identifier">To</span></tt> then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If an imaginary lvalue of type
|
||||
<code class="computeroutput"><span class="identifier">From</span></code> is convertible to type
|
||||
<code class="computeroutput"><span class="identifier">To</span></code> then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
Type From must not be an incomplete type.
|
||||
@@ -46,12 +47,12 @@
|
||||
types.
|
||||
</p>
|
||||
<p>
|
||||
This template can not detect whether a converting-constructor is <tt class="computeroutput"><span class="keyword">public</span></tt> or not: if type <tt class="computeroutput"><span class="identifier">To</span></tt>
|
||||
has a <tt class="computeroutput"><span class="keyword">private</span></tt> converting constructor
|
||||
from type <tt class="computeroutput"><span class="identifier">From</span></tt> then instantiating
|
||||
<tt class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="identifier">From</span><span class="special">,</span> <span class="identifier">To</span><span class="special">></span></tt>
|
||||
will produce a compiler error. For this reason <tt class="computeroutput"><span class="identifier">is_convertible</span></tt>
|
||||
can not be used to determine whether a type has a <tt class="computeroutput"><span class="keyword">public</span></tt>
|
||||
This template can not detect whether a converting-constructor is <code class="computeroutput"><span class="keyword">public</span></code> or not: if type <code class="computeroutput"><span class="identifier">To</span></code>
|
||||
has a <code class="computeroutput"><span class="keyword">private</span></code> converting constructor
|
||||
from type <code class="computeroutput"><span class="identifier">From</span></code> then instantiating
|
||||
<code class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="identifier">From</span><span class="special">,</span> <span class="identifier">To</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">is_convertible</span></code>
|
||||
can not be used to determine whether a type has a <code class="computeroutput"><span class="keyword">public</span></code>
|
||||
copy-constructor or not.
|
||||
</p>
|
||||
<p>
|
||||
@@ -67,30 +68,30 @@
|
||||
</span><span class="keyword">bool</span> <span class="keyword">const</span> <span class="identifier">y</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_convertible</span><span class="special"><</span><span class="identifier">D</span><span class="special">*,</span><span class="identifier">A</span><span class="special">*>::</span><span class="identifier">value</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 4 and 8.5.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 4 and 8.5.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> This template is
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> This template is
|
||||
currently broken with Borland C++ Builder 5 (and earlier), for constructor-based
|
||||
conversions, and for the Metrowerks 7 (and earlier) compiler in all cases.
|
||||
If the compiler does not support <tt class="computeroutput"><a href="is_abstract.html" title=" is_abstract">is_abstract</a></tt>,
|
||||
then the template parameter <tt class="computeroutput"><span class="identifier">To</span></tt>
|
||||
If the compiler does not support <code class="computeroutput"><a href="is_abstract.html" title="is_abstract">is_abstract</a></code>,
|
||||
then the template parameter <code class="computeroutput"><span class="identifier">To</span></code>
|
||||
must not be an abstract type.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_convertible</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_convertible</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -99,8 +100,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -109,7 +110,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">int</span><span class="special">*</span> <span class="keyword">const</span><span class="special">,</span> <span class="keyword">int</span><span class="special">*>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">int</span><span class="special">*</span> <span class="keyword">const</span><span class="special">,</span> <span class="keyword">int</span><span class="special">*>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -119,9 +120,9 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*,</span> <span class="keyword">int</span><span class="special">*>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*,</span> <span class="keyword">int</span><span class="special">*>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>false</em></span>:
|
||||
the conversion would require a <tt class="computeroutput"><span class="keyword">const_cast</span></tt>.
|
||||
the conversion would require a <code class="computeroutput"><span class="keyword">const_cast</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -130,7 +131,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&,</span> <span class="keyword">long</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&,</span> <span class="keyword">long</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -140,7 +141,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -150,7 +151,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_convertible</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -163,8 +164,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_empty</title>
|
||||
<title>is_empty</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_convertible.html" title=" is_convertible">
|
||||
<link rel="next" href="is_enum.html" title=" is_enum">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_convertible.html" title="is_convertible">
|
||||
<link rel="next" href="is_enum.html" title="is_enum">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,26 +24,27 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_empty"></a><a href="is_empty.html" title=" is_empty"> is_empty</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_empty"></a><a href="is_empty.html" title="is_empty"> is_empty</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_empty</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_empty</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is an empty class type then
|
||||
inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is an empty class type then
|
||||
inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 10p5.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 10p5.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_empty</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_empty</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> In order to correctly
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> In order to correctly
|
||||
detect empty classes this trait relies on either:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
@@ -51,7 +52,7 @@
|
||||
the compiler implementing zero sized empty base classes, or
|
||||
</li>
|
||||
<li>
|
||||
the compiler providing <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>
|
||||
the compiler providing <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>
|
||||
to detect empty classes.
|
||||
</li>
|
||||
</ul></div>
|
||||
@@ -66,14 +67,14 @@
|
||||
then this template can not be used with abstract types.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Given: <tt class="computeroutput"><span class="keyword">struct</span> <span class="identifier">empty_class</span>
|
||||
<span class="special">{};</span></tt>
|
||||
Given: <code class="computeroutput"><span class="keyword">struct</span> <span class="identifier">empty_class</span>
|
||||
<span class="special">{};</span></code>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -82,8 +83,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_empty</span><span class="special"><</span><span class="identifier">empty_class</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_empty</span><span class="special"><</span><span class="identifier">empty_class</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -92,8 +93,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_empty</span><span class="special"><</span><span class="identifier">empty_class</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_empty</span><span class="special"><</span><span class="identifier">empty_class</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -102,7 +103,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_empty</span><span class="special"><</span><span class="identifier">empty_class</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_empty</span><span class="special"><</span><span class="identifier">empty_class</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -112,7 +113,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_empty</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_empty</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -125,8 +126,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_enum</title>
|
||||
<title>is_enum</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_empty.html" title=" is_empty">
|
||||
<link rel="next" href="is_floating_point.html" title=" is_floating_point">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_empty.html" title="is_empty">
|
||||
<link rel="next" href="is_floating_point.html" title="is_floating_point">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,40 +24,41 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_enum"></a><a href="is_enum.html" title=" is_enum"> is_enum</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_enum"></a><a href="is_enum.html" title="is_enum"> is_enum</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_enum</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_enum</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
enum type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
enum type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.2 and 7.2.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2 and 7.2.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_enum</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_enum</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> Requires a correctly
|
||||
functioning <a href="is_convertible.html" title=" is_convertible">is_convertible</a>
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> Requires a correctly
|
||||
functioning <a href="is_convertible.html" title="is_convertible">is_convertible</a>
|
||||
template; this means that is_enum is currently broken under Borland C++ Builder
|
||||
5, and for the Metrowerks compiler prior to version 8, other compilers should
|
||||
handle this template just fine.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Given: <tt class="computeroutput"><span class="keyword">enum</span> <span class="identifier">my_enum</span>
|
||||
<span class="special">{</span> <span class="identifier">one</span><span class="special">,</span> <span class="identifier">two</span> <span class="special">};</span></tt>
|
||||
Given: <code class="computeroutput"><span class="keyword">enum</span> <span class="identifier">my_enum</span>
|
||||
<span class="special">{</span> <span class="identifier">one</span><span class="special">,</span> <span class="identifier">two</span> <span class="special">};</span></code>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -66,8 +67,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -76,8 +77,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">my_enum</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">my_enum</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -86,7 +87,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -96,7 +97,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">&>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">&>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -106,7 +107,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">*>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">*>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -116,7 +117,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_enum</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -129,8 +130,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_floating_point</title>
|
||||
<title>is_floating_point</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_enum.html" title=" is_enum">
|
||||
<link rel="next" href="is_function.html" title=" is_function">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_enum.html" title="is_enum">
|
||||
<link rel="next" href="is_function.html" title="is_function">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,33 +24,34 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_floating_point"></a><a href="is_floating_point.html" title=" is_floating_point"> is_floating_point</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_floating_point"></a><a href="is_floating_point.html" title="is_floating_point"> is_floating_point</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_floating_point</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_floating_point</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
floating point type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
floating point type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.1p8.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.1p8.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_floating_point</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_floating_point</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_floating_point</span><span class="special"><</span><span class="keyword">float</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_floating_point</span><span class="special"><</span><span class="keyword">float</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -59,7 +60,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_floating_point</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_floating_point</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -68,7 +69,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_floating_point</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_floating_point</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -78,7 +79,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_floating_point</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_floating_point</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -91,8 +92,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_function</title>
|
||||
<title>is_function</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_floating_point.html" title=" is_floating_point">
|
||||
<link rel="next" href="is_fundamental.html" title=" is_fundamental">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_floating_point.html" title="is_floating_point">
|
||||
<link rel="next" href="is_fundamental.html" title="is_fundamental">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,17 +24,18 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_function"></a><a href="is_function.html" title=" is_function"> is_function</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_function"></a><a href="is_function.html" title="is_function"> is_function</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_function</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_function</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
function type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
function type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
Note that this template does not detect <span class="emphasis"><em>pointers to functions</em></span>,
|
||||
or <span class="emphasis"><em>references to functions</em></span>, these are detected by <a href="is_pointer.html" title=" is_pointer">is_pointer</a> and <a href="is_reference.html" title=" is_reference">is_reference</a> respectively:
|
||||
or <span class="emphasis"><em>references to functions</em></span>, these are detected by <a href="is_pointer.html" title="is_pointer">is_pointer</a> and <a href="is_reference.html" title="is_reference">is_reference</a> respectively:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">typedef</span> <span class="keyword">int</span> <span class="identifier">f1</span><span class="special">();</span> <span class="comment">// f1 is of function type.
|
||||
@@ -42,22 +43,22 @@
|
||||
</span><span class="keyword">typedef</span> <span class="keyword">int</span> <span class="special">(</span><span class="identifier">f3</span><span class="special">&)();</span> <span class="comment">// f3 is a reference to a function.
|
||||
</span></pre>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.2p1 and 8.3.5.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2p1 and 8.3.5.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="keyword">void</span><span class="special">)></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="keyword">void</span><span class="special">)></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -66,7 +67,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -75,7 +76,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -85,7 +86,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(*)(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(*)(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>: the argument in this case
|
||||
is a pointer type, not a function type.
|
||||
</p>
|
||||
@@ -96,7 +97,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(&)(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(&)(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>: the argument in this case
|
||||
is a reference to a function, not a function type.
|
||||
</p>
|
||||
@@ -107,7 +108,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="keyword">long</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>: the argument in this case
|
||||
is a pointer to a member function.
|
||||
</p>
|
||||
@@ -118,7 +119,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_function</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -128,46 +129,45 @@
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../../../../doc/html/images/tip.png"></td>
|
||||
<th align="left">Tip</th>
|
||||
</tr>
|
||||
<tr><td colspan="2" align="left" valign="top">
|
||||
<tr><td align="left" valign="top">
|
||||
<p>
|
||||
Don't confuse function-types with pointers to functions:
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">typedef</span> <span class="keyword">int</span>
|
||||
<span class="identifier">f</span><span class="special">(</span><span class="keyword">double</span><span class="special">);</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">typedef</span> <span class="keyword">int</span>
|
||||
<span class="identifier">f</span><span class="special">(</span><span class="keyword">double</span><span class="special">);</span></code>
|
||||
</p>
|
||||
<p>
|
||||
defines a function type,
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">f</span> <span class="identifier">foo</span><span class="special">;</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">f</span> <span class="identifier">foo</span><span class="special">;</span></code>
|
||||
</p>
|
||||
<p>
|
||||
declares a prototype for a function of type <tt class="computeroutput"><span class="identifier">f</span></tt>,
|
||||
declares a prototype for a function of type <code class="computeroutput"><span class="identifier">f</span></code>,
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">f</span><span class="special">*</span>
|
||||
<code class="computeroutput"><span class="identifier">f</span><span class="special">*</span>
|
||||
<span class="identifier">pf</span> <span class="special">=</span>
|
||||
<span class="identifier">foo</span><span class="special">;</span></tt>
|
||||
<span class="identifier">foo</span><span class="special">;</span></code>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">f</span><span class="special">&</span>
|
||||
<code class="computeroutput"><span class="identifier">f</span><span class="special">&</span>
|
||||
<span class="identifier">fr</span> <span class="special">=</span>
|
||||
<span class="identifier">foo</span><span class="special">;</span></tt>
|
||||
<span class="identifier">foo</span><span class="special">;</span></code>
|
||||
</p>
|
||||
<p>
|
||||
declares a pointer and a reference to the function <tt class="computeroutput"><span class="identifier">foo</span></tt>.
|
||||
declares a pointer and a reference to the function <code class="computeroutput"><span class="identifier">foo</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
If you want to detect whether some type is a pointer-to-function then use:
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><a href="is_function.html" title=" is_function">is_function</a><span class="special"><</span><a href="remove_pointer.html" title=" remove_pointer">remove_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">value</span>
|
||||
<span class="special">&&</span> <a href="is_pointer.html" title=" is_pointer">is_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><a href="is_function.html" title="is_function">is_function</a><span class="special"><</span><a href="remove_pointer.html" title="remove_pointer">remove_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">value</span>
|
||||
<span class="special">&&</span> <a href="is_pointer.html" title="is_pointer">is_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
</p>
|
||||
<p>
|
||||
or for pointers to member functions you can just use <a href="is_member_function_pointer.html" title="
|
||||
is_member_function_pointer">is_member_function_pointer</a>
|
||||
or for pointers to member functions you can just use <a href="is_member_function_pointer.html" title="is_member_function_pointer">is_member_function_pointer</a>
|
||||
directly.
|
||||
</p>
|
||||
</td></tr>
|
||||
@@ -180,8 +180,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_fundamental</title>
|
||||
<title>is_fundamental</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_function.html" title=" is_function">
|
||||
<link rel="next" href="is_integral.html" title=" is_integral">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_function.html" title="is_function">
|
||||
<link rel="next" href="is_integral.html" title="is_integral">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,37 +24,38 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_fundamental"></a><a href="is_fundamental.html" title=" is_fundamental"> is_fundamental</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_fundamental"></a><a href="is_fundamental.html" title="is_fundamental"> is_fundamental</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_fundamental</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_fundamental</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
fundamental type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
fundamental type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
Fundamental types include integral, floating point and void types (see also
|
||||
<a href="is_integral.html" title=" is_integral">is_integral</a>,
|
||||
<a href="is_floating_point.html" title=" is_floating_point">is_floating_point</a>
|
||||
and <a href="is_void.html" title=" is_void">is_void</a>)
|
||||
<a href="is_integral.html" title="is_integral">is_integral</a>,
|
||||
<a href="is_floating_point.html" title="is_floating_point">is_floating_point</a>
|
||||
and <a href="is_void.html" title="is_void">is_void</a>)
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.1.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.1.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_fundamental</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_fundamental</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_fundamental</span><span class="special"><</span><span class="keyword">int</span><span class="special">)></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_fundamental</span><span class="special"><</span><span class="keyword">int</span><span class="special">)></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -63,8 +64,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_fundamental</span><span class="special"><</span><span class="keyword">double</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_fundamental</span><span class="special"><</span><span class="keyword">double</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -73,7 +74,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_fundamental</span><span class="special"><</span><span class="keyword">void</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_fundamental</span><span class="special"><</span><span class="keyword">void</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -83,7 +84,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_fundamental</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_fundamental</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -96,8 +97,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_integral</title>
|
||||
<title>is_integral</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_fundamental.html" title=" is_fundamental">
|
||||
<link rel="next" href="is_member_function_pointer.html" title="
|
||||
is_member_function_pointer">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_fundamental.html" title="is_fundamental">
|
||||
<link rel="next" href="is_member_function_pointer.html" title="is_member_function_pointer">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,33 +24,34 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_integral"></a><a href="is_integral.html" title=" is_integral"> is_integral</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_integral"></a><a href="is_integral.html" title="is_integral"> is_integral</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_integral</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_integral</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
integral type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
integral type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.1p7.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.1p7.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_integral</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_integral</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_integral</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_integral</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -60,8 +60,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_integral</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_integral</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -70,7 +70,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_integral</span><span class="special"><</span><span class="keyword">long</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_integral</span><span class="special"><</span><span class="keyword">long</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -80,7 +80,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_integral</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_integral</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -93,8 +93,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
is_member_function_pointer</title>
|
||||
<title>is_member_function_pointer</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_integral.html" title=" is_integral">
|
||||
<link rel="next" href="is_member_object_pointer.html" title="
|
||||
is_member_object_pointer">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_integral.html" title="is_integral">
|
||||
<link rel="next" href="is_member_object_pointer.html" title="is_member_object_pointer">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -26,34 +24,34 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_member_function_pointer"></a><a href="is_member_function_pointer.html" title="
|
||||
is_member_function_pointer">
|
||||
is_member_function_pointer</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_member_function_pointer"></a><a href="is_member_function_pointer.html" title="is_member_function_pointer">
|
||||
is_member_function_pointer</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_member_function_pointer</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_member_function_pointer</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
pointer to a member function then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
pointer to a member function then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.2 and 8.3.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2 and 8.3.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_member_function_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_member_function_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_function_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">void</span><span class="special">)></span></tt> inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_member_function_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">void</span><span class="special">)></span></code> inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -62,8 +60,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_function_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">char</span><span class="special">)>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_member_function_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">char</span><span class="special">)>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -72,7 +70,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_function_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">void</span><span class="special">)</span><span class="keyword">const</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_member_function_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">void</span><span class="special">)</span><span class="keyword">const</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -82,12 +80,11 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_function_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_member_function_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>false</em></span>:
|
||||
the argument in this case is a pointer to a data member and not a member
|
||||
function, see <a href="is_member_object_pointer.html" title="
|
||||
is_member_object_pointer">is_member_object_pointer</a>
|
||||
and <a href="is_member_pointer.html" title=" is_member_pointer">is_member_pointer</a>
|
||||
function, see <a href="is_member_object_pointer.html" title="is_member_object_pointer">is_member_object_pointer</a>
|
||||
and <a href="is_member_pointer.html" title="is_member_pointer">is_member_pointer</a>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -96,8 +93,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_function_pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt>
|
||||
is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_member_function_pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code>
|
||||
is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -110,8 +107,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
is_member_object_pointer</title>
|
||||
<title>is_member_object_pointer</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_member_function_pointer.html" title="
|
||||
is_member_function_pointer">
|
||||
<link rel="next" href="is_member_pointer.html" title=" is_member_pointer">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_member_function_pointer.html" title="is_member_function_pointer">
|
||||
<link rel="next" href="is_member_pointer.html" title="is_member_pointer">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -26,34 +24,34 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_member_object_pointer"></a><a href="is_member_object_pointer.html" title="
|
||||
is_member_object_pointer">
|
||||
is_member_object_pointer</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_member_object_pointer"></a><a href="is_member_object_pointer.html" title="is_member_object_pointer">
|
||||
is_member_object_pointer</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_member_object_pointer</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_member_object_pointer</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
pointer to a member object (a data member) then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
pointer to a member object (a data member) then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.2 and 8.3.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2 and 8.3.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_member_object_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_member_object_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_object_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)></span></tt> inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_member_object_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)></span></code> inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -62,8 +60,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_object_pointer</span><span class="special"><</span><span class="keyword">double</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_member_object_pointer</span><span class="special"><</span><span class="keyword">double</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -72,7 +70,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_object_pointer</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_member_object_pointer</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -82,12 +80,11 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_object_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">void</span><span class="special">)>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_member_object_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">void</span><span class="special">)>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>false</em></span>:
|
||||
the argument in this case is a pointer to a member function and not a
|
||||
member object, see <a href="is_member_function_pointer.html" title="
|
||||
is_member_function_pointer">is_member_function_pointer</a>
|
||||
and <a href="is_member_pointer.html" title=" is_member_pointer">is_member_pointer</a>
|
||||
member object, see <a href="is_member_function_pointer.html" title="is_member_function_pointer">is_member_function_pointer</a>
|
||||
and <a href="is_member_pointer.html" title="is_member_pointer">is_member_pointer</a>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -96,8 +93,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_object_pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt>
|
||||
is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_member_object_pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code>
|
||||
is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -110,8 +107,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_member_pointer</title>
|
||||
<title>is_member_pointer</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_member_object_pointer.html" title="
|
||||
is_member_object_pointer">
|
||||
<link rel="next" href="is_object.html" title=" is_object">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_member_object_pointer.html" title="is_member_object_pointer">
|
||||
<link rel="next" href="is_object.html" title="is_object">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,34 +24,35 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_member_pointer"></a><a href="is_member_pointer.html" title=" is_member_pointer"> is_member_pointer</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_member_pointer"></a><a href="is_member_pointer.html" title="is_member_pointer"> is_member_pointer</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_member_pointer</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_member_pointer</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
pointer to a member (either a function or a data member) then inherits from
|
||||
<a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.2 and 8.3.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2 and 8.3.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_member_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_member_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_member_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -61,7 +61,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">char</span><span class="special">)>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_member_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">char</span><span class="special">)>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -70,7 +70,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">void</span><span class="special">)</span><span class="keyword">const</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_member_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">void</span><span class="special">)</span><span class="keyword">const</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -80,7 +80,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_member_pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_member_pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -93,8 +93,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_object</title>
|
||||
<title>is_object</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_member_pointer.html" title=" is_member_pointer">
|
||||
<link rel="next" href="is_pod.html" title=" is_pod">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_member_pointer.html" title="is_member_pointer">
|
||||
<link rel="next" href="is_pod.html" title="is_pod">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,34 +24,35 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_object"></a><a href="is_object.html" title=" is_object"> is_object</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_object"></a><a href="is_object.html" title="is_object"> is_object</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_object</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_object</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
object type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
object type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
All types are object types except references, void, and function types.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9p9.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9p9.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -60,7 +61,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -69,7 +70,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">void</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">void</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -79,7 +80,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">void</span><span class="special">)</span><span class="keyword">const</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">void</span><span class="special">)</span><span class="keyword">const</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -89,7 +90,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span> <span class="special">&>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span> <span class="special">&>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>: reference types are not
|
||||
objects
|
||||
</p>
|
||||
@@ -100,7 +101,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>: function types are not
|
||||
objects
|
||||
</p>
|
||||
@@ -111,7 +112,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>false</em></span>:
|
||||
void is not an object type
|
||||
</p>
|
||||
@@ -122,7 +123,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_object</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -135,8 +136,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_pod</title>
|
||||
<title>is_pod</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_object.html" title=" is_object">
|
||||
<link rel="next" href="is_pointer.html" title=" is_pointer">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_object.html" title="is_object">
|
||||
<link rel="next" href="is_pointer.html" title="is_pointer">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,15 +24,16 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_pod"></a><a href="is_pod.html" title=" is_pod"> is_pod</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_pod"></a><a href="is_pod.html" title="is_pod"> is_pod</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_pod</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_pod</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
POD type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
POD type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
POD stands for "Plain old data". Arithmetic types, and enumeration
|
||||
@@ -44,11 +45,11 @@
|
||||
array of PODs.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9p10 and 9p4 (Note
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9p10 and 9p4 (Note
|
||||
that POD's are also aggregates, see 8.5.1).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with function types.
|
||||
</p>
|
||||
@@ -59,19 +60,19 @@
|
||||
the necessary compiler-</span>_intrinsics.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_pod</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_pod</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pod</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_pod</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -80,7 +81,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pod</span><span class="special"><</span><span class="keyword">char</span><span class="special">*>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_pod</span><span class="special"><</span><span class="keyword">char</span><span class="special">*>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -89,7 +90,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pod</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_pod</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -99,7 +100,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pod</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_pod</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -109,7 +110,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pod</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_pod</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -122,8 +123,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_pointer</title>
|
||||
<title>is_pointer</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_pod.html" title=" is_pod">
|
||||
<link rel="next" href="is_polymorphic.html" title=" is_polymorphic">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_pod.html" title="is_pod">
|
||||
<link rel="next" href="is_polymorphic.html" title="is_polymorphic">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,34 +24,35 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_pointer"></a><a href="is_pointer.html" title=" is_pointer"> is_pointer</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_pointer"></a><a href="is_pointer.html" title="is_pointer"> is_pointer</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_pointer</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_pointer</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
pointer type (includes function pointers, but excludes pointers to members)
|
||||
then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.2p2 and 8.3.1.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2p2 and 8.3.1.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">*></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">*></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -60,7 +61,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="keyword">char</span><span class="special">*</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="keyword">char</span><span class="special">*</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -69,7 +70,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -79,7 +80,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -89,7 +90,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -99,7 +100,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -109,10 +110,10 @@
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../../doc/html/images/important.png"></td>
|
||||
<th align="left">Important</th>
|
||||
</tr>
|
||||
<tr><td colspan="2" align="left" valign="top"><p>
|
||||
<tt class="computeroutput"><span class="identifier">is_pointer</span></tt> detects "real"
|
||||
<tr><td align="left" valign="top"><p>
|
||||
<code class="computeroutput"><span class="identifier">is_pointer</span></code> detects "real"
|
||||
pointer types only, and <span class="emphasis"><em>not</em></span> smart pointers. Users
|
||||
should not specialise <tt class="computeroutput"><span class="identifier">is_pointer</span></tt>
|
||||
should not specialise <code class="computeroutput"><span class="identifier">is_pointer</span></code>
|
||||
for smart pointer types, as doing so may cause Boost (and other third party)
|
||||
code to fail to function correctly. Users wanting a trait to detect smart
|
||||
pointers should create their own. However, note that there is no way in
|
||||
@@ -128,8 +129,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_polymorphic</title>
|
||||
<title>is_polymorphic</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_pointer.html" title=" is_pointer">
|
||||
<link rel="next" href="is_same.html" title=" is_same">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_pointer.html" title="is_pointer">
|
||||
<link rel="next" href="is_same.html" title="is_same">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,39 +24,40 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_polymorphic"></a><a href="is_polymorphic.html" title=" is_polymorphic"> is_polymorphic</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_polymorphic"></a><a href="is_polymorphic.html" title="is_polymorphic"> is_polymorphic</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_polymorphic</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_polymorphic</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
polymorphic type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
Type <tt class="computeroutput"><span class="identifier">T</span></tt> must be a complete
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
polymorphic type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
Type <code class="computeroutput"><span class="identifier">T</span></code> must be a complete
|
||||
type.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 10.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 10.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> The implementation
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> The implementation
|
||||
requires some knowledge of the compilers ABI, it does actually seem to work
|
||||
with the majority of compilers though.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_polymorphic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_polymorphic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Given: <tt class="computeroutput"><span class="keyword">class</span> <span class="identifier">poly</span><span class="special">{</span> <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">poly</span><span class="special">();</span> <span class="special">};</span></tt>
|
||||
Given: <code class="computeroutput"><span class="keyword">class</span> <span class="identifier">poly</span><span class="special">{</span> <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">poly</span><span class="special">();</span> <span class="special">};</span></code>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -65,8 +66,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_polymorphic</span><span class="special"><</span><span class="identifier">poly</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_polymorphic</span><span class="special"><</span><span class="identifier">poly</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -75,8 +76,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_polymorphic</span><span class="special"><</span><span class="identifier">poly</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_polymorphic</span><span class="special"><</span><span class="identifier">poly</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -85,7 +86,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_polymorphic</span><span class="special"><</span><span class="identifier">poly</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_polymorphic</span><span class="special"><</span><span class="identifier">poly</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -95,7 +96,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_polymorphic</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_polymorphic</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -108,8 +109,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_reference</title>
|
||||
<title>is_reference</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_stateless.html" title=" is_stateless">
|
||||
<link rel="next" href="is_union.html" title=" is_union">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_stateless.html" title="is_stateless">
|
||||
<link rel="next" href="is_union.html" title="is_union">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,39 +24,40 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_reference"></a><a href="is_reference.html" title=" is_reference"> is_reference</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_reference"></a><a href="is_reference.html" title="is_reference"> is_reference</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_reference</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_reference</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a reference pointer type
|
||||
then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a reference pointer type
|
||||
then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.2 and 8.3.2.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2 and 8.3.2.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
may report the wrong result for function types, and for types that are both
|
||||
const and volatile qualified.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_reference</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_reference</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">&></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">&></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -65,8 +66,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_reference</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_reference</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -75,7 +76,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_reference</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(&)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_reference</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(&)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span> (the argument in this case
|
||||
is a reference to a function).
|
||||
</p>
|
||||
@@ -86,7 +87,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -99,8 +100,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_same</title>
|
||||
<title>is_same</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_polymorphic.html" title=" is_polymorphic">
|
||||
<link rel="next" href="is_scalar.html" title=" is_scalar">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_polymorphic.html" title="is_polymorphic">
|
||||
<link rel="next" href="is_scalar.html" title="is_scalar">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,35 +24,36 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_same"></a><a href="is_same.html" title=" is_same"> is_same</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_same"></a><a href="is_same.html" title="is_same"> is_same</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_same</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_same</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T and U are the same types
|
||||
then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T and U are the same types
|
||||
then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_same</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_same</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with abstract, incomplete or function types.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -61,7 +62,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -70,7 +71,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -80,7 +81,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -90,7 +91,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="keyword">int</span><span class="special">&,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="keyword">int</span><span class="special">&,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -100,7 +101,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_same</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -113,8 +114,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_scalar</title>
|
||||
<title>is_scalar</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_same.html" title=" is_same">
|
||||
<link rel="next" href="is_signed.html" title=" is_signed">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_same.html" title="is_same">
|
||||
<link rel="next" href="is_signed.html" title="is_signed">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,40 +24,41 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_scalar"></a><a href="is_scalar.html" title=" is_scalar"> is_scalar</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_scalar"></a><a href="is_scalar.html" title="is_scalar"> is_scalar</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_scalar</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_scalar</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
scalar type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
scalar type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
Scalar types include integral, floating point, enumeration, pointer, and
|
||||
pointer-to-member types.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9p10.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9p10.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_scalar</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_scalar</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with function types.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">int</span><span class="special">*></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">int</span><span class="special">*></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -66,7 +67,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -75,7 +76,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -85,7 +86,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -95,7 +96,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)(</span><span class="keyword">long</span><span class="special">)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -105,7 +106,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="keyword">int</span> <span class="special">(</span><span class="identifier">MyClass</span><span class="special">::*)>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -115,7 +116,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_scalar</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -128,8 +129,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_signed</title>
|
||||
<title>is_signed</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_scalar.html" title=" is_scalar">
|
||||
<link rel="next" href="is_stateless.html" title=" is_stateless">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_scalar.html" title="is_scalar">
|
||||
<link rel="next" href="is_stateless.html" title="is_stateless">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,34 +24,35 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_signed"></a><a href="is_signed.html" title=" is_signed"> is_signed</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_signed"></a><a href="is_signed.html" title="is_signed"> is_signed</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_signed</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_signed</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is an signed integer type
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is an signed integer type
|
||||
or an enumerated type with an underlying signed integer type, then inherits
|
||||
from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.1, 7.2.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.1, 7.2.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_signed</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_signed</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -60,7 +61,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -69,7 +70,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -79,7 +80,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="identifier">myclass</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="identifier">myclass</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -89,8 +90,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
whose value depends upon the signedness of type <tt class="computeroutput"><span class="keyword">char</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
whose value depends upon the signedness of type <code class="computeroutput"><span class="keyword">char</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -99,7 +100,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -109,7 +110,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_signed</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -122,8 +123,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_stateless</title>
|
||||
<title>is_stateless</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_signed.html" title=" is_signed">
|
||||
<link rel="next" href="is_reference.html" title=" is_reference">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_signed.html" title="is_signed">
|
||||
<link rel="next" href="is_reference.html" title="is_reference">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,24 +24,25 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_stateless"></a><a href="is_stateless.html" title=" is_stateless"> is_stateless</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_stateless"></a><a href="is_stateless.html" title="is_stateless"> is_stateless</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_stateless</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_stateless</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> Ff T is a stateless type then
|
||||
inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> Ff T is a stateless type then
|
||||
inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
Type T must be a complete type.
|
||||
</p>
|
||||
<p>
|
||||
A stateless type is a type that has no storage and whose constructors and
|
||||
destructors are trivial. That means that <tt class="computeroutput"><span class="identifier">is_stateless</span></tt>
|
||||
only inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>
|
||||
if the following expression is <tt class="computeroutput"><span class="keyword">true</span></tt>:
|
||||
destructors are trivial. That means that <code class="computeroutput"><span class="identifier">is_stateless</span></code>
|
||||
only inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>
|
||||
if the following expression is <code class="computeroutput"><span class="keyword">true</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_trivial_constructor</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span>
|
||||
@@ -51,15 +52,15 @@
|
||||
<span class="special">&&</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_empty</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9p10.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9p10.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_stateless</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_stateless</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial-specialization of class templates, then this template
|
||||
can not be used with function types.
|
||||
</p>
|
||||
@@ -67,7 +68,7 @@
|
||||
Without some (as yet unspecified) help from the compiler, is_stateless will
|
||||
never report that a class or struct is stateless; this is always safe, if
|
||||
possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have
|
||||
the necessary compiler <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>
|
||||
the necessary compiler <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>
|
||||
to make this template work automatically.
|
||||
</p>
|
||||
</div>
|
||||
@@ -78,8 +79,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_union</title>
|
||||
<title>is_union</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_reference.html" title=" is_reference">
|
||||
<link rel="next" href="is_unsigned.html" title=" is_unsigned">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_reference.html" title="is_reference">
|
||||
<link rel="next" href="is_unsigned.html" title="is_unsigned">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,46 +24,47 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_union"></a><a href="is_union.html" title=" is_union"> is_union</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_union"></a><a href="is_union.html" title="is_union"> is_union</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_union</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_union</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
union type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
union type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
Currently requires some kind of compiler support, otherwise unions are identified
|
||||
as classes.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.2 and 9.5.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2 and 9.5.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> Without (some as
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> Without (some as
|
||||
yet unspecified) help from the compiler, we cannot distinguish between union
|
||||
and class types using only standard C++, as a result this type will never
|
||||
inherit from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
inherit from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
unless the user explicitly specializes the template for their user-defined
|
||||
union types, or unless the compiler supplies some unspecified intrinsic that
|
||||
implements this functionality. Currently (May 2005) only Visual C++ 8 has
|
||||
the necessary compiler <a href="../intrinsics.html" title=" Support for Compiler Intrinsics">intrinsics</a>
|
||||
the necessary compiler <a href="../intrinsics.html" title="Support for Compiler Intrinsics">intrinsics</a>
|
||||
to make this trait "just work" without user intervention.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_union</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_union</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_union</span><span class="special"><</span><span class="keyword">void</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_union</span><span class="special"><</span><span class="keyword">void</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -72,8 +73,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_union</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_union</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -82,7 +83,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_union</span><span class="special"><</span><span class="keyword">void</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_union</span><span class="special"><</span><span class="keyword">void</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -92,7 +93,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_union</span><span class="special"><</span><span class="keyword">void</span><span class="special">*>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_union</span><span class="special"><</span><span class="keyword">void</span><span class="special">*>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -102,7 +103,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_union</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_union</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -115,8 +116,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_unsigned</title>
|
||||
<title>is_unsigned</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_union.html" title=" is_union">
|
||||
<link rel="next" href="is_void.html" title=" is_void">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_union.html" title="is_union">
|
||||
<link rel="next" href="is_void.html" title="is_void">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,33 +24,34 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_unsigned"></a><a href="is_unsigned.html" title=" is_unsigned"> is_unsigned</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_unsigned"></a><a href="is_unsigned.html" title="is_unsigned"> is_unsigned</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_unsigned</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_unsigned</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is an unsigned integer type
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is an unsigned integer type
|
||||
or an enumerated type with an underlying unsigned integer type, then inherits
|
||||
from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.1, 7.2.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.1, 7.2.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_unsigned</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_unsigned</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">></span></tt> inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">></span></code> inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -59,9 +60,9 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -70,7 +71,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -80,7 +81,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="identifier">myclass</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="identifier">myclass</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -90,8 +91,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
whose value depends upon the signedness of type <tt class="computeroutput"><span class="keyword">char</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
whose value depends upon the signedness of type <code class="computeroutput"><span class="keyword">char</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -100,8 +101,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">long</span>
|
||||
<span class="keyword">long</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">long</span>
|
||||
<span class="keyword">long</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -111,7 +112,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_unsigned</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -124,8 +125,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_void</title>
|
||||
<title>is_void</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_unsigned.html" title=" is_unsigned">
|
||||
<link rel="next" href="is_volatile.html" title=" is_volatile">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_unsigned.html" title="is_unsigned">
|
||||
<link rel="next" href="is_volatile.html" title="is_volatile">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,33 +24,34 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_void"></a><a href="is_void.html" title=" is_void"> is_void</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_void"></a><a href="is_void.html" title="is_void"> is_void</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_void</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_void</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (possibly cv-qualified)
|
||||
void type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
|
||||
void type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.1p9.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.1p9.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_void</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_void</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="keyword">void</span><span class="special">></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="keyword">void</span><span class="special">></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -59,8 +60,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">void</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -69,7 +70,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="keyword">void</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="keyword">void</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -79,7 +80,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="keyword">void</span><span class="special">*>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="keyword">void</span><span class="special">*>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>false</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -89,7 +90,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_void</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -102,8 +103,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> is_volatile</title>
|
||||
<title>is_volatile</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_void.html" title=" is_void">
|
||||
<link rel="next" href="make_signed.html" title=" make_signed">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_void.html" title="is_void">
|
||||
<link rel="next" href="make_signed.html" title="make_signed">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,32 +24,33 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_volatile"></a><a href="is_volatile.html" title=" is_volatile"> is_volatile</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.is_volatile"></a><a href="is_volatile.html" title="is_volatile"> is_volatile</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_volatile</span> <span class="special">:</span> <span class="keyword">public</span> <i class="replaceable"><tt><a href="integral_constant.html" title=" integral_constant">true_type</a>-or-<a href="integral_constant.html" title=" integral_constant">false_type</a></tt></i> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">is_volatile</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a href="integral_constant.html" title="integral_constant">true_type</a>-or-<a href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> If T is a (top level) volatile-qualified
|
||||
type then inherits from <a href="integral_constant.html" title=" integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title=" integral_constant">false_type</a>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> If T is a (top level) volatile-qualified
|
||||
type then inherits from <a href="integral_constant.html" title="integral_constant">true_type</a>,
|
||||
otherwise inherits from <a href="integral_constant.html" title="integral_constant">false_type</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">is_volatile</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">is_volatile</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_volatile</span><span class="special"><</span><span class="keyword">volatile</span> <span class="keyword">int</span><span class="special">></span></tt> inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_volatile</span><span class="special"><</span><span class="keyword">volatile</span> <span class="keyword">int</span><span class="special">></span></code> inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -58,8 +59,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_volatile</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">volatile</span>
|
||||
<span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">true_type</a></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_volatile</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">volatile</span>
|
||||
<span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">true_type</a></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -68,7 +69,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_volatile</span><span class="special"><</span><span class="keyword">int</span><span class="special">*</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">is_volatile</span><span class="special"><</span><span class="keyword">int</span><span class="special">*</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>true</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -78,7 +79,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">volatile</span><span class="special">*>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">is_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">volatile</span><span class="special">*>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>false</em></span>:
|
||||
the volatile qualifier is not at the top level in this case.
|
||||
</p>
|
||||
@@ -89,7 +90,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">is_volatile</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="keyword">bool</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">is_volatile</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -102,8 +103,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> make_signed</title>
|
||||
<title>make_signed</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="is_volatile.html" title=" is_volatile">
|
||||
<link rel="next" href="make_unsigned.html" title=" make_unsigned">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_volatile.html" title="is_volatile">
|
||||
<link rel="next" href="make_unsigned.html" title="make_unsigned">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,16 +24,17 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.make_signed"></a><a href="make_signed.html" title=" make_signed"> make_signed</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.make_signed"></a><a href="make_signed.html" title="make_signed"> make_signed</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">make_signed</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> If T is a signed integer type then
|
||||
<span class="bold"><strong>type:</strong></span> If T is a signed integer type then
|
||||
the same type as T, if T is an unsigned integer type then the corresponding
|
||||
signed type. Otherwise if T is an enumerated or character type (char or wchar_t)
|
||||
then a signed integer type with the same width as T.
|
||||
@@ -42,20 +43,20 @@
|
||||
If T has any cv-qualifiers then these are also present on the result type.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Requires:</b></span> T must be an integer or enumerated
|
||||
<span class="bold"><strong>Requires:</strong></span> T must be an integer or enumerated
|
||||
type, and must not be the type bool.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.1.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.1.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">make_signed</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">make_signed</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id502557"></a><p class="title"><b>Table 1.15. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id536444"></a><p class="title"><b>Table 1.15. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -76,46 +77,46 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">unsigned</span>
|
||||
<span class="keyword">long</span> <span class="keyword">long</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">unsigned</span>
|
||||
<span class="keyword">long</span> <span class="keyword">long</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">const</span> <span class="keyword">long</span>
|
||||
<span class="keyword">long</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">const</span> <span class="keyword">long</span>
|
||||
<span class="keyword">long</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@@ -127,7 +128,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">wchar_t</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">wchar_t</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@@ -137,8 +138,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -147,8 +149,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> make_unsigned</title>
|
||||
<title>make_unsigned</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="make_signed.html" title=" make_signed">
|
||||
<link rel="next" href="promote.html" title=" promote">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="make_signed.html" title="make_signed">
|
||||
<link rel="next" href="promote.html" title="promote">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,16 +24,17 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.make_unsigned"></a><a href="make_unsigned.html" title=" make_unsigned"> make_unsigned</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.make_unsigned"></a><a href="make_unsigned.html" title="make_unsigned"> make_unsigned</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">make_unsigned</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> If T is a unsigned integer type then
|
||||
<span class="bold"><strong>type:</strong></span> If T is a unsigned integer type then
|
||||
the same type as T, if T is an signed integer type then the corresponding
|
||||
unsigned type. Otherwise if T is an enumerated or character type (char or
|
||||
wchar_t) then an unsigned integer type with the same width as T.
|
||||
@@ -42,20 +43,20 @@
|
||||
If T has any cv-qualifiers then these are also present on the result type.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Requires:</b></span> T must be an integer or enumerated
|
||||
<span class="bold"><strong>Requires:</strong></span> T must be an integer or enumerated
|
||||
type, and must not be the type bool.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.1.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.1.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">make_unsigned</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">make_unsigned</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id503192"></a><p class="title"><b>Table 1.16. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id537077"></a><p class="title"><b>Table 1.16. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -76,47 +77,47 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">unsigned</span>
|
||||
<span class="keyword">long</span> <span class="keyword">long</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">unsigned</span>
|
||||
<span class="keyword">long</span> <span class="keyword">long</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">const</span> <span class="keyword">unsigned</span>
|
||||
<span class="keyword">long</span> <span class="keyword">long</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">const</span> <span class="keyword">unsigned</span>
|
||||
<span class="keyword">long</span> <span class="keyword">long</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="identifier">my_enum</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@@ -128,7 +129,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">wchar_t</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">make_signed</span><span class="special"><</span><span class="keyword">wchar_t</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@@ -138,8 +139,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -148,8 +150,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> promote</title>
|
||||
<title>promote</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="make_unsigned.html" title=" make_unsigned">
|
||||
<link rel="next" href="rank.html" title=" rank">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="make_unsigned.html" title="make_unsigned">
|
||||
<link rel="next" href="rank.html" title="rank">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,36 +24,36 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.promote"></a><a href="promote.html" title=" promote"> promote</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.promote"></a><a href="promote.html" title="promote"> promote</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">promote</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> If integral or floating point promotion
|
||||
can be applied to an rvalue of type <tt class="computeroutput"><span class="identifier">T</span></tt>,
|
||||
then applies integral and floating point promotions to <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
and keeps cv-qualifiers of <tt class="computeroutput"><span class="identifier">T</span></tt>,
|
||||
otherwise leaves <tt class="computeroutput"><span class="identifier">T</span></tt> unchanged.
|
||||
See also <a href="integral_promotion.html" title=" integral_promotion">integral_promotion</a>
|
||||
and <a href="floating_point_promotion.html" title="
|
||||
floating_point_promotion">floating_point_promotion</a>.
|
||||
<span class="bold"><strong>type:</strong></span> If integral or floating point promotion
|
||||
can be applied to an rvalue of type <code class="computeroutput"><span class="identifier">T</span></code>,
|
||||
then applies integral and floating point promotions to <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
and keeps cv-qualifiers of <code class="computeroutput"><span class="identifier">T</span></code>,
|
||||
otherwise leaves <code class="computeroutput"><span class="identifier">T</span></code> unchanged.
|
||||
See also <a href="integral_promotion.html" title="integral_promotion">integral_promotion</a>
|
||||
and <a href="floating_point_promotion.html" title="floating_point_promotion">floating_point_promotion</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 4.5 except 4.5/3
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 4.5 except 4.5/3
|
||||
(integral bit-field) and 4.6.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">promote</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">promote</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id503894"></a><p class="title"><b>Table 1.17. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id537779"></a><p class="title"><b>Table 1.17. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -74,42 +74,43 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">promote</span><span class="special"><</span><span class="keyword">short</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">promote</span><span class="special"><</span><span class="keyword">short</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">volatile</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">volatile</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">promote</span><span class="special"><</span><span class="keyword">float</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">promote</span><span class="special"><</span><span class="keyword">float</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">double</span> <span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">double</span> <span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">promote</span><span class="special"><</span><span class="keyword">short</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">promote</span><span class="special"><</span><span class="keyword">short</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">short</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">short</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -118,8 +119,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> rank</title>
|
||||
<title>rank</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="promote.html" title=" promote">
|
||||
<link rel="next" href="remove_all_extents.html" title=" remove_all_extents">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="promote.html" title="promote">
|
||||
<link rel="next" href="remove_all_extents.html" title="remove_all_extents">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,35 +24,36 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.rank"></a><a href="rank.html" title=" rank"> rank</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.rank"></a><a href="rank.html" title="rank"> rank</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">rank</span> <span class="special">:</span> <span class="keyword">public</span> <a href="integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">RANK</span><span class="special">(</span><span class="identifier">T</span><span class="special">)></span> <span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">rank</span> <span class="special">:</span> <span class="keyword">public</span> <a href="integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">RANK</span><span class="special">(</span><span class="identifier">T</span><span class="special">)></span> <span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Inherits:</b></span> Class template rank inherits from
|
||||
<tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">RANK</span><span class="special">(</span><span class="identifier">T</span><span class="special">)></span></tt>,
|
||||
where <tt class="computeroutput"><span class="identifier">RANK</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></tt> is the
|
||||
number of array dimensions in type <tt class="computeroutput"><span class="identifier">T</span></tt>.
|
||||
<span class="bold"><strong>Inherits:</strong></span> Class template rank inherits from
|
||||
<code class="computeroutput"><a href="integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">RANK</span><span class="special">(</span><span class="identifier">T</span><span class="special">)></span></code>,
|
||||
where <code class="computeroutput"><span class="identifier">RANK</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code> is the
|
||||
number of array dimensions in type <code class="computeroutput"><span class="identifier">T</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
If <tt class="computeroutput"><span class="identifier">T</span></tt> is not an array type,
|
||||
then <tt class="computeroutput"><span class="identifier">RANK</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></tt> is zero.
|
||||
If <code class="computeroutput"><span class="identifier">T</span></code> is not an array type,
|
||||
then <code class="computeroutput"><span class="identifier">RANK</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code> is zero.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">rank</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">rank</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Examples:</b></span>
|
||||
<span class="bold"><strong>Examples:</strong></span>
|
||||
</p>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="keyword">int</span><span class="special">[]></span></tt>
|
||||
inherits from <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="number">1</span><span class="special">></span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="keyword">int</span><span class="special">[]></span></code>
|
||||
inherits from <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="number">1</span><span class="special">></span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -61,7 +62,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="keyword">double</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">3</span><span class="special">][</span><span class="number">4</span><span class="special">]>::</span><span class="identifier">type</span></tt> is the type <tt class="computeroutput"><a href="integral_constant.html" title=" integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="number">3</span><span class="special">></span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="keyword">double</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">3</span><span class="special">][</span><span class="number">4</span><span class="special">]>::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a href="integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="number">3</span><span class="special">></span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -70,7 +71,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">1</span><span class="special">]>::</span><span class="identifier">value</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">1</span><span class="special">]>::</span><span class="identifier">value</span></code>
|
||||
is an integral constant expression that evaluates to <span class="emphasis"><em>1</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -80,7 +81,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="keyword">int</span><span class="special">[][</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="keyword">int</span><span class="special">[][</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>2</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -90,7 +91,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">value</span></tt> is an integral constant expression
|
||||
<code class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">value</span></code> is an integral constant expression
|
||||
that evaluates to <span class="emphasis"><em>0</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -100,7 +101,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></tt> is the type <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span></tt>.
|
||||
<code class="computeroutput"><span class="identifier">rank</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@@ -113,8 +114,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> remove_all_extents</title>
|
||||
<title>remove_all_extents</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="rank.html" title=" rank">
|
||||
<link rel="next" href="remove_const.html" title=" remove_const">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="rank.html" title="rank">
|
||||
<link rel="next" href="remove_const.html" title="remove_const">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,38 +24,39 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.remove_all_extents"></a><a href="remove_all_extents.html" title=" remove_all_extents"> remove_all_extents</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.remove_all_extents"></a><a href="remove_all_extents.html" title="remove_all_extents"> remove_all_extents</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">remove_all_extents</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> If <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
is an array type, then removes all of the array bounds on <tt class="computeroutput"><span class="identifier">T</span></tt>,
|
||||
otherwise leaves <tt class="computeroutput"><span class="identifier">T</span></tt> unchanged.
|
||||
<span class="bold"><strong>type:</strong></span> If <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
is an array type, then removes all of the array bounds on <code class="computeroutput"><span class="identifier">T</span></code>,
|
||||
otherwise leaves <code class="computeroutput"><span class="identifier">T</span></code> unchanged.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 8.3.4.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 8.3.4.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">remove_all_extents</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">remove_all_extents</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id505331"></a><p class="title"><b>Table 1.18. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id539214"></a><p class="title"><b>Table 1.18. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -76,66 +77,67 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_all_extents</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_all_extents</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_all_extents</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">[</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_all_extents</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">[</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_all_extents</span><span class="special"><</span><span class="keyword">int</span><span class="special">[][</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_all_extents</span><span class="special"><</span><span class="keyword">int</span><span class="special">[][</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_all_extents</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">3</span><span class="special">][</span><span class="number">4</span><span class="special">]>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_all_extents</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">3</span><span class="special">][</span><span class="number">4</span><span class="special">]>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_all_extents</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_all_extents</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -144,8 +146,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> remove_const</title>
|
||||
<title>remove_const</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="remove_all_extents.html" title=" remove_all_extents">
|
||||
<link rel="next" href="remove_cv.html" title=" remove_cv">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="remove_all_extents.html" title="remove_all_extents">
|
||||
<link rel="next" href="remove_cv.html" title="remove_cv">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,37 +24,38 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.remove_const"></a><a href="remove_const.html" title=" remove_const"> remove_const</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.remove_const"></a><a href="remove_const.html" title="remove_const"> remove_const</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">remove_const</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> The same type as <tt class="computeroutput"><span class="identifier">T</span></tt>,
|
||||
<span class="bold"><strong>type:</strong></span> The same type as <code class="computeroutput"><span class="identifier">T</span></code>,
|
||||
but with any <span class="emphasis"><em>top level</em></span> const-qualifier removed.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">remove_const</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">remove_const</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id506054"></a><p class="title"><b>Table 1.19. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id539936"></a><p class="title"><b>Table 1.19. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -75,67 +76,68 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">volatile</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">volatile</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -144,8 +146,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> remove_cv</title>
|
||||
<title>remove_cv</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="remove_const.html" title=" remove_const">
|
||||
<link rel="next" href="remove_extent.html" title=" remove_extent">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="remove_const.html" title="remove_const">
|
||||
<link rel="next" href="remove_extent.html" title="remove_extent">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,37 +24,38 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.remove_cv"></a><a href="remove_cv.html" title=" remove_cv"> remove_cv</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.remove_cv"></a><a href="remove_cv.html" title="remove_cv"> remove_cv</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">remove_cv</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> The same type as <tt class="computeroutput"><span class="identifier">T</span></tt>,
|
||||
<span class="bold"><strong>type:</strong></span> The same type as <code class="computeroutput"><span class="identifier">T</span></code>,
|
||||
but with any <span class="emphasis"><em>top level</em></span> cv-qualifiers removed.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">remove_cv</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">remove_cv</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id506759"></a><p class="title"><b>Table 1.20. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id540641"></a><p class="title"><b>Table 1.20. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -75,67 +76,68 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_cv</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_cv</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_cv</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_cv</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_cv</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_cv</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_cv</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_cv</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_cv</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_cv</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -144,8 +146,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> remove_extent</title>
|
||||
<title>remove_extent</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="remove_cv.html" title=" remove_cv">
|
||||
<link rel="next" href="remove_pointer.html" title=" remove_pointer">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="remove_cv.html" title="remove_cv">
|
||||
<link rel="next" href="remove_pointer.html" title="remove_pointer">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,38 +24,39 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.remove_extent"></a><a href="remove_extent.html" title=" remove_extent"> remove_extent</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.remove_extent"></a><a href="remove_extent.html" title="remove_extent"> remove_extent</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">remove_extent</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> If <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
<span class="bold"><strong>type:</strong></span> If <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
is an array type, then removes the topmost array bound, otherwise leaves
|
||||
<tt class="computeroutput"><span class="identifier">T</span></tt> unchanged.
|
||||
<code class="computeroutput"><span class="identifier">T</span></code> unchanged.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 8.3.4.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 8.3.4.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">remove_extent</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">remove_extent</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id507465"></a><p class="title"><b>Table 1.21. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id541346"></a><p class="title"><b>Table 1.21. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -76,66 +77,67 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">[</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">[</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">4</span><span class="special">]>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">][</span><span class="number">4</span><span class="special">]>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">[</span><span class="number">4</span><span class="special">]</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">[</span><span class="number">4</span><span class="special">]</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[][</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span><span class="special">[][</span><span class="number">2</span><span class="special">]>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">]</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">[</span><span class="number">2</span><span class="special">]</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_extent</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -144,8 +146,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> remove_pointer</title>
|
||||
<title>remove_pointer</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="remove_extent.html" title=" remove_extent">
|
||||
<link rel="next" href="remove_reference.html" title=" remove_reference">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="remove_extent.html" title="remove_extent">
|
||||
<link rel="next" href="remove_reference.html" title="remove_reference">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,37 +24,38 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.remove_pointer"></a><a href="remove_pointer.html" title=" remove_pointer"> remove_pointer</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.remove_pointer"></a><a href="remove_pointer.html" title="remove_pointer"> remove_pointer</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">remove_pointer</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> The same type as <tt class="computeroutput"><span class="identifier">T</span></tt>,
|
||||
<span class="bold"><strong>type:</strong></span> The same type as <code class="computeroutput"><span class="identifier">T</span></code>,
|
||||
but with any pointer modifier removed.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 8.3.1.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 8.3.1.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">remove_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">remove_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id508203"></a><p class="title"><b>Table 1.22. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id542083"></a><p class="title"><b>Table 1.22. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -75,66 +76,67 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">**>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_pointer</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">**>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">*&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_pointer</span><span class="special"><</span><span class="keyword">int</span><span class="special">*&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">*&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">*&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -143,8 +145,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> remove_reference</title>
|
||||
<title>remove_reference</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="remove_pointer.html" title=" remove_pointer">
|
||||
<link rel="next" href="remove_volatile.html" title=" remove_volatile">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="remove_pointer.html" title="remove_pointer">
|
||||
<link rel="next" href="remove_volatile.html" title="remove_volatile">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,37 +24,38 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.remove_reference"></a><a href="remove_reference.html" title=" remove_reference"> remove_reference</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.remove_reference"></a><a href="remove_reference.html" title="remove_reference"> remove_reference</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">remove_reference</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> The same type as <tt class="computeroutput"><span class="identifier">T</span></tt>,
|
||||
<span class="bold"><strong>type:</strong></span> The same type as <code class="computeroutput"><span class="identifier">T</span></code>,
|
||||
but with any reference modifier removed.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 8.3.2.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 8.3.2.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">remove_reference</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">remove_reference</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id508885"></a><p class="title"><b>Table 1.23. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id542764"></a><p class="title"><b>Table 1.23. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -75,54 +76,55 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">*&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_reference</span><span class="special"><</span><span class="keyword">int</span><span class="special">*&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span><span class="special">*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -131,8 +133,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> remove_volatile</title>
|
||||
<title>remove_volatile</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="remove_reference.html" title=" remove_reference">
|
||||
<link rel="next" href="type_with_alignment.html" title=" type_with_alignment">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="remove_reference.html" title="remove_reference">
|
||||
<link rel="next" href="type_with_alignment.html" title="type_with_alignment">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,37 +24,38 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.remove_volatile"></a><a href="remove_volatile.html" title=" remove_volatile"> remove_volatile</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.remove_volatile"></a><a href="remove_volatile.html" title="remove_volatile"> remove_volatile</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">remove_volatile</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> The same type as <tt class="computeroutput"><span class="identifier">T</span></tt>,
|
||||
<span class="bold"><strong>type:</strong></span> The same type as <code class="computeroutput"><span class="identifier">T</span></code>,
|
||||
but with any <span class="emphasis"><em>top level</em></span> volatile-qualifier removed.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>C++ Standard Reference:</b></span> 3.9.3.
|
||||
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.3.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Compiler Compatibility:</b></span> If the compiler
|
||||
<span class="bold"><strong>Compiler Compatibility:</strong></span> If the compiler
|
||||
does not support partial specialization of class-templates then this template
|
||||
will compile, but the member <tt class="computeroutput"><span class="identifier">type</span></tt>
|
||||
will always be the same as type <tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
will compile, but the member <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
will always be the same as type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
except where <a href="../category/transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
|
||||
workarounds</a> have been applied.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">remove_volatile</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">remove_volatile</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id509493"></a><p class="title"><b>Table 1.24. Examples</b></p>
|
||||
<table class="table" summary="Examples">
|
||||
<a name="id543371"></a><p class="title"><b>Table 1.24. Examples</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Examples">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@@ -75,67 +76,68 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_volatile</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_volatile</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">const</span>
|
||||
<span class="keyword">volatile</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">volatile</span><span class="special">&>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">volatile</span><span class="special">&>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">&</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">remove_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">volatile</span><span class="special">*>::</span><span class="identifier">type</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">remove_volatile</span><span class="special"><</span><span class="keyword">int</span> <span class="keyword">volatile</span><span class="special">*>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
@@ -144,8 +146,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> type_with_alignment</title>
|
||||
<title>type_with_alignment</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title=" Alphabetical Reference">
|
||||
<link rel="prev" href="remove_volatile.html" title=" remove_volatile">
|
||||
<link rel="next" href="../credits.html" title=" Credits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="remove_volatile.html" title="remove_volatile">
|
||||
<link rel="next" href="../credits.html" title="Credits">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -24,22 +24,23 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.type_with_alignment"></a><a href="type_with_alignment.html" title=" type_with_alignment"> type_with_alignment</a></h3></div></div></div>
|
||||
<a name="boost_typetraits.reference.type_with_alignment"></a><a href="type_with_alignment.html" title="type_with_alignment"> type_with_alignment</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">Align</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">type_with_alignment</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <i class="replaceable"><tt>see-below</tt></i> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>type:</b></span> a built-in or POD type with an alignment
|
||||
that is a multiple of <tt class="computeroutput"><span class="identifier">Align</span></tt>.
|
||||
<span class="bold"><strong>type:</strong></span> a built-in or POD type with an alignment
|
||||
that is a multiple of <code class="computeroutput"><span class="identifier">Align</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Header:</b></span> <tt class="computeroutput"> <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">type_with_alignment</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"> <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></tt>
|
||||
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <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">type_with_alignment</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"> <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></code>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
@@ -49,8 +50,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> User Defined Specializations</title>
|
||||
<title>User Defined Specializations</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="category/function.html" title=" Decomposing Function
|
||||
Types">
|
||||
<link rel="next" href="intrinsics.html" title=" Support for Compiler Intrinsics">
|
||||
<link rel="prev" href="category/function.html" title="Decomposing Function Types">
|
||||
<link rel="next" href="intrinsics.html" title="Support for Compiler Intrinsics">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -25,13 +24,14 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.user_defined"></a><a href="user_defined.html" title=" User Defined Specializations"> User Defined Specializations</a></h2></div></div></div>
|
||||
<a name="boost_typetraits.user_defined"></a><a href="user_defined.html" title="User Defined Specializations"> User Defined Specializations</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
Occationally the end user may need to provide their own specialization for
|
||||
one of the type traits - typically where intrinsic compiler support is required
|
||||
to implement a specific trait fully. These specializations should derive from
|
||||
boost::<a href="reference/integral_constant.html" title=" integral_constant">true_type</a>
|
||||
or boost::<a href="reference/integral_constant.html" title=" integral_constant">false_type</a>
|
||||
boost::<a href="reference/integral_constant.html" title="integral_constant">true_type</a>
|
||||
or boost::<a href="reference/integral_constant.html" title="integral_constant">false_type</a>
|
||||
as appropriate:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
@@ -49,16 +49,16 @@
|
||||
<span class="keyword">namespace</span> <span class="identifier">boost</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">template</span><span class="special"><></span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_pod.html" title=" is_pod">is_pod</a><span class="special"><</span><span class="identifier">my_pod</span><span class="special">></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title=" integral_constant">true_type</a><span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_pod.html" title="is_pod">is_pod</a><span class="special"><</span><span class="identifier">my_pod</span><span class="special">></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">{};</span>
|
||||
|
||||
<span class="keyword">template</span><span class="special"><></span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_pod.html" title=" is_pod">is_pod</a><span class="special"><</span><span class="identifier">my_union</span><span class="special">></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title=" integral_constant">true_type</a><span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_pod.html" title="is_pod">is_pod</a><span class="special"><</span><span class="identifier">my_union</span><span class="special">></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">{};</span>
|
||||
|
||||
<span class="keyword">template</span><span class="special"><></span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_union.html" title=" is_union">is_union</a><span class="special"><</span><span class="identifier">my_union</span><span class="special">></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title=" integral_constant">true_type</a><span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_union.html" title="is_union">is_union</a><span class="special"><</span><span class="identifier">my_union</span><span class="special">></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">{};</span>
|
||||
|
||||
<span class="keyword">template</span><span class="special"><></span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_class.html" title=" is_class">is_class</a><span class="special"><</span><span class="identifier">my_union</span><span class="special">></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title=" integral_constant">false_type</a><span class="special">{};</span>
|
||||
<span class="keyword">struct</span> <a href="reference/is_class.html" title="is_class">is_class</a><span class="special"><</span><span class="identifier">my_union</span><span class="special">></span> <span class="special">:</span> <span class="keyword">public</span> <a href="reference/integral_constant.html" title="integral_constant">false_type</a><span class="special">{};</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
</div>
|
||||
@@ -69,8 +69,7 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
+5
-6
@@ -3,9 +3,9 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Chapter 1. Boost.TypeTraits</title>
|
||||
<link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="next" href="boost_typetraits/intro.html" title=" Introduction">
|
||||
<link rel="next" href="boost_typetraits/intro.html" title="Introduction">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -30,10 +30,9 @@
|
||||
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
|
||||
Ramey and Jeremy Siek</p></div>
|
||||
<div><div class="legalnotice">
|
||||
<a name="id455949"></a><p>
|
||||
<a name="id435930"></a><p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org<span class="emphasis"><em>LICENSE_1_0.txt">
|
||||
http:</em></span>/www.boost.org/LICENSE_1_0.txt </ulink>)
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
</div></div>
|
||||
</div></div>
|
||||
@@ -158,7 +157,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: September 10, 2007 at 19:24:53 +0800</small></p></td>
|
||||
<td align="left"><p><small>Last revised: November 07, 2007 at 18:38:23 +0000</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"><small></small></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
+4
-5
@@ -13,11 +13,9 @@
|
||||
Robert Ramey and Jeremy Siek]
|
||||
[purpose Meta-programming support library]
|
||||
[license
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
<ulink url="http://www.boost.org/LICENSE_1_0.txt">
|
||||
http://www.boost.org/LICENSE_1_0.txt
|
||||
</ulink>)
|
||||
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])
|
||||
]
|
||||
[authors [authors, various]]
|
||||
[category template]
|
||||
@@ -246,3 +244,4 @@ See __has_trivial_constructor.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user