|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51053 - sandbox/tools/auto_index/test
From: john_at_[hidden]
Date: 2009-02-06 11:57:42
Author: johnmaddock
Date: 2009-02-06 11:57:38 EST (Fri, 06 Feb 2009)
New Revision: 51053
URL: http://svn.boost.org/trac/boost/changeset/51053
Log:
Added test cases.
Added:
sandbox/tools/auto_index/test/
sandbox/tools/auto_index/test/Jamfile.v2 (contents, props changed)
sandbox/tools/auto_index/test/index.idx (contents, props changed)
sandbox/tools/auto_index/test/test1.gold (contents, props changed)
sandbox/tools/auto_index/test/test2.gold (contents, props changed)
sandbox/tools/auto_index/test/test3.gold (contents, props changed)
sandbox/tools/auto_index/test/type_traits.docbook (contents, props changed)
Added: sandbox/tools/auto_index/test/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/tools/auto_index/test/Jamfile.v2 2009-02-06 11:57:38 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,64 @@
+
+import feature ;
+import generators ;
+import modules ;
+import project ;
+import targets ;
+import testing ;
+import toolset ;
+import type ;
+
+path-constant local-boost-root : [ get_boost_root ] ;
+
+#exe line-compare-tool : src/text_diff.cpp ;
+
+alias auto_index : ../build//auto_index : release ;
+alias line_compare_tool : $(local-boost-root)/tools/quickbook/test//line-compare-tool ;
+
+rule auto-index-test ( target-name : input-file : output-file ? : options * )
+{
+ local project = [ project.current ] ;
+
+ local t =
+ [ targets.create-typed-target RUN
+ : $(project)
+ : $(target-name)
+ : .//auto_index
+ : $(requirements)
+ <location-prefix>$(target-name).test
+ <testing.arg>prefix=$(local-boost-root)
+ <testing.arg>$(options)
+ <testing.arg>in=$(input-file)
+ <testing.arg>out=$(target-name).out
+ <preserve-test-targets>on
+ <dependency>Jamfile.v2
+ <dependency>$(input-file)
+ ]
+ ;
+
+ t +=
+ [ targets.create-typed-target RUN
+ : $(project)
+ : $(target-name)_check
+ : .//line_compare_tool
+ : $(requirements)
+ <location-prefix>$(target-name).test
+ <testing.arg>$(target-name).out
+ <testing.arg>$(target-name).gold
+ <preserve-test-targets>on
+ <dependency>$(target_name)
+ <dependency>Jamfile.v2
+ <dependency>$(input-file)
+ ]
+ ;
+
+ modules.poke testing : .all-tests : \$\(all-tests\) $(t) ;
+
+ return $(t) ;
+}
+
+auto-index-test test1 : type_traits.docbook : : script=index.idx ;
+auto-index-test test2 : type_traits.docbook : : --internal-index script=index.idx ;
+auto-index-test test3 : type_traits.docbook : : --internal-index index-type=appendix script=index.idx ;
+
+
Added: sandbox/tools/auto_index/test/index.idx
==============================================================================
--- (empty file)
+++ sandbox/tools/auto_index/test/index.idx 2009-02-06 11:57:38 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,76 @@
+
+!scan-path boost/type_traits .*\.hpp true
+
+!exclude type arg1_type arg2_type arg3_type arg4_type arg5_type B D
+!exclude result
+
+!rewrite-name "(?:A|An|The)\s+(.*)" "\1"
+
+"Constrained Index Term" add_const "boost_typetraits\.reference.*" class_name
+
+
+is_array "" "" class_name
+is_class "" "" class_name
+is_complex "" "" class_name
+is_enum "" "" class_name
+is_floating_point "" "" class_name
+is_function "" "" class_name
+is_integral "" "" class_name
+is_member_function_pointer "" "" class_name
+is_member_object_pointer "" "" class_name
+is_pointer "" "" class_name
+is_reference "" "" class_name
+is_union "" "" class_name
+is_void "" "" class_name
+is_arithmetic "" "" class_name
+is_compound "" "" class_name
+is_fundamental "" "" class_name
+is_member_pointer "" "" class_name
+is_object "" "" class_name
+is_scalar "" "" class_name
+alignment_of "" "" class_name
+has_nothrow_assign "" "" class_name
+has_nothrow_constructor "" "" class_name
+has_nothrow_default_constructor "" "" class_name
+has_nothrow_copy "" "" class_name
+has_nothrow_copy_constructor "" "" class_name
+has_trivial_assign "" "" class_name
+has_trivial_constructor "" "" class_name
+has_trivial_default_constructor "" "" class_name
+has_trivial_copy "" "" class_name
+has_trivial_copy_constructor "" "" class_name
+has_trivial_destructor "" "" class_name
+has_virtual_destructor "" "" class_name
+is_abstract "" "" class_name
+is_const "" "" class_name
+is_empty "" "" class_name
+is_stateless "" "" class_name
+is_pod "" "" class_name
+is_polymorphic "" "" class_name
+is_signed "" "" class_name
+is_unsigned "" "" class_name
+is_volatile "" "" class_name
+extent "" "" class_name
+rank "" "" class_name
+is_base_of "" "" class_name
+is_convertible "" "" class_name
+is_same "" "" class_name
+add_const "" "" class_name
+add_cv "" "" class_name
+add_pointer "" "" class_name
+add_reference "" "" class_name
+add_volatile "" "" class_name
+decay "" "" class_name
+floating_point_promotion "" "" class_name
+integral_promotion "" "" class_name
+make_signed "" "" class_name
+make_unsigned "" "" class_name
+promote "" "" class_name
+remove_all_extents "" "" class_name
+remove_const "" "" class_name
+remove_cv "" "" class_name
+remove_extent "" "" class_name
+remove_pointer "" "" class_name
+remove_reference "" "" class_name
+remove_volatile "" "" class_name
+
Added: sandbox/tools/auto_index/test/test1.gold
==============================================================================
--- (empty file)
+++ sandbox/tools/auto_index/test/test1.gold 2009-02-06 11:57:38 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,6622 @@
+<?xml version="1.0"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!--
+
+This file is based upon the type traits docs, but has had additional XML elements added to it
+to ensure complete testing.
+
+-->
+
+<chapter xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" id="boost_typetraits" rev:last-revision="$Date: 2008-11-28 12:41:45 +0000 (Fri, 28 Nov 2008) $">
+ <chapterinfo><author>
+ <firstname>various</firstname> <surname>authors</surname>
+ </author><copyright>
+ <year>2000</year> <year>2006</year> <holder>Adobe Systems Inc, David Abrahams,
+ Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat
+ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
+ Ramey and Jeremy Siek</holder>
+ </copyright><legalnotice>
+ <para>
+ 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>)
+ </para>
+ </legalnotice></chapterinfo>
+ <title>Boost.TypeTraits</title>
+ <para>
+ A printer-friendly <ulink url="http://svn.boost.org/svn/boost/sandbox/pdf/type_traits/release/type_traits.pdf">PDF
+ version of this manual is also available</ulink>.
+ </para>
+ <section id="boost_typetraits.intro">
+ <title><link linkend="boost_typetraits.intro"> Introduction</link></title>
+ <para>
+ 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,
+ is a type a pointer or a reference type? Or does a type have a trivial constructor,
+ or a const-qualifier?
+ </para>
+ <para>
+ The type-traits classes share a unified design: each class inherits from a
+ the type <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>Introduction</secondary></indexterm><indexterm><primary>Introduction</primary><secondary>true_type</secondary></indexterm>true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>Introduction</secondary></indexterm><indexterm><primary>Introduction</primary><secondary>false_type</secondary></indexterm>false_type</link>
+ otherwise.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation.
+ </para>
+ </section>
+ <section id="boost_typetraits.background">
+ <title><link linkend="boost_typetraits.background"> Background and Tutorial</link></title>
+ <para>
+ 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
+ <ulink url="http://www.ddj.com">Dr Dobb's Journal</ulink>.
+ </para>
+ <para>
+ Generic programming (writing code which works with any data type meeting a
+ set of requirements) has become the method of choice for providing reusable
+ code. However, there are times in generic programming when "generic"
+ just isn't good enough - sometimes the differences between types are too large
+ for an efficient generic implementation. This is when the traits technique
+ becomes important - by encapsulating those properties that need to be considered
+ on a type by type basis inside a traits class, we can minimize the amount of
+ code that has to differ from one type to another, and maximize the amount of
+ generic code.
+ </para>
+ <?dbfo keep-together="auto" ?>
+ <para>
+ <indexterm>
+ <primary>Foo1</primary>
+ </indexterm>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">strlen</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">wcslen</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">wchar_t</phrase></computeroutput>
+ into the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput>.
+ Generic code that works with character strings can simply use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase><phrase role="special"><>::</phrase><phrase role="identifier">length</phrase></computeroutput> to determine the length of a null
+ terminated string, safe in the knowledge that specializations of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> will use the most appropriate
+ method available to them.
+ </para>
+ <anchor id="boost_typetraits.background.type_traits"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.type_traits">Type Traits</link>
+ </bridgehead>
+ <para>
+ Class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> is a classic
+ example of a collection of type specific properties wrapped up in a single
+ class - what Nathan Myers termed a <emphasis>baggage class</emphasis><link linkend="background.references">[1]</link>. In the Boost type-traits library,
+ we<link linkend="background.references">[2]</link> 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 <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>true_type</secondary></indexterm>true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>false_type</secondary></indexterm>false_type</link>
+ 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.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation. All of the type-traits classes are
+ defined inside namespace <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase></computeroutput>;
+ for brevity, namespace-qualification is omitted in most of the code samples
+ given.
+ </para>
+ <anchor id="boost_typetraits.background.implementation"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.implementation">Implementation</link>
+ </bridgehead>
+ <para>
+ 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,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_void</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>is_void</secondary></indexterm>is_void</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput> inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>
+ only if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void"><indexterm type="class_name"><primary>is_void</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>is_void</secondary></indexterm>is_void</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>false_type</secondary></indexterm>false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void"><indexterm type="class_name"><primary>is_void</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>is_void</secondary></indexterm>is_void</link><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>true_type</secondary></indexterm>true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ Here we define a primary version of the template class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_void"><indexterm type="class_name"><primary>is_void</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>is_void</secondary></indexterm>is_void</link></computeroutput>,
+ and provide a full-specialization when <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>. 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_pointer</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>is_pointer</secondary></indexterm>is_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput>:
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer"><indexterm type="class_name"><primary>is_pointer</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>is_pointer</secondary></indexterm>is_pointer</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>false_type</secondary></indexterm>false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer"><indexterm type="class_name"><primary>is_pointer</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>is_pointer</secondary></indexterm>is_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">*></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>true_type</secondary></indexterm>true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ The syntax for partial specialization is somewhat arcane and could easily occupy
+ an article in its own right; like full specialization, in order to write a
+ partial specialization for a class, you must first declare the primary template.
+ The partial specialization contains an extra <...> after the class name
+ that contains the partial specialization parameters; these define the types
+ that will bind to that partial specialization rather than the default template.
+ The rules for what can appear in a partial specialization are somewhat convoluted,
+ but as a rule of thumb if you can legally write two function overloads of the
+ form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">);</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">U</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Then you can also write a partial specialization of the form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">>{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ This rule is by no means foolproof, but it is reasonably simple to remember
+ and close enough to the actual rule to be useful for everyday use.
+ </para>
+ <para>
+ As a more complex example of partial specialization consider the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm>remove_extent</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput>. This
+ class defines a single typedef-member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm>remove_extent</link>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm>remove_extent</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">[</phrase><phrase role="identifier">N</phrase><phrase role="special">]></phrase>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The aim of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm>remove_extent</link></computeroutput>
+ is this: imagine a generic algorithm that is passed an array type as a template
+ parameter, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm>remove_extent</link></computeroutput>
+ provides a means of determining the underlying type of the array. For example
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>remove_extent</secondary></indexterm>remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">][</phrase><phrase role="number">5</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput> would evaluate to the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="num
ber">5</phrase><phrase role="special">]</phrase></computeroutput>. 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.
+ </para>
+ <anchor id="boost_typetraits.background.optimized_copy"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.optimized_copy">Optimized copy</link>
+ </bridgehead>
+ <para>
+ As an example of how the type traits classes can be used, consider the standard
+ library algorithm copy:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">Iter1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iter2</phrase><phrase role="special">></phrase>
+<phrase role="identifier">Iter2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">Iter1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter2</phrase> <phrase role="identifier">out</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Obviously, there's no problem writing a generic version of copy that works
+ for all iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput>; however, there are
+ some circumstances when the copy operation can best be performed by a call
+ to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>. In order to implement
+ copy in terms of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> all
+ of the following conditions need to be met:
+ </para>
+ <itemizedlist>
+ <listitem>
+ Both of the iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must be pointers.
+ </listitem>
+ <listitem>
+ Both <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must point to the same type - excluding
+ const and volatile-qualifiers.
+ </listitem>
+ <listitem>
+ The type pointed to by <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ must have a trivial assignment operator.
+ </listitem>
+ </itemizedlist>
+ <para>
+ By trivial assignment operator we mean that the type is either a scalar type<link linkend="background.references">[3]</link> or:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The type has no user defined assignment operator.
+ </listitem>
+ <listitem>
+ The type does not have any data members that are references.
+ </listitem>
+ <listitem>
+ All base classes, and all data member objects must have trivial assignment
+ operators.
+ </listitem>
+ </itemizedlist>
+ <para>
+ If all these conditions are met then a type can be copied using <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> rather than using a compiler generated
+ assignment operator. The type-traits library provides a class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</link></computeroutput>,
+ such that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> 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 <link linkend="boost_typetraits.reference.has_trivial_assign"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</link>
+ gives the wrong answer, it will give the "safe" wrong answer - that
+ trivial assignment is not allowable.
+ </para>
+ <para>
+ The code for an optimized version of copy that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ where appropriate is given in <link linkend="boost_typetraits.examples.copy">the
+ examples</link>. The code begins by defining a template function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">do_copy</phrase></computeroutput> that performs a "slow but safe"
+ copy. The last parameter passed to this function may be either a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>
+ or a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>false_type</secondary></indexterm>false_type</link></computeroutput>.
+ Following that there is an overload of do<emphasis role="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 `</emphasis>_true_type<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">.</phrase> <phrase role="identifier">Finally</phrase><phrase role="special">,</phrase> <phrase role="identifier">the</phrase> <phrase role="identifier">version</phrase>
+ <phrase role="identifier">of</phrase> </computeroutput>copy<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="identifier">calls</phrase>
+ </computeroutput>do<emphasis role="underline">copy`, passing `</emphasis>_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".
+ </para>
+ <anchor id="boost_typetraits.background.was_it_worth_it_"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.was_it_worth_it_">Was it worth it?</link>
+ </bridgehead>
+ <para>
+ It has often been repeated in these columns that "premature optimization
+ is the root of all evil" <link linkend="background.references">[4]</link>.
+ So the question must be asked: was our optimization premature? To put this
+ in perspective the timings for our version of copy compared a conventional
+ generic copy<link linkend="background.references">[5]</link> are shown in table
+ 1.
+ </para>
+ <para>
+ Clearly the optimization makes a difference in this case; but, to be fair,
+ the timings are loaded to exclude cache miss effects - without this accurate
+ comparison between algorithms becomes difficult. However, perhaps we can add
+ a couple of caveats to the premature optimization rule:
+ </para>
+ <itemizedlist>
+ <listitem>
+ If you use the right algorithm for the job in the first place then optimization
+ will not be required; in some cases, memcpy is the right algorithm.
+ </listitem>
+ <listitem>
+ If a component is going to be reused in many places by many people then optimizations
+ may well be worthwhile where they would not be so for a single case - in
+ other words, the likelihood that the optimization will be absolutely necessary
+ somewhere, sometime is that much higher. Just as importantly the perceived
+ value of the stock implementation will be higher: there is no point standardizing
+ an algorithm if users reject it on the grounds that there are better, more
+ heavily optimized versions available.
+ </listitem>
+ </itemizedlist>
+ <table frame="all"> <title>Time taken to copy 1000 elements using `copy<const
+ T*, T*>` (times in micro-seconds)</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Version
+ </para>
+ </entry><entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ Time
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 0.99
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 8.07
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 2.52
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 8.02
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <anchor id="boost_typetraits.background.pair_of_references"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.pair_of_references">Pair of References</link>
+ </bridgehead>
+ <para>
+ 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
+ code to compile that otherwise would not do so unless excessive partial specialization
+ is used. This is possible by delegating partial specialization to the type
+ traits classes. Our example for this form of usage is a pair that can hold
+ references <link linkend="background.references">[6]</link>.
+ </para>
+ <para>
+ First, let us examine the definition of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput>, omitting
+ the comparison operators, default constructor, and template copy constructor
+ for simplicity:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Now, this "pair" cannot hold references as it currently stands, because
+ the constructor would require taking a reference to a reference, which is currently
+ illegal <link linkend="background.references">[7]</link>. Let us consider what
+ the constructor's parameters would have to be in order to allow "pair"
+ to hold non-reference types, references, and constant references:
+ </para>
+ <table frame="all"> <title>Required Constructor Argument Types</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of parameter to initializing constructor
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &
+ </para>
+ </entry><entry>
+ <para>
+ T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.add_reference"><indexterm type="class_name"><primary>add_reference</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>add_reference</secondary></indexterm>add_reference</link>, which
+ adds a reference to its type, unless it is already a reference.
+ </para>
+ <table frame="all"> <title><indexterm type="class_name"><primary>add_reference</primary><secondary>Using add_reference to synthesize the correct constructor type</secondary></indexterm><indexterm><primary>Using add_reference to synthesize the correct constructor type</primary><secondary>add_reference</secondary></indexterm>Using add_reference to synthesize the correct constructor
+ type</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_reference</primary><secondary>Using add_reference to synthesize the correct constructor type</secondary></indexterm><indexterm><primary>Using add_reference to synthesize the correct constructor type</primary><secondary>add_reference</secondary></indexterm>add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &
+ </para>
+ </entry><entry>
+ <para>
+ T & [8]
+ </para>
+ </entry><entry>
+ <para>
+ T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ This allows us to build a primary template definition for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>
+ that can contain non-reference types, reference types, and constant reference
+ types:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference"><indexterm type="class_name"><primary>add_reference</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>add_reference</secondary></indexterm>add_reference</link><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference"><indexterm type="class_name"><primary>add_reference</primary><secondary>Background and Tutorial</secondary></indexterm><indexterm><primary>Background and Tutorial</primary><secondary>add_reference</secondary></indexterm>add_reference</link><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Add back in the standard comparison operators, default constructor, and template
+ copy constructor (which are all the same), and you have a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput> that
+ can hold reference types!
+ </para>
+ <para>
+ This same extension could have been done using partial template specialization
+ of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>, but to specialize
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput> 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
+ approach. Using type traits in this fashion allows programmers to delegate
+ partial specialization to the type traits classes, resulting in code that is
+ easier to maintain and easier to understand.
+ </para>
+ <anchor id="boost_typetraits.background.conclusion"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.conclusion">Conclusion</link>
+ </bridgehead>
+ <para>
+ 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
+ are in the boost documentation, along with further examples using type traits.
+ Templates have enabled C++ uses to take the advantage of the code reuse that
+ generic programming brings; hopefully this article has shown that generic programming
+ does not have to sink to the lowest common denominator, and that templates
+ can be optimal as well as generic.
+ </para>
+ <anchor id="boost_typetraits.background.acknowledgements"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.acknowledgements">Acknowledgements</link>
+ </bridgehead>
+ <para>
+ The authors would like to thank Beman Dawes and Howard Hinnant for their helpful
+ comments when preparing this article.
+ </para>
+ <anchor id="background.references"></anchor> <anchor id="boost_typetraits.background.references"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.references">References</link>
+ </bridgehead>
+ <orderedlist inheritnum="ignore" continuation="restarts">
+ <listitem>
+ Nathan C. Myers, C++ Report, June 1995.
+ </listitem>
+ <listitem>
+ The type traits library is based upon contributions by Steve Cleary, Beman
+ Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org.
+ </listitem>
+ <listitem>
+ A scalar type is an arithmetic type (i.e. a built-in integer or floating
+ point type), an enumeration type, a pointer, a pointer to member, or a const-
+ or volatile-qualified version of one of these types.
+ </listitem>
+ <listitem>
+ This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg
+ 268.
+ </listitem>
+ <listitem>
+ The test code is available as part of the boost utility library (see algo_opt_examples.cpp),
+ the code was compiled with gcc 2.95 with all optimisations turned on, tests
+ were conducted on a 400MHz Pentium II machine running Microsoft Windows 98.
+ </listitem>
+ <listitem>
+ John Maddock and Howard Hinnant have submitted a "compressed_pair"
+ library to Boost, which uses a technique similar to the one described here
+ to hold references. Their pair also uses type traits to determine if any
+ of the types are empty, and will derive instead of contain to conserve space
+ -- hence the name "compressed".
+ </listitem>
+ <listitem>
+ This is actually an issue with the C++ Core Language Working Group (issue
+ #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow
+ a "reference to a reference to T" to mean the same thing as a "reference
+ to T", but only in template instantiation, in a method similar to multiple
+ cv-qualifiers.
+ </listitem>
+ <listitem>
+ For those of you who are wondering why this shouldn't be const-qualified,
+ remember that references are always implicitly constant (for example, you
+ can't re-assign a reference). Remember also that "const T &"
+ is something completely different. For this reason, cv-qualifiers on template
+ type arguments that are references are ignored.
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="boost_typetraits.category">
+ <title><link linkend="boost_typetraits.category"> Type Traits by Category</link></title>
+ <section id="boost_typetraits.category.value_traits">
+ <title><link linkend="boost_typetraits.category.value_traits"> Type Traits
+ that Describe the Properties of a Type</link></title>
+ <para>
+ <indexterm>
+ <primary>Foo2</primary>
+ <secondary>Bar2</secondary>
+ </indexterm>
+ These traits are all <emphasis>value traits</emphasis>, which is to say the
+ traits classes all inherit from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>Type Traits that Describe the Properties of a Type</secondary></indexterm><indexterm><primary>Type Traits that Describe the Properties of a Type</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link>,
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.alignment_of"><indexterm type="class_name"><primary>alignment_of</primary><secondary>Type Traits that Describe the Properties of a Type</secondary></indexterm><indexterm><primary>Type Traits that Describe the Properties of a Type</primary><secondary>alignment_of</secondary></indexterm><indexterm type="class_name"><primary>alignment_of</primary><secondary>Type Traits that Describe the Properties of a Type</secondary></indexterm><indexterm><primary>Type Traits that Describe the Properties of a Type</primary><secondary>alignment_of</secondary></indexterm>alignment_of</link></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.rank"><indexterm type="class_name"><primary>rank</primary><secondary>Type Traits that Describe the Properties of a Type</secondary></indexterm><indexterm><primary>Type Traits that Describe the Properties of a Type</primary><secondary>rank</secondary></indexterm>rank</link></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.extent"><indexterm type="class_name"><primary>extent</primary><secondary>Type Traits that Describe the Properties of a Type</secondary></indexterm><indexterm><primary>Type Traits that Describe the Properties of a Type</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>Type Traits that Describe the Properties of a Type</secondary></indexterm><indexterm><primary>Type Traits that Describe the Properties of a Type</primary><secondary>extent</secondary></indexterm>extent</link></computeroutput>).
+ </para>
+ <section id="boost_typetraits.category.value_traits.primary">
+ <title><link linkend="boost_typetraits.category.value_traits.primary"> Categorizing
+ a Type</link></title>
+ <para>
+ These traits identify what "kind" of type some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> 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.
+ </para>
+ <para>
+ For any given type, exactly one primary type trait will inherit from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ and all the others will inherit from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>false_type</secondary></indexterm>false_type</link>,
+ in other words these traits are mutually exclusive.
+ </para>
+ <para>
+ This means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_integral"><indexterm type="class_name"><primary>is_integral</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_integral</secondary></indexterm>is_integral</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_floating_point"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_floating_point</secondary></indexterm>is_floating_point</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric_limits</phrase>
+ <phrase role="keyword">template</phrase></computeroutput> instead.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_array"><indexterm type="class_name"><primary>is_array</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_array</secondary></indexterm>is_array</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class"><indexterm type="class_name"><primary>is_class</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_class</secondary></indexterm>is_class</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_complex"><indexterm type="class_name"><primary>is_complex</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_complex</secondary></indexterm>is_complex</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_enum"><indexterm type="class_name"><primary>is_enum</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_enum</secondary></indexterm>is_enum</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_floating_point"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_floating_point</secondary></indexterm>is_floating_point</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_function"><indexterm type="class_name"><primary>is_function</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_function</secondary></indexterm>is_function</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_integral"><indexterm type="class_name"><primary>is_integral</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_integral</secondary></indexterm>is_integral</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_function_pointer"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_member_function_pointer</secondary></indexterm>is_member_function_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_object_pointer"><indexterm type="class_name"><primary>is_member_object_pointer</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_member_object_pointer</secondary></indexterm>is_member_object_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer"><indexterm type="class_name"><primary>is_pointer</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_pointer</secondary></indexterm>is_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_reference"><indexterm type="class_name"><primary>is_reference</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_reference</secondary></indexterm>is_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union"><indexterm type="class_name"><primary>is_union</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_union</secondary></indexterm>is_union</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void"><indexterm type="class_name"><primary>is_void</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_void</secondary></indexterm>is_void</link><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ The following traits are made up of the union of one or more type categorizations.
+ A type may belong to more than one of these categories, in addition to
+ one of the primary categories.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_arithmetic"><indexterm type="class_name"><primary>is_arithmetic</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_arithmetic</secondary></indexterm>is_arithmetic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_compound"><indexterm type="class_name"><primary>is_compound</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_compound</secondary></indexterm>is_compound</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_fundamental"><indexterm type="class_name"><primary>is_fundamental</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_fundamental</secondary></indexterm>is_fundamental</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_pointer"><indexterm type="class_name"><primary>is_member_pointer</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_member_pointer</secondary></indexterm>is_member_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_object"><indexterm type="class_name"><primary>is_object</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_object</secondary></indexterm>is_object</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_scalar"><indexterm type="class_name"><primary>is_scalar</primary><secondary>Categorizing a Type</secondary></indexterm><indexterm><primary>Categorizing a Type</primary><secondary>is_scalar</secondary></indexterm>is_scalar</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.properties">
+ <title><link linkend="boost_typetraits.category.value_traits.properties">
+ General Type Properties</link></title>
+ <para>
+ The following templates describe the general properties of a type.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.alignment_of"><indexterm type="class_name"><primary>alignment_of</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>alignment_of</secondary></indexterm><indexterm type="class_name"><primary>alignment_of</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>alignment_of</secondary></indexterm>alignment_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_assign"><indexterm type="class_name"><primary>has_nothrow_assign</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_nothrow_assign</secondary></indexterm>has_nothrow_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor"><indexterm type="class_name"><primary>has_nothrow_constructor</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_nothrow_constructor</secondary></indexterm>has_nothrow_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor"><indexterm type="class_name"><primary>has_nothrow_default_constructor</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_nothrow_default_constructor</secondary></indexterm>has_nothrow_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy"><indexterm type="class_name"><primary>has_nothrow_copy</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_nothrow_copy</secondary></indexterm>has_nothrow_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy"><indexterm type="class_name"><primary>has_nothrow_copy_constructor</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_nothrow_copy_constructor</secondary></indexterm>has_nothrow_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_assign"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_trivial_constructor</secondary></indexterm>has_trivial_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor"><indexterm type="class_name"><primary>has_trivial_default_constructor</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_trivial_default_constructor</secondary></indexterm>has_trivial_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_trivial_copy</secondary></indexterm>has_trivial_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy"><indexterm type="class_name"><primary>has_trivial_copy_constructor</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_trivial_copy_constructor</secondary></indexterm>has_trivial_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_destructor"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_trivial_destructor</secondary></indexterm>has_trivial_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_virtual_destructor"><indexterm type="class_name"><primary>has_virtual_destructor</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>has_virtual_destructor</secondary></indexterm>has_virtual_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_abstract"><indexterm type="class_name"><primary>is_abstract</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>is_abstract</secondary></indexterm>is_abstract</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_const"><indexterm type="class_name"><primary>is_const</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>is_const</secondary></indexterm>is_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_empty"><indexterm type="class_name"><primary>is_empty</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>is_empty</secondary></indexterm>is_empty</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_stateless"><indexterm type="class_name"><primary>is_stateless</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>is_stateless</secondary></indexterm>is_stateless</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod"><indexterm type="class_name"><primary>is_pod</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>is_pod</secondary></indexterm>is_pod</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_polymorphic"><indexterm type="class_name"><primary>is_polymorphic</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>is_polymorphic</secondary></indexterm>is_polymorphic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_signed"><indexterm type="class_name"><primary>is_signed</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>is_signed</secondary></indexterm>is_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_unsigned"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>is_unsigned</secondary></indexterm>is_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_volatile"><indexterm type="class_name"><primary>is_volatile</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>is_volatile</secondary></indexterm>is_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.extent"><indexterm type="class_name"><primary>extent</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>extent</secondary></indexterm>extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.rank"><indexterm type="class_name"><primary>rank</primary><secondary>General Type Properties</secondary></indexterm><indexterm><primary>General Type Properties</primary><secondary>rank</secondary></indexterm>rank</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.relate">
+ <title><link linkend="boost_typetraits.category.value_traits.relate"> Relationships
+ Between Two Types</link></title>
+ <para>
+ These templates determine the whether there is a relationship between two
+ types:
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_base_of"><indexterm type="class_name"><primary>is_base_of</primary><secondary>Relationships Between Two Types</secondary></indexterm><indexterm><primary>Relationships Between Two Types</primary><secondary>is_base_of</secondary></indexterm>is_base_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_convertible"><indexterm type="class_name"><primary>is_convertible</primary><secondary>Relationships Between Two Types</secondary></indexterm><indexterm><primary>Relationships Between Two Types</primary><secondary>is_convertible</secondary></indexterm>is_convertible</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_same"><indexterm type="class_name"><primary>is_same</primary><secondary>Relationships Between Two Types</secondary></indexterm><indexterm><primary>Relationships Between Two Types</primary><secondary>is_same</secondary></indexterm>is_same</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.category.transform">
+ <title><link linkend="boost_typetraits.category.transform"> Type Traits that
+ Transform One Type to Another</link></title>
+ <para>
+ The following templates transform one type to another, based upon some well-defined
+ rule. Each template has a single member called <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of applying the transformation to the template argument
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_const"><indexterm type="class_name"><primary>add_const</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>add_const</secondary></indexterm>add_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_cv"><indexterm type="class_name"><primary>add_cv</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>add_cv</secondary></indexterm>add_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_pointer"><indexterm type="class_name"><primary>add_pointer</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>add_pointer</secondary></indexterm>add_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_reference"><indexterm type="class_name"><primary>add_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>add_reference</secondary></indexterm>add_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_volatile"><indexterm type="class_name"><primary>add_volatile</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>add_volatile</secondary></indexterm>add_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.decay"><indexterm type="class_name"><primary>decay</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>decay</secondary></indexterm><indexterm type="class_name"><primary>decay</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>decay</secondary></indexterm>decay</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.floating_point_promotion"><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>floating_point_promotion</secondary></indexterm>floating_point_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.integral_promotion"><indexterm type="class_name"><primary>integral_promotion</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>integral_promotion</secondary></indexterm><indexterm type="class_name"><primary>integral_promotion</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>integral_promotion</secondary></indexterm>integral_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_signed"><indexterm type="class_name"><primary>make_signed</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>make_signed</secondary></indexterm>make_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_unsigned"><indexterm type="class_name"><primary>make_unsigned</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>make_unsigned</secondary></indexterm>make_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.promote"><indexterm type="class_name"><primary>promote</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>promote</secondary></indexterm>promote</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_all_extents"><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_all_extents</secondary></indexterm><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_all_extents</secondary></indexterm>remove_all_extents</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_const"><indexterm type="class_name"><primary>remove_const</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_const</secondary></indexterm><indexterm type="class_name"><primary>remove_const</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_const</secondary></indexterm>remove_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_cv"><indexterm type="class_name"><primary>remove_cv</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_cv</secondary></indexterm><indexterm type="class_name"><primary>remove_cv</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_cv</secondary></indexterm>remove_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_extent</secondary></indexterm>remove_extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_pointer"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_pointer</secondary></indexterm><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_pointer</secondary></indexterm>remove_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_reference"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm>remove_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_volatile"><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_volatile</secondary></indexterm><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_volatile</secondary></indexterm>remove_volatile</link><phrase role="special">;</phrase>
+</programlisting>
+ <anchor id="boost_typetraits.category.transform.broken_compiler_workarounds_"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
+ Compiler Workarounds:</link>
+ </bridgehead>
+ <para>
+ For all of these templates support for partial specialization of class templates
+ is required to correctly implement the transformation. On the other hand,
+ practice shows that many of the templates from this category are very useful,
+ and often essential for implementing some generic libraries. Lack of these
+ templates is often one of the major limiting factors in porting those libraries
+ to compilers that do not yet support this language feature. As some of these
+ compilers are going to be around for a while, and at least one of them is
+ very wide-spread, it was decided that the library should provide workarounds
+ where possible.
+ </para>
+ <para><indexterm type="class_name"><primary>rank</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>rank</secondary></indexterm>
+ The basic idea behind the workaround is to manually define full specializations
+ of all type transformation templates for all fundamental types, and all their
+ 1st and 2nd rank cv-[un]qualified derivative pointer types, and to provide
+ a user-level macro that will define all the explicit specializations needed
+ for any user-defined type T.
+ </para>
+ <para>
+ The first part guarantees the successful compilation of something like this:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Trait
s that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One
Type to Another</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform O
ne Type to Another</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm
><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>r
emove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One
Type to Another</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="special">...</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to
Another</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+</programlisting>
+ <para>
+ and the second part provides the library's users with a mechanism to make
+ the above code work not only for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput> or other built-in type,
+ but for their own types as well:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">namespace</phrase> <phrase role="identifier">myspace</phrase><phrase role="special">{</phrase>
+ <phrase role="keyword">struct</phrase> <phrase role="identifier">MyClass</phrase> <phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+<phrase role="comment">// declare this at global scope:
+</phrase><phrase role="identifier"><indexterm type="macro_name"><primary>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</secondary></indexterm>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase><phrase role="special">(</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">)</phrase>
+<phrase role="comment">// transformations on myspace::MyClass now work:
+</phrase><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexter
m><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_const</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>remove_const</secondary></indexterm><indexterm type="class_name"><primary>remove_const</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary
>Type Traits that Transform One Type to Another</primary><secondary>remove_const</secondary></indexterm>remove_const</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="comment">// etc.
+</phrase></programlisting>
+ <para><indexterm type="macro_name"><primary>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</primary><secondary>Type Traits that Transform One Type to Another</secondary></indexterm><indexterm><primary>Type Traits that Transform One Type to Another</primary><secondary>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</secondary></indexterm>
+ Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates
+ to nothing on those compilers that <emphasis role="bold">do</emphasis> support
+ partial specialization.
+ </para>
+ </section>
+ <section id="boost_typetraits.category.alignment">
+ <title><link linkend="boost_typetraits.category.alignment"> Synthesizing Types
+ with Specific Alignments</link></title>
+ <para>
+ Some low level memory management routines need to synthesize a POD type with
+ specific alignment properties. The template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.type_with_alignment"><indexterm type="class_name"><primary>type_with_alignment</primary><secondary>Synthesizing Types with Specific Alignments</secondary></indexterm><indexterm><primary>Synthesizing Types with Specific Alignments</primary><secondary>type_with_alignment</secondary></indexterm>type_with_alignment</link></computeroutput>
+ finds the smallest type with a specified alignment, while template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link></computeroutput>
+ creates a type with a specific size and alignment.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.type_with_alignment"><indexterm type="class_name"><primary>type_with_alignment</primary><secondary>Synthesizing Types with Specific Alignments</secondary></indexterm><indexterm><primary>Synthesizing Types with Specific Alignments</primary><secondary>type_with_alignment</secondary></indexterm>type_with_alignment</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.function">
+ <title><link linkend="boost_typetraits.category.function"> Decomposing Function
+ Types</link></title>
+ <para>
+ The class template <link linkend="boost_typetraits.reference.function_traits"><indexterm type="class_name"><primary>function_traits</primary><secondary>Decomposing Function Types</secondary></indexterm><indexterm><primary>Decomposing Function Types</primary><secondary>function_traits</secondary></indexterm>function_traits</link>
+ extracts information from function types (see also <link linkend="boost_typetraits.reference.is_function"><indexterm type="class_name"><primary>is_function</primary><secondary>Decomposing Function Types</secondary></indexterm><indexterm><primary>Decomposing Function Types</primary><secondary>is_function</secondary></indexterm>is_function</link>).
+ This traits class allows you to tell how many arguments a function takes,
+ what those argument types are, and what the return type is.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.function_traits"><indexterm type="class_name"><primary>function_traits</primary><secondary>Decomposing Function Types</secondary></indexterm><indexterm><primary>Decomposing Function Types</primary><secondary>function_traits</secondary></indexterm>function_traits</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.user_defined">
+ <title><link linkend="boost_typetraits.user_defined"> User Defined Specializations</link></title>
+ <para>
+ 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::<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>true_type</secondary></indexterm>true_type</link>
+ or boost::<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>false_type</secondary></indexterm>false_type</link>
+ as appropriate:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_pod</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>is_pod</secondary></indexterm>is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_class</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>is_class</secondary></indexterm>is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_union</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>is_union</secondary></indexterm>is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_pod</phrase><phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_union</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">char</phrase> <phrase role="identifier">c</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod"><indexterm type="class_name"><primary>is_pod</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>is_pod</secondary></indexterm>is_pod</link><phrase role="special"><</phrase><phrase role="identifier">my_pod</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>true_type</secondary></indexterm>true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod"><indexterm type="class_name"><primary>is_pod</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>is_pod</secondary></indexterm>is_pod</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>true_type</secondary></indexterm>true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union"><indexterm type="class_name"><primary>is_union</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>is_union</secondary></indexterm>is_union</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>true_type</secondary></indexterm>true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class"><indexterm type="class_name"><primary>is_class</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>is_class</secondary></indexterm>is_class</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>User Defined Specializations</secondary></indexterm><indexterm><primary>User Defined Specializations</primary><secondary>false_type</secondary></indexterm>false_type</link><phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.intrinsics">
+ <title><link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link></title>
+ <para>
+ 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
+ of additional help from the compiler is required. Currently (April 2008) Visual
+ C++ 8 and 9, GNU GCC 4.3 and MWCW 9 provide the necessary intrinsics, and other
+ compilers will no doubt follow in due course.
+ </para>
+ <para>
+ The Following traits classes always need compiler support to do the right thing
+ for all types (but all have safe fallback positions if this support is unavailable):
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_union"><indexterm type="class_name"><primary>is_union</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>is_union</secondary></indexterm>is_union</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_pod"><indexterm type="class_name"><primary>is_pod</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>is_pod</secondary></indexterm>is_pod</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_constructor"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>has_trivial_constructor</secondary></indexterm>has_trivial_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_copy"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>has_trivial_copy</secondary></indexterm>has_trivial_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_assign"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_destructor"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>has_trivial_destructor</secondary></indexterm>has_trivial_destructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_constructor"><indexterm type="class_name"><primary>has_nothrow_constructor</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>has_nothrow_constructor</secondary></indexterm>has_nothrow_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_copy"><indexterm type="class_name"><primary>has_nothrow_copy</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>has_nothrow_copy</secondary></indexterm>has_nothrow_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_assign"><indexterm type="class_name"><primary>has_nothrow_assign</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>has_nothrow_assign</secondary></indexterm>has_nothrow_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_virtual_destructor"><indexterm type="class_name"><primary>has_virtual_destructor</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>has_virtual_destructor</secondary></indexterm>has_virtual_destructor</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes can't be portably implemented in the C++ language,
+ although in practice, the implementations do in fact do the right thing on
+ all the compilers we know about:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_empty"><indexterm type="class_name"><primary>is_empty</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>is_empty</secondary></indexterm>is_empty</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_polymorphic"><indexterm type="class_name"><primary>is_polymorphic</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>is_polymorphic</secondary></indexterm>is_polymorphic</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes are dependent on one or more of the above:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_class"><indexterm type="class_name"><primary>is_class</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>is_class</secondary></indexterm>is_class</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_stateless"><indexterm type="class_name"><primary>is_stateless</primary><secondary>Support for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Support for Compiler Intrinsics</primary><secondary>is_stateless</secondary></indexterm>is_stateless</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The hooks for compiler-intrinsic support are defined in <ulink url="../../../../boost/type_traits/intrinsics.hpp">boost/type_traits/intrinsics.hpp</ulink>,
+ adding support for new compilers is simply a matter of defining one of more
+ of the following macros:
+ </para>
+ <table frame="all"> <title>Macros for Compiler Intrinsics</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_IS_UNION</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_IS_UNION</secondary></indexterm>
+ BOOST_IS_UNION(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a union type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_IS_POD</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_IS_POD</secondary></indexterm>
+ BOOST_IS_POD(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a POD type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_IS_EMPTY</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_IS_EMPTY</secondary></indexterm>
+ BOOST_IS_EMPTY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an empty struct or union
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_HAS_TRIVIAL_CONSTRUCTOR</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_HAS_TRIVIAL_CONSTRUCTOR</secondary></indexterm>
+ BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if the default constructor for T is trivial (i.e.
+ has no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_HAS_TRIVIAL_COPY</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_HAS_TRIVIAL_COPY</secondary></indexterm>
+ BOOST_HAS_TRIVIAL_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial copy constructor (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_HAS_TRIVIAL_ASSIGN</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_HAS_TRIVIAL_ASSIGN</secondary></indexterm>
+ BOOST_HAS_TRIVIAL_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial assignment operator (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_HAS_TRIVIAL_DESTRUCTOR</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_HAS_TRIVIAL_DESTRUCTOR</secondary></indexterm>
+ BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial destructor (i.e. ~T() has
+ no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_HAS_NOTHROW_CONSTRUCTOR</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_HAS_NOTHROW_CONSTRUCTOR</secondary></indexterm>
+ BOOST_HAS_NOTHROW_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">x</phrase><phrase role="special">;</phrase></computeroutput>
+ can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_HAS_NOTHROW_COPY</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_HAS_NOTHROW_COPY</secondary></indexterm>
+ BOOST_HAS_NOTHROW_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">(</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_HAS_NOTHROW_ASSIGN</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_HAS_NOTHROW_ASSIGN</secondary></indexterm>
+ BOOST_HAS_NOTHROW_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">t</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">u</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">t</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">u</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_HAS_VIRTUAL_DESTRUCTOR</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_HAS_VIRTUAL_DESTRUCTOR</secondary></indexterm>
+ BOOST_HAS_VIRTUAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true T has a virtual destructor
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_IS_ABSTRACT</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_IS_ABSTRACT</secondary></indexterm>
+ BOOST_IS_ABSTRACT(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an abstract type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_IS_BASE_OF</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_IS_BASE_OF</secondary></indexterm>
+ BOOST_IS_BASE_OF(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a base class of U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_IS_CLASS</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_IS_CLASS</secondary></indexterm>
+ BOOST_IS_CLASS(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a class type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_IS_CONVERTIBLE</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_IS_CONVERTIBLE</secondary></indexterm>
+ BOOST_IS_CONVERTIBLE(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is convertible to U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_IS_ENUM</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_IS_ENUM</secondary></indexterm>
+ BOOST_IS_ENUM(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true is T is an enum
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_IS_POLYMORPHIC</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_IS_POLYMORPHIC</secondary></indexterm>
+ BOOST_IS_POLYMORPHIC(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a polymorphic type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><indexterm type="macro_name"><primary>BOOST_ALIGNMENT_OF</primary><secondary>Macros for Compiler Intrinsics</secondary></indexterm><indexterm><primary>Macros for Compiler Intrinsics</primary><secondary>BOOST_ALIGNMENT_OF</secondary></indexterm>
+ BOOST_ALIGNMENT_OF(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to the alignment requirements of type T.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.mpl">
+ <title><link linkend="boost_typetraits.mpl"> MPL Interoperability</link></title>
+ <para>
+ All the value based traits in this library conform to MPL's requirements for
+ an <ulink url="../../../../libs/mpl/doc/refmanual/integral-constant.html">Integral
+ Constant type</ulink>: that includes a number of rather intrusive workarounds
+ for broken compilers.
+ </para>
+ <para>
+ Purely as an implementation detail, this means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>MPL Interoperability</secondary></indexterm><indexterm><primary>MPL Interoperability</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">true_</phrase></computeroutput></ulink>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>MPL Interoperability</secondary></indexterm><indexterm><primary>MPL Interoperability</primary><secondary>false_type</secondary></indexterm>false_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">false_</phrase></computeroutput></ulink>,
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>MPL Interoperability</secondary></indexterm><indexterm><primary>MPL Interoperability</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">v</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/integral-c.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">integral_c</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">v</phrase><phrase role="special">></phrase></computeroutput></ulink>
+ (provided <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>)
+ </para>
+ </section>
+ <section id="boost_typetraits.examples">
+ <title><link linkend="boost_typetraits.examples"> Examples</link></title>
+ <section id="boost_typetraits.examples.copy">
+ <title><link linkend="boost_typetraits.examples.copy"> An Optimized Version
+ of std::copy</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">copy</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>An Optimized Version of std::copy</secondary></indexterm><indexterm><primary>Optimized Version of std::copy</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ to optimise the copy operation (see <ulink url="../../examples/copy_example.cpp">copy_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// opt::copy
+</phrase><phrase role="comment">// same semantics as std::copy
+</phrase><phrase role="comment">// calls memcpy where appropriate.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">></phrase>
+<phrase role="identifier">I2</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>An Optimized Version of std::copy</secondary></indexterm><indexterm><primary>Optimized Version of std::copy</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b
</phrase><phrase role="special">>&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">out</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>An Optimized Version of std::copy</secondary></indexterm><indexterm><primary>Optimized Version of std::copy</primary><secondary>
true_type</secondary></indexterm>true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">memcpy</phrase><phrase role="special">(</phrase><phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="special">(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">)*</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">));</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">+(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can copy with memcpy if T has a trivial assignment operator,
+</phrase> <phrase role="comment">// and if the iterator arguments are actually pointers (this last
+</phrase> <phrase role="comment">// requirement we detect with overload resolution):
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I1</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>An Optimized Version of std::copy</secondary></indexterm><indexterm><primary>Optimized Version of std::copy</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</link><phrase role="special"><</phrase><phrase role="identifier">value_type</phrase><phrase role="special">>());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.fill">
+ <title><link linkend="boost_typetraits.examples.fill"> An Optimised Version
+ of std::fill</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">fill</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>An Optimised Version of std::fill</secondary></indexterm><indexterm><primary>Optimised Version of std::fill</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memset</phrase></computeroutput>
+ to optimise the fill operation (see <ulink url="../../examples/fill_example.cpp">fill_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// fill
+</phrase><phrase role="comment">// same as std::fill, but uses memset where appropriate
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>An Optimised Version of std::fill</secondary></indexterm><indexterm><primary>Optimised Version of std::fill</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool
</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">>&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">first</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>An Optimised Version of std::fill</secondary></indexterm><indexterm><primary>Optimised Version of std::fill</primary><secondary>true_type</secondary></indexterm>true_type</link><phrase role="speci
al">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">memset</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can do an optimised fill if T has a trivial assignment
+</phrase> <phrase role="comment">// operator and if it's size is one:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>An Optimised Version of std::fill</secondary></indexterm><indexterm><primary>Optimised Version of std::fill</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>An Optimised Version of std::fill</secondary></indexterm><indexterm><primary>Optimised Version of std::fill</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase> <phrase role="special">&&</phrase> <phrase role="special">(</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)></phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.destruct">
+ <title><link linkend="boost_typetraits.examples.destruct"> An Example that
+ Omits Destructor Calls For Types with Trivial Destructors</link></title>
+ <para>
+ Demonstrates a simple algorithm that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">__has_trivial_destruct</phrase></computeroutput>
+ to determine whether to destructors need to be called (see <ulink url="../../examples/trivial_destructor_example.cpp">trivial_destructor_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// algorithm destroy_array:
+</phrase><phrase role="comment">// The reverse of std::unitialized_copy, takes a block of
+</phrase><phrase role="comment">// initialized memory and calls destructors on all objects therein.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>An Example that Omits Destructor Calls For Types with Trivial Destructors</secondary></indexterm><indexterm><primary>Example that Omits Destructor Calls For Types with Trivial Destructors</primary><secondary>false_type</secondary></indexterm>false_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="identifier">first</phrase><phrase role="special">->~</phrase><phrase role="identifier">T</phrase><phrase role="special">();</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>An Example that Omits Destructor Calls For Types with Trivial Destructors</secondary></indexterm><indexterm><primary>Example that Omits Destructor Calls For Types with Trivial Destructors</primary><secondary>true_type</secondary></indexterm>true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase> <phrase role="comment">// namespace detail
+</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p2</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">p2</phrase><phrase role="special">,</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_destructor"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>An Example that Omits Destructor Calls For Types with Trivial Destructors</secondary></indexterm><indexterm><primary>Example that Omits Destructor Calls For Types with Trivial Destructors</primary><secondary>has_trivial_destructor</secondary></indexterm>has_trivial_destructor</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.iter">
+ <title><link linkend="boost_typetraits.examples.iter"> An improved Version
+ of std::iter_swap</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase></computeroutput>
+ of it's dereferenced arguments (the same as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <ulink url="../../examples/iter_swap_example.cpp">iter_swap_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// iter_swap:
+</phrase><phrase role="comment">// tests whether iterator is a proxying iterator or not, and
+</phrase><phrase role="comment">// uses optimal form accordingly:
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">></phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>An improved Version of std::iter_swap</secondary></indexterm><indexterm><primary>improved Version of std::iter_swap</primary><secondary>false_type</secondary></indexterm>false_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">v_t</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">v_t</phrase> <phrase role="identifier">v</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">one</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">one</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">two</phrase> <phrase role="special">=</phrase> <phrase role="identifier">v</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">></phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>An improved Version of std::iter_swap</secondary></indexterm><indexterm><primary>improved Version of std::iter_swap</primary><secondary>true_type</secondary></indexterm>true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">using</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">swap</phrase><phrase role="special">(*</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">iter_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">two</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// See is both arguments are non-proxying iterators,
+</phrase> <phrase role="comment">// and if both iterator the same type:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I1</phrase><phrase role="special">>::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r1_t</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I2</phrase><phrase role="special">>::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">;</phrase>
+
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>An improved Version of std::iter_swap</secondary></indexterm><indexterm><primary>improved Version of std::iter_swap</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference"><indexterm type="class_name"><primary>is_reference</primary><secondary>An improved Version of std::iter_swap</secondary></indexterm><indexterm><primary>improved Version of std::iter_swap</primary><secondary>is_reference</secondary></indexterm>is_reference</link><phrase role="special"><</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference"><indexterm type="class_name"><primary>is_reference</primary><secondary>An improved Version of std::iter_swap</secondary></indexterm><indexterm><primary>improved Version of std::iter_swap</primary><secondary>is_reference</secondary></indexterm>is_reference</link><phrase role="special"><</phrase><phrase role="identifier">r2_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_same"><indexterm type="class_name"><primary>is_same</primary><secondary>An improved Version of std::iter_swap</secondary></indexterm><indexterm><primary>improved Version of std::iter_swap</primary><secondary>is_same</secondary></indexterm>is_same</link><phrase role="special"><</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">></phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.to_double">
+ <title><link linkend="boost_typetraits.examples.to_double"> Convert Numeric
+ Types and Enums to double</link></title>
+ <para>
+ Demonstrates a conversion of <ulink url="../../../../libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types">Numeric
+ Types</ulink> and enum types to double:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">double</phrase> <phrase role="identifier">to_double</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier"><indexterm type="class_name"><primary>promote</primary><secondary>Convert Numeric Types and Enums to double</secondary></indexterm><indexterm><primary>Convert Numeric Types and Enums to double</primary><secondary>promote</secondary></indexterm>promote</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">promoted</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric</phrase><phrase role="special">::</phrase><phrase role="identifier">converter</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase><phrase role="identifier">promoted</phrase><phrase role="special">>::</phrase><phrase role="identifier">convert</phrase><phrase role="special">(</phrase><phrase role="identifier">value</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.reference">
+ <title><link linkend="boost_typetraits.reference"> Alphabetical Reference</link></title>
+ <section id="boost_typetraits.reference.add_const">
+ <title><link linkend="boost_typetraits.reference.add_const"><indexterm type="class_name"><primary>add_const</primary><secondary>add_const</secondary></indexterm><indexterm><primary>add_const</primary><secondary>add_const</secondary></indexterm><indexterm type="class_name"><primary>Constrained Index Term</primary><secondary>add_const</secondary></indexterm><indexterm><primary>add_const</primary><secondary>Constrained Index Term</secondary></indexterm> add_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>add_const</primary><secondary>add_const</secondary></indexterm><indexterm><primary>add_const</primary><secondary>add_const</secondary></indexterm><indexterm type="class_name"><primary>Constrained Index Term</primary><secondary>add_const</secondary></indexterm><indexterm><primary>add_const</primary><secondary>Constrained Index Term</secondary></indexterm>add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>add_const</primary><secondary>add_const</secondary></indexterm><indexterm><primary>add_const</primary><secondary>add_const</secondary></indexterm><indexterm type="class_name"><primary>Constrained Index Term</primary><secondary>add_const</secondary></indexterm><indexterm><primary>add_const</primary><secondary>Constrained Index Term</secondary></indexterm>add_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_const</secondary></indexterm><indexterm type="class_name"><primary>Constrained Index Term</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>Constrained Index Term</secondary></indexterm>add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_const</secondary></indexterm><indexterm type="class_name"><primary>Constrained Index Term</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>Constrained Index Term</secondary></indexterm>add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_const</secondary></indexterm><indexterm type="class_name"><primary>Constrained Index Term</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>Constrained Index Term</secondary></indexterm>add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_const</secondary></indexterm><indexterm type="class_name"><primary>Constrained Index Term</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>Constrained Index Term</secondary></indexterm>add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_cv">
+ <title><link linkend="boost_typetraits.reference.add_cv"><indexterm type="class_name"><primary>add_cv</primary><secondary>add_cv</secondary></indexterm><indexterm><primary>add_cv</primary><secondary>add_cv</secondary></indexterm> add_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>add_cv</primary><secondary>add_cv</secondary></indexterm><indexterm><primary>add_cv</primary><secondary>add_cv</secondary></indexterm>add_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>add_cv</primary><secondary>add_cv</secondary></indexterm><indexterm><primary>add_cv</primary><secondary>add_cv</secondary></indexterm>add_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_cv</secondary></indexterm>add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_cv</secondary></indexterm>add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_cv</secondary></indexterm>add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_cv</secondary></indexterm>add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_pointer">
+ <title><link linkend="boost_typetraits.reference.add_pointer"><indexterm type="class_name"><primary>add_pointer</primary><secondary>add_pointer</secondary></indexterm><indexterm><primary>add_pointer</primary><secondary>add_pointer</secondary></indexterm> add_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>add_pointer</primary><secondary>add_pointer</secondary></indexterm><indexterm><primary>add_pointer</primary><secondary>add_pointer</secondary></indexterm>add_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>add_pointer</secondary></indexterm><indexterm><primary>add_pointer</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>add_pointer</secondary></indexterm><indexterm><primary>add_pointer</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ <para>
+ The rationale for this template is that it produces the same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">TYPEOF</phrase><phrase role="special">(&</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput>, where
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">t</phrase></computeroutput> is an object of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>add_pointer</primary><secondary>add_pointer</secondary></indexterm><indexterm><primary>add_pointer</primary><secondary>add_pointer</secondary></indexterm>add_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_pointer</secondary></indexterm>add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_pointer</secondary></indexterm>add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_pointer</secondary></indexterm>add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_pointer</secondary></indexterm>add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_reference">
+ <title><link linkend="boost_typetraits.reference.add_reference"><indexterm type="class_name"><primary>add_reference</primary><secondary>add_reference</secondary></indexterm><indexterm><primary>add_reference</primary><secondary>add_reference</secondary></indexterm> add_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>add_reference</primary><secondary>add_reference</secondary></indexterm><indexterm><primary>add_reference</primary><secondary>add_reference</secondary></indexterm>add_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is not a reference type then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">&</phrase></computeroutput>, otherwise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>add_reference</primary><secondary>add_reference</secondary></indexterm><indexterm><primary>add_reference</primary><secondary>add_reference</secondary></indexterm>add_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_reference</secondary></indexterm>add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_reference</secondary></indexterm>add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_reference</secondary></indexterm>add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_reference</secondary></indexterm>add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_volatile">
+ <title><link linkend="boost_typetraits.reference.add_volatile"><indexterm type="class_name"><primary>add_volatile</primary><secondary>add_volatile</secondary></indexterm><indexterm><primary>add_volatile</primary><secondary>add_volatile</secondary></indexterm> add_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>add_volatile</primary><secondary>add_volatile</secondary></indexterm><indexterm><primary>add_volatile</primary><secondary>add_volatile</secondary></indexterm>add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>add_volatile</primary><secondary>add_volatile</secondary></indexterm><indexterm><primary>add_volatile</primary><secondary>add_volatile</secondary></indexterm>add_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_volatile</secondary></indexterm>add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_volatile</secondary></indexterm>add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_volatile</secondary></indexterm>add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>add_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>add_volatile</secondary></indexterm>add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.aligned_storage">
+ <title><link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">aligned_storage</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with size
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Size</phrase></computeroutput> and an alignment that
+ is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">aligned_storage</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.alignment_of">
+ <title><link linkend="boost_typetraits.reference.alignment_of"><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm> alignment_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm>alignment_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phra
se> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template alignment<emphasis role="underline">of inherits from `</emphasis>_integral_constant<std::size_t,
+ ALIGNOF(T)><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">,</phrase> <phrase role="identifier">where</phrase>
+ </computeroutput>ALIGNOF(T)` is the alignment of type T.
+ </para>
+ <para>
+ <emphasis>Note: strictly speaking you should only rely on the value of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> 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.</emphasis>
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm>alignment_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm>alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm>alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>integral_constant</secondary></indexterm>integra
l_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">char</phrase><phrase role="special">)></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm>alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ with value <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm type="class_name"><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm><indexterm><primary>alignment_of</primary><secondary>alignment_of</secondary></indexterm>alignment_of</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.decay">
+ <title><link linkend="boost_typetraits.reference.decay"><indexterm type="class_name"><primary>decay</primary><secondary>decay</secondary></indexterm><indexterm><primary>decay</primary><secondary>decay</secondary></indexterm><indexterm type="class_name"><primary>decay</primary><secondary>decay</secondary></indexterm><indexterm><primary>decay</primary><secondary>decay</secondary></indexterm> decay</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>decay</primary><secondary>decay</secondary></indexterm><indexterm><primary>decay</primary><secondary>decay</secondary></indexterm><indexterm type="class_name"><primary>decay</primary><secondary>decay</secondary></indexterm><indexterm><primary>decay</primary><secondary>decay</secondary></indexterm>decay</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> Let <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ be the result of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>decay</secondary></indexterm><indexterm><primary>decay</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>decay</secondary></indexterm><indexterm><primary>decay</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>, then if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ is an array type, the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_extent</primary><secondary>decay</secondary></indexterm><indexterm><primary>decay</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>decay</secondary></indexterm><indexterm><primary>decay</primary><secondary>remove_extent</secondary></indexterm>remove_extent</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">>*</phrase></computeroutput>,
+ otherwise if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput> is a function
+ type then the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase><phrase role="special">*</phrase></computeroutput>, otherwise the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>decay</primary><secondary>decay</secondary></indexterm><indexterm><primary>decay</primary><secondary>decay</secondary></indexterm><indexterm type="class_name"><primary>decay</primary><secondary>decay</secondary></indexterm><indexterm><primary>decay</primary><secondary>decay</secondary></indexterm>decay</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>decay</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>decay</secondary></indexterm><indexterm type="class_name"><primary>decay</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>decay</secondary></indexterm>decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>decay</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>decay</secondary></indexterm><indexterm type="class_name"><primary>decay</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>decay</secondary></indexterm>decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">(&)[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>decay</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>decay</secondary></indexterm><indexterm type="class_name"><primary>decay</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>decay</secondary></indexterm>decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">(&)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.extent">
+ <title><link linkend="boost_typetraits.reference.extent"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm> extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>extent</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier"><indexterm type="class_name"><primar
y>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>
+ <emphasis role="bold">Inherits:</emphasis> Class template extent inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)></phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is the number of elements in the N'th array
+ dimention of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">N</phrase> <phrase role="special">></phrase>
+ <link linkend="boost_typetraits.reference.rank"><indexterm type="class_name"><primary>rank</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>rank</secondary></indexterm>rank</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>, or if the N'th array bound is incomplete,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special">
<</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>extent</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">],</phrase>
+ <phrase role="number">1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>4</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">],</phrase> <phrase role="number">1</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm type="class_name"><primary>extent</primary><secondary>extent</secondary></indexterm><indexterm><primary>extent</primary><secondary>extent</secondary></indexterm>extent</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.floating_point_promotion">
+ <title><link linkend="boost_typetraits.reference.floating_point_promotion"><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm>
+ floating_point_promotion</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm>floating_point_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If floating point promotion can be
+ applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies floating point promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm><primary>floating_point_promotion</primary><secondary>floating_point_promotion</secondary></indexterm>floating_point_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>floating_point_promotion</secondary></indexterm>floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>floating_point_promotion</secondary></indexterm>floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">float</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>floating_point_promotion</secondary></indexterm>floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.function_traits">
+ <title><link linkend="boost_typetraits.reference.function_traits"><indexterm type="class_name"><primary>function_traits</primary><secondary>function_traits</secondary></indexterm><indexterm><primary>function_traits</primary><secondary>function_traits</secondary></indexterm> function_traits</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">F</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>function_traits</secondary></indexterm><indexterm><primary>function_traits</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">arity</phrase> <phrase role="special">=</phrase> <replaceable>see-below</replaceable><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier"><indexterm type="typedef_name"><primary>result_type</primary><secondary>function_traits</secondary></indexterm><indexterm><primary>function_traits</primary><secondary>result_type</secondary></indexterm>result_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> arg<replaceable>N</replaceable>_type<phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para><indexterm type="class_name"><primary>function_traits</primary><secondary>function_traits</secondary></indexterm><indexterm><primary>function_traits</primary><secondary>function_traits</secondary></indexterm>
+ The class template function_traits will only compile if:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The compiler supports partial specialization of class templates.
+ </listitem>
+ <listitem>
+ The template argument <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>
+ is a <emphasis>function type</emphasis>, note that this <emphasis><emphasis role="bold">is not</emphasis></emphasis> the same thing as a <emphasis>pointer
+ to a function</emphasis>.
+ </listitem>
+ </itemizedlist>
+ <tip>
+ <para><indexterm type="class_name"><primary>function_traits</primary><secondary>function_traits</secondary></indexterm><indexterm><primary>function_traits</primary><secondary>function_traits</secondary></indexterm>
+ 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 <link linkend="boost_typetraits.reference.remove_pointer"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>function_traits</secondary></indexterm><indexterm><primary>function_traits</primary><secondary>remove_pointer</secondary></indexterm><indexterm type="class_name"><primary>remove_pointer</primary><secondary>function_traits</secondary></indexterm><indexterm><primary>function_traits</primary><secondary>remove_pointer</secondary></indexterm>remove_pointer</link>.
+ </para>
+ </tip>
+ <table frame="all"> <title>Function Traits Members</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Member
+ </para>
+ </entry><entry>
+ <para>
+ Description
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Function Traits Members</secondary></indexterm><indexterm><primary>Function Traits Members</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that gives the number of arguments
+ accepted by the function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Function Traits Members</secondary></indexterm><indexterm><primary>Function Traits Members</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase><phrase role="identifier"><indexterm type="typedef_name"><primary>result_type</primary><secondary>Function Traits Members</secondary></indexterm><indexterm><primary>Function Traits Members</primary><secondary>result_type</secondary></indexterm>result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type returned by function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Function Traits Members</secondary></indexterm><indexterm><primary>Function Traits Members</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase>arg<replaceable>N</replaceable>_type</computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The <replaceable>N</replaceable>th argument type of function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="number">1</phrase> <phrase role="special"><=</phrase>
+ <phrase role="identifier">N</phrase> <phrase role="special"><=</phrase>
+ <phrase role="identifier">arity</phrase></computeroutput> of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 0.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 1.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 4.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier"><indexterm type="typedef_name"><primary>result_type</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>result_type</secondary></indexterm>result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier"><indexterm type="typedef_name"><primary>result_type</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>result_type</secondary></indexterm>result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">long</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arg1_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arg4_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arg5_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: there is no <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">arg5_type</phrase></computeroutput>
+ since there are only four arguments.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>function_traits</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>function_traits</secondary></indexterm>function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: argument type is a <emphasis>function pointer</emphasis>,
+ and not a <emphasis>function type</emphasis>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_assign">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_assign"><indexterm type="class_name"><primary>has_nothrow_assign</primary><secondary>has_nothrow_assign</secondary></indexterm><indexterm><primary>has_nothrow_assign</primary><secondary>has_nothrow_assign</secondary></indexterm> has_nothrow_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_nothrow_assign</primary><secondary>has_nothrow_assign</secondary></indexterm><indexterm><primary>has_nothrow_assign</primary><secondary>has_nothrow_assign</secondary></indexterm>has_nothrow_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_nothrow_assign</secondary></indexterm><indexterm><primary>has_nothrow_assign</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_nothrow_assign</secondary></indexterm><indexterm><primary>has_nothrow_assign</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_nothrow_assign</secondary></indexterm><indexterm><primary>has_nothrow_assign</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_nothrow_assign</secondary></indexterm><indexterm><primary>has_nothrow_assign</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_nothrow_assign</primary><secondary>has_nothrow_assign</secondary></indexterm><indexterm><primary>has_nothrow_assign</primary><secondary>has_nothrow_assign</secondary></indexterm>has_nothrow_assign</phrase></computeroutput>
+ 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".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>has_nothrow_assign</primary><secondary>has_nothrow_assign</secondary></indexterm><indexterm><primary>has_nothrow_assign</primary><secondary>has_nothrow_assign</secondary></indexterm>has_nothrow_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_constructor">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_constructor"><indexterm type="class_name"><primary>has_nothrow_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm>
+ has_nothrow_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_nothrow_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm>has_nothrow_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>false_type</secondary></indexterm>false_type</link></replace
able> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_nothrow_default_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>has_nothrow_default_constructor</secondary></indexterm>has_nothrow_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>false_type</secondary></indexterm>fa
lse_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_nothrow_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm>has_nothrow_constructor</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>has_nothrow_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm><indexterm><primary>has_nothrow_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm>has_nothrow_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_copy">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_copy"><indexterm type="class_name"><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy</secondary></indexterm> has_nothrow_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy</secondary></indexterm>has_nothrow_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_nothrow_copy_constructor</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy_constructor</secondary></indexterm>has_nothrow_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special
">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy</secondary></indexterm>has_nothrow_copy</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy</secondary></indexterm><indexterm><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy</secondary></indexterm>has_nothrow_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_cp_cons"><indexterm type="class_name"><primary>has_nothrow_copy_constructor</primary><secondary>has_nothrow_copy_constructor</secondary></indexterm><indexterm><primary>has_nothrow_copy_constructor</primary><secondary>has_nothrow_copy_constructor</secondary></indexterm> has_nothrow_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_copy"><indexterm type="class_name"><primary>has_nothrow_copy</primary><secondary>has_nothrow_copy_constructor</secondary></indexterm><indexterm><primary>has_nothrow_copy_constructor</primary><secondary>has_nothrow_copy</secondary></indexterm>has_nothrow_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_no_throw_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_no_throw_def_cons"><indexterm type="class_name"><primary>has_nothrow_default_constructor</primary><secondary>has_nothrow_default_constructor</secondary></indexterm><indexterm><primary>has_nothrow_default_constructor</primary><secondary>has_nothrow_default_constructor</secondary></indexterm> has_nothrow_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_constructor"><indexterm type="class_name"><primary>has_nothrow_constructor</primary><secondary>has_nothrow_default_constructor</secondary></indexterm><indexterm><primary>has_nothrow_default_constructor</primary><secondary>has_nothrow_constructor</secondary></indexterm>has_nothrow_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_assign">
+ <title><link linkend="boost_typetraits.reference.has_trivial_assign"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm> has_trivial_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p11.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm><indexterm><primary>has_trivial_assign</primary><secondary>has_trivial_assign</secondary></indexterm>has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_constructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_constructor"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm>
+ has_trivial_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm>has_trivial_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>false_type</secondary></indexterm>false_type</link></replace
able> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_default_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>has_trivial_default_constructor</secondary></indexterm>has_trivial_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>false_type</secondary></indexterm>fa
lse_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ If a type has a trivial default-constructor then the constructor have no
+ effect: calls to the constructor can be safely omitted. Note that using meta-programming
+ to omit a call to a single trivial-constructor call is of no benefit whatsoever.
+ However, if loops and/or exception handling code can also be omitted, then
+ some benefit in terms of code size and speed can be obtained.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.1p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm>has_trivial_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm>has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm>has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm>has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm>has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm><indexterm><primary>has_trivial_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm>has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_copy">
+ <title><link linkend="boost_typetraits.reference.has_trivial_copy"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm> has_trivial_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm>has_trivial_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_copy_constructor</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>has_trivial_copy_constructor</secondary></indexterm>has_trivial_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special
">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm>has_trivial_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm>has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm>has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm>has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm>has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm><indexterm><primary>has_trivial_copy</primary><secondary>has_trivial_copy</secondary></indexterm>has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_cp_cons"><indexterm type="class_name"><primary>has_trivial_copy_constructor</primary><secondary>has_trivial_copy_constructor</secondary></indexterm><indexterm><primary>has_trivial_copy_constructor</primary><secondary>has_trivial_copy_constructor</secondary></indexterm> has_trivial_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_copy"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>has_trivial_copy_constructor</secondary></indexterm><indexterm><primary>has_trivial_copy_constructor</primary><secondary>has_trivial_copy</secondary></indexterm>has_trivial_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_def_cons"><indexterm type="class_name"><primary>has_trivial_default_constructor</primary><secondary>has_trivial_default_constructor</secondary></indexterm><indexterm><primary>has_trivial_default_constructor</primary><secondary>has_trivial_default_constructor</secondary></indexterm> has_trivial_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_constructor"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>has_trivial_default_constructor</secondary></indexterm><indexterm><primary>has_trivial_default_constructor</primary><secondary>has_trivial_constructor</secondary></indexterm>has_trivial_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_destructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_destructor"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm> has_trivial_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm>has_trivial_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <ph
rase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ If a type has a trivial destructor then the destructor has no effect: calls
+ to the destructor can be safely omitted. Note that using meta-programming
+ to omit a call to a single trivial-constructor call is of no benefit whatsoever.
+ However, if loops and/or exception handling code can also be omitted, then
+ some benefit in terms of code size and speed can be obtained.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4p3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm>has_trivial_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm>has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm>has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm>has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm>has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm><indexterm><primary>has_trivial_destructor</primary><secondary>has_trivial_destructor</secondary></indexterm>has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_virtual_destructor">
+ <title><link linkend="boost_typetraits.reference.has_virtual_destructor"><indexterm type="class_name"><primary>has_virtual_destructor</primary><secondary>has_virtual_destructor</secondary></indexterm><indexterm><primary>has_virtual_destructor</primary><secondary>has_virtual_destructor</secondary></indexterm> has_virtual_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>has_virtual_destructor</primary><secondary>has_virtual_destructor</secondary></indexterm><indexterm><primary>has_virtual_destructor</primary><secondary>has_virtual_destructor</secondary></indexterm>has_virtual_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_virtual_destructor</secondary></indexterm><indexterm><primary>has_virtual_destructor</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_virtual_destructor</secondary></indexterm><indexterm><primary>has_virtual_destructor</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <ph
rase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a virtual destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>has_virtual_destructor</secondary></indexterm><indexterm><primary>has_virtual_destructor</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_virtual_destructor</secondary></indexterm><indexterm><primary>has_virtual_destructor</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>has_virtual_destructor</secondary></indexterm><indexterm><primary>has_virtual_destructor</primary><secondary>false_type</secondary></indexterm>false_type</link>,
+ and has to be explicitly specialized for types with virtual destructors unless
+ the compiler used has compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ that enable the trait to do the right thing: currently (May 2005) only Visual
+ C++ 8 and GCC-4.3 have the necessary <link linkend="boost_typetraits.intrinsics">intrinsics</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>has_virtual_destructor</primary><secondary>has_virtual_destructor</secondary></indexterm><indexterm><primary>has_virtual_destructor</primary><secondary>has_virtual_destructor</secondary></indexterm>has_virtual_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_constant">
+ <title><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm> integral_constant</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">val</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm>integral_constant</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm>integral_constant</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">></phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">typedef</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm>integral_constant</phrase><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">true</phrase><phrase role="special">></phrase> <phrase role="identifier"><indexterm type="typedef_name"><primary>true_type</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>true_type</secondary></indexterm>true_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm>integral_constant</phrase><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">false</phrase><phrase role="special">></phrase> <phrase role="identifier"><indexterm type="typedef_name"><primary>false_type</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>false_type</secondary></indexterm>false_type</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ Class template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>integral_constant</secondary></indexterm>integral_constant</phrase></computeroutput>
+ is the common base class for all the value-based type traits. The two typedef's
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="typedef_name"><primary>true_type</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>true_type</secondary></indexterm>true_type</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="typedef_name"><primary>false_type</primary><secondary>integral_constant</secondary></indexterm><indexterm><primary>integral_constant</primary><secondary>false_type</secondary></indexterm>false_type</phrase></computeroutput> are provided for convenience:
+ most of the value traits are Boolean properties and so will inherit from
+ one of these.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_promotion">
+ <title><link linkend="boost_typetraits.reference.integral_promotion"><indexterm type="class_name"><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm><indexterm><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm><indexterm type="class_name"><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm><indexterm><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm> integral_promotion</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm><indexterm><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm><indexterm type="class_name"><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm><indexterm><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm>integral_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral promotion can be applied
+ to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>, then
+ applies integral promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field).
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm><indexterm><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm><indexterm type="class_name"><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm><indexterm><primary>integral_promotion</primary><secondary>integral_promotion</secondary></indexterm>integral_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>integral_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>integral_promotion</secondary></indexterm><indexterm type="class_name"><primary>integral_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>integral_promotion</secondary></indexterm>integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>integral_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>integral_promotion</secondary></indexterm><indexterm type="class_name"><primary>integral_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>integral_promotion</secondary></indexterm>integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>integral_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>integral_promotion</secondary></indexterm><indexterm type="class_name"><primary>integral_promotion</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>integral_promotion</secondary></indexterm>integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">enum</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">float_round_style</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.is_abstract">
+ <title><link linkend="boost_typetraits.reference.is_abstract"><indexterm type="class_name"><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm> is_abstract</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm>is_abstract</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ abstract type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm>is_abstract</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.is_polymorphic"><indexterm type="class_name"><primary>is_polymorphic</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>is_polymorphic</secondary></indexterm>is_polymorphic</link>;
+ 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
+ this in their own code if the "safe fallback" is not suitable for
+ their particular use-case.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">abc</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">abc</phrase><phrase role="special">()</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm>is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm>is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm>is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm><indexterm><primary>is_abstract</primary><secondary>is_abstract</secondary></indexterm>is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_arithmetic">
+ <title><link linkend="boost_typetraits.reference.is_arithmetic"><indexterm type="class_name"><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm> is_arithmetic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm>is_arithmetic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ arithmetic type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ Arithmetic types include integral and floating point types (see also <link linkend="boost_typetraits.reference.is_integral"><indexterm type="class_name"><primary>is_integral</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>is_integral</secondary></indexterm>is_integral</link> and
+ <link linkend="boost_typetraits.reference.is_floating_point"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>is_floating_point</secondary></indexterm>is_floating_point</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm>is_arithmetic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm>is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm>is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm>is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm><indexterm><primary>is_arithmetic</primary><secondary>is_arithmetic</secondary></indexterm>is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_array">
+ <title><link linkend="boost_typetraits.reference.is_array"><indexterm type="class_name"><primary>is_array</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>is_array</secondary></indexterm> is_array</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_array</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>is_array</secondary></indexterm>is_array</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ array type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_array</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>is_array</secondary></indexterm>is_array</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can give the wrong result with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_array</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>is_array</secondary></indexterm>is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_array</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>is_array</secondary></indexterm>is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_array</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>is_array</secondary></indexterm>is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_array</primary><secondary>is_array</secondary></indexterm><indexterm><primary>is_array</primary><secondary>is_array</secondary></indexterm>is_array</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_base_of">
+ <title><link linkend="boost_typetraits.reference.is_base_of"><indexterm type="class_name"><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm> is_base_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm>is_base_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If Base is base class of type
+ Derived or if both types are the same then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ This template will detect non-public base classes, and ambiguous base classes.
+ </para>
+ <para>
+ Note that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm>is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">X</phrase><phrase role="special">,</phrase><phrase role="identifier">X</phrase><phrase role="special">></phrase></computeroutput> will always inherit from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>true_type</secondary></indexterm>true_type</link>.
+ <emphasis role="bold">This is the case even if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">X</phrase></computeroutput>
+ is not a class type</emphasis>. This is a change in behaviour from Boost-1.33
+ in order to track the Technical Report on C++ Library Extensions.
+ </para>
+ <para>
+ Types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput> must not be incomplete types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm>is_base_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput>
+ is a private base class of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> is an ambiguous
+ base of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>. These compilers
+ include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and
+ older versions of EDG based compilers.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase> <phrase role="special">:</phrase>
+ <phrase role="keyword">public</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm>is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm>is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm>is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm>is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm>is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Base</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>: a class is regarded as it's
+ own base.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm><indexterm><primary>is_base_of</primary><secondary>is_base_of</secondary></indexterm>is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_class">
+ <title><link linkend="boost_typetraits.reference.is_class"><indexterm type="class_name"><primary>is_class</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>is_class</secondary></indexterm> is_class</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_class</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>is_class</secondary></indexterm>is_class</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ class type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_class</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>is_class</secondary></indexterm>is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para><indexterm type="class_name"><primary>is_class</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>is_class</secondary></indexterm>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>true_type</secondary></indexterm>true_type</link> for
+ union types. See also <link linkend="boost_typetraits.reference.is_union"><indexterm type="class_name"><primary>is_union</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>is_union</secondary></indexterm>is_union</link>.
+ Currently (May 2005) only Visual C++ 8 has the necessary compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to correctly identify union types, and therefore make is_class function correctly.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">MyClass</phrase><phrase role="special">;</phrase></computeroutput> then:
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_class</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>is_class</secondary></indexterm>is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_class</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>is_class</secondary></indexterm>is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_class</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>is_class</secondary></indexterm>is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_class</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>is_class</secondary></indexterm>is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_class</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>is_class</secondary></indexterm>is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_class</primary><secondary>is_class</secondary></indexterm><indexterm><primary>is_class</primary><secondary>is_class</secondary></indexterm>is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_complex">
+ <title><link linkend="boost_typetraits.reference.is_complex"><indexterm type="class_name"><primary>is_complex</primary><secondary>is_complex</secondary></indexterm><indexterm><primary>is_complex</primary><secondary>is_complex</secondary></indexterm> is_complex</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_complex</primary><secondary>is_complex</secondary></indexterm><indexterm><primary>is_complex</primary><secondary>is_complex</secondary></indexterm>is_complex</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_complex</secondary></indexterm><indexterm><primary>is_complex</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_complex</secondary></indexterm><indexterm><primary>is_complex</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is a complex number type then true (of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">complex</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">></phrase></computeroutput>
+ for some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>), otherwise
+ false.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 26.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_complex</primary><secondary>is_complex</secondary></indexterm><indexterm><primary>is_complex</primary><secondary>is_complex</secondary></indexterm>is_complex</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_compound">
+ <title><link linkend="boost_typetraits.reference.is_compound"><indexterm type="class_name"><primary>is_compound</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>is_compound</secondary></indexterm> is_compound</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_compound</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>is_compound</secondary></indexterm>is_compound</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ compound type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ Any type that is not a fundamental type is a compound type (see also <link linkend="boost_typetraits.reference.is_fundamental"><indexterm type="class_name"><primary>is_fundamental</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>is_fundamental</secondary></indexterm>is_fundamental</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_compound</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>is_compound</secondary></indexterm>is_compound</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_compound</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>is_compound</secondary></indexterm>is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_compound</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>is_compound</secondary></indexterm>is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">MyEnum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_compound</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>is_compound</secondary></indexterm>is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_compound</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>is_compound</secondary></indexterm>is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_compound</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>is_compound</secondary></indexterm>is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_compound</primary><secondary>is_compound</secondary></indexterm><indexterm><primary>is_compound</primary><secondary>is_compound</secondary></indexterm>is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_const">
+ <title><link linkend="boost_typetraits.reference.is_const"><indexterm type="class_name"><primary>is_const</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>is_const</secondary></indexterm> is_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_const</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>is_const</secondary></indexterm>is_const</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) const-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_const</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>is_const</secondary></indexterm>is_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_const</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>is_const</secondary></indexterm>is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_const</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>is_const</secondary></indexterm>is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_const</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>is_const</secondary></indexterm>is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_const</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>is_const</secondary></indexterm>is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_const</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>is_const</secondary></indexterm>is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_const</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>is_const</secondary></indexterm>is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_const</primary><secondary>is_const</secondary></indexterm><indexterm><primary>is_const</primary><secondary>is_const</secondary></indexterm>is_const</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_convertible">
+ <title><link linkend="boost_typetraits.reference.is_convertible"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm> is_convertible</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If an imaginary lvalue of type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> is convertible to type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput> then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ Type From must not be an incomplete type.
+ </para>
+ <para>
+ Type To must not be an incomplete, or function type.
+ </para>
+ <para>
+ No types are considered to be convertible to array types or abstract-class
+ types.
+ </para>
+ <para>
+ This template can not detect whether a converting-constructor is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput> or not: if type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">private</phrase></computeroutput> converting constructor
+ from type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> then instantiating
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase></computeroutput>
+ will produce a compiler error. For this reason <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase></computeroutput>
+ can not be used to determine whether a type has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput>
+ copy-constructor or not.
+ </para>
+ <para>
+ This template will also produce compiler errors if the conversion is ambiguous,
+ for example:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">B</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">C</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">D</phrase> <phrase role="special">:</phrase> <phrase role="identifier">B</phrase><phrase role="special">,</phrase> <phrase role="identifier">C</phrase> <phrase role="special">{};</phrase>
+<phrase role="comment">// This produces a compiler error, the conversion is ambiguous:
+</phrase><phrase role="keyword">bool</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">y</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">D</phrase><phrase role="special">*,</phrase><phrase role="identifier">A</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4 and 8.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_abstract"><indexterm type="class_name"><primary>is_abstract</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_abstract</secondary></indexterm>is_abstract</link></computeroutput>,
+ then the template parameter <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ must not be an abstract type.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the conversion would require a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const_cast</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&,</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm><indexterm><primary>is_convertible</primary><secondary>is_convertible</secondary></indexterm>is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_empty">
+ <title><link linkend="boost_typetraits.reference.is_empty"><indexterm type="class_name"><primary>is_empty</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>is_empty</secondary></indexterm> is_empty</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_empty</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>is_empty</secondary></indexterm>is_empty</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an empty class type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10p5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_empty</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>is_empty</secondary></indexterm>is_empty</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> In order to correctly
+ detect empty classes this trait relies on either:
+ </para>
+ <itemizedlist>
+ <listitem>
+ the compiler implementing zero sized empty base classes, or
+ </listitem>
+ <listitem>
+ the compiler providing <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect empty classes.
+ </listitem>
+ </itemizedlist>
+ <para>
+ Can not be used with incomplete types.
+ </para>
+ <para><indexterm type="class_name"><primary>is_union</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>is_union</secondary></indexterm>
+ Can not be used with union types, until is_union can be made to work.
+ </para>
+ <para>
+ If the compiler does not support partial-specialization of class templates,
+ then this template can not be used with abstract types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">empty_class</phrase>
+ <phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_empty</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>is_empty</secondary></indexterm>is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_empty</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>is_empty</secondary></indexterm>is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_empty</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>is_empty</secondary></indexterm>is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_empty</primary><secondary>is_empty</secondary></indexterm><indexterm><primary>is_empty</primary><secondary>is_empty</secondary></indexterm>is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_enum">
+ <title><link linkend="boost_typetraits.reference.is_enum"><indexterm type="class_name"><primary>is_enum</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>is_enum</secondary></indexterm> is_enum</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_enum</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>is_enum</secondary></indexterm>is_enum</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ enum type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_enum</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>is_enum</secondary></indexterm>is_enum</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para><indexterm type="class_name"><primary>is_enum</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>is_enum</secondary></indexterm>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> Requires a correctly
+ functioning <link linkend="boost_typetraits.reference.is_convertible"><indexterm type="class_name"><primary>is_convertible</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>is_convertible</secondary></indexterm>is_convertible</link>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">enum</phrase> <phrase role="identifier">my_enum</phrase>
+ <phrase role="special">{</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_enum</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>is_enum</secondary></indexterm>is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_enum</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>is_enum</secondary></indexterm>is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_enum</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>is_enum</secondary></indexterm>is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_enum</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>is_enum</secondary></indexterm>is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_enum</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>is_enum</secondary></indexterm>is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_enum</primary><secondary>is_enum</secondary></indexterm><indexterm><primary>is_enum</primary><secondary>is_enum</secondary></indexterm>is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_floating_point">
+ <title><link linkend="boost_typetraits.reference.is_floating_point"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm> is_floating_point</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm>is_floating_point</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ floating point type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm>is_floating_point</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm>is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm>is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm>is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm><indexterm><primary>is_floating_point</primary><secondary>is_floating_point</secondary></indexterm>is_floating_point</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_function">
+ <title><link linkend="boost_typetraits.reference.is_function"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_function</secondary></indexterm> is_function</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_function</secondary></indexterm>is_function</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ function type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ Note that this template does not detect <emphasis>pointers to functions</emphasis>,
+ or <emphasis>references to functions</emphasis>, these are detected by <link linkend="boost_typetraits.reference.is_pointer"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_pointer</secondary></indexterm>is_pointer</link> and <link linkend="boost_typetraits.reference.is_reference"><indexterm type="class_name"><primary>is_reference</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_reference</secondary></indexterm>is_reference</link> respectively:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">f1</phrase><phrase role="special">();</phrase> <phrase role="comment">// f1 is of function type.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f2</phrase><phrase role="special">*)();</phrase> <phrase role="comment">// f2 is a pointer to a function.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f3</phrase><phrase role="special">&)();</phrase> <phrase role="comment">// f3 is a reference to a function.
+</phrase></programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p1 and 8.3.5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_function</secondary></indexterm>is_function</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_function</secondary></indexterm>is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_function</secondary></indexterm>is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_function</secondary></indexterm>is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_function</secondary></indexterm>is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer type, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_function</secondary></indexterm>is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(&)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a reference to a function, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_function</secondary></indexterm>is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer to a member function.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_function</secondary></indexterm>is_function</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <tip>
+ <para>
+ Don't confuse function-types with pointers to functions:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="identifier">f</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">);</phrase></computeroutput>
+ </para>
+ <para>
+ defines a function type,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase> <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a prototype for a function of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase></computeroutput>,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">*</phrase>
+ <phrase role="identifier">pf</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">&</phrase>
+ <phrase role="identifier">fr</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a pointer and a reference to the function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">foo</phrase></computeroutput>.
+ </para>
+ <para>
+ If you want to detect whether some type is a pointer-to-function then use:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_function"><indexterm type="class_name"><primary>is_function</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_function</secondary></indexterm>is_function</link><phrase role="special"><</phrase><link linkend="boost_typetraits.reference.remove_pointer"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>remove_pointer</secondary></indexterm><indexterm type="class_name"><primary>remove_pointer</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>remove_pointer</secondary></indexterm>remove_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>:
:</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <link linkend="boost_typetraits.reference.is_pointer"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_pointer</secondary></indexterm>is_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ </para>
+ <para>
+ or for pointers to member functions you can just use <link linkend="boost_typetraits.reference.is_member_function_pointer"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>is_function</secondary></indexterm><indexterm><primary>is_function</primary><secondary>is_member_function_pointer</secondary></indexterm>is_member_function_pointer</link>
+ directly.
+ </para>
+ </tip>
+ </section>
+ <section id="boost_typetraits.reference.is_fundamental">
+ <title><link linkend="boost_typetraits.reference.is_fundamental"><indexterm type="class_name"><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm> is_fundamental</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm>is_fundamental</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ fundamental type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ Fundamental types include integral, floating point and void types (see also
+ <link linkend="boost_typetraits.reference.is_integral"><indexterm type="class_name"><primary>is_integral</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>is_integral</secondary></indexterm>is_integral</link>,
+ <link linkend="boost_typetraits.reference.is_floating_point"><indexterm type="class_name"><primary>is_floating_point</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>is_floating_point</secondary></indexterm>is_floating_point</link>
+ and <link linkend="boost_typetraits.reference.is_void"><indexterm type="class_name"><primary>is_void</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>is_void</secondary></indexterm>is_void</link>)
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm>is_fundamental</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm>is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm>is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm>is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm><indexterm><primary>is_fundamental</primary><secondary>is_fundamental</secondary></indexterm>is_fundamental</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_integral">
+ <title><link linkend="boost_typetraits.reference.is_integral"><indexterm type="class_name"><primary>is_integral</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>is_integral</secondary></indexterm> is_integral</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_integral</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>is_integral</secondary></indexterm>is_integral</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ integral type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p7.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_integral</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>is_integral</secondary></indexterm>is_integral</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_integral</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>is_integral</secondary></indexterm>is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_integral</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>is_integral</secondary></indexterm>is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_integral</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>is_integral</secondary></indexterm>is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_integral</primary><secondary>is_integral</secondary></indexterm><indexterm><primary>is_integral</primary><secondary>is_integral</secondary></indexterm>is_integral</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_function_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_function_pointer"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm>
+ is_member_function_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm>is_member_function_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>false_type</secondary></indexterm
>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member function then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm>is_member_function_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm>is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>true_type</secondary></indexterm>true_type
</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm>is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm>is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm>is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a data member and not a member
+ function, see <link linkend="boost_typetraits.reference.is_member_object_pointer"><indexterm type="class_name"><primary>is_member_object_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm>is_member_object_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer"><indexterm type="class_name"><primary>is_member_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>is_member_pointer</secondary></indexterm>is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm><indexterm><primary>is_member_function_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm>is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_object_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_object_pointer"><indexterm type="class_name"><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm>
+ is_member_object_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm>is_member_object_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>false_type</secondary></indexterm>false_type</link>
</replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member object (a data member) then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm>is_member_object_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm>is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm>is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm>is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm>is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a member function and not a
+ member object, see <link linkend="boost_typetraits.reference.is_member_function_pointer"><indexterm type="class_name"><primary>is_member_function_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>is_member_function_pointer</secondary></indexterm>is_member_function_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer"><indexterm type="class_name"><primary>is_member_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>is_member_pointer</secondary></indexterm>is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm><indexterm><primary>is_member_object_pointer</primary><secondary>is_member_object_pointer</secondary></indexterm>is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_pointer"><indexterm type="class_name"><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm> is_member_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm>is_member_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member (either a function or a data member) then inherits from
+ <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm>is_member_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm>is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm>is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>
.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm>is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm><indexterm><primary>is_member_pointer</primary><secondary>is_member_pointer</secondary></indexterm>is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_object">
+ <title><link linkend="boost_typetraits.reference.is_object"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>is_object</secondary></indexterm> is_object</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>is_object</secondary></indexterm>is_object</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ object type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ All types are object types except references, void, and function types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>is_object</secondary></indexterm>is_object</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>is_object</secondary></indexterm>is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>is_object</secondary></indexterm>is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>is_object</secondary></indexterm>is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>is_object</secondary></indexterm>is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>is_object</secondary></indexterm>is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: reference types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>is_object</secondary></indexterm>is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: function types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>is_object</secondary></indexterm>is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ void is not an object type
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_object</primary><secondary>is_object</secondary></indexterm><indexterm><primary>is_object</primary><secondary>is_object</secondary></indexterm>is_object</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pod">
+ <title><link linkend="boost_typetraits.reference.is_pod"><indexterm type="class_name"><primary>is_pod</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>is_pod</secondary></indexterm> is_pod</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_pod</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>is_pod</secondary></indexterm>is_pod</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ POD type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ POD stands for "Plain old data". Arithmetic types, and enumeration
+ types, a pointers and pointer to members are all PODs. Classes and unions
+ can also be POD's if they have no non-static data members that are of reference
+ or non-POD type, no user defined constructors, no user defined assignment
+ operators, no private or protected non-static data members, no virtual functions
+ and no base classes. Finally, a cv-qualified POD is still a POD, as is an
+ array of PODs.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10 and 9p4 (Note
+ that POD's are also aggregates, see 8.5.1).
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, is<emphasis role="underline">pod
+ will never report that a class or struct is a POD; this is always safe, if
+ possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have
+ the necessary compiler-</emphasis>_intrinsics.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_pod</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>is_pod</secondary></indexterm>is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pod</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>is_pod</secondary></indexterm>is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pod</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>is_pod</secondary></indexterm>is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pod</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>is_pod</secondary></indexterm>is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pod</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>is_pod</secondary></indexterm>is_pod</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pod</primary><secondary>is_pod</secondary></indexterm><indexterm><primary>is_pod</primary><secondary>is_pod</secondary></indexterm>is_pod</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pointer">
+ <title><link linkend="boost_typetraits.reference.is_pointer"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm> is_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm>is_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer type (includes function pointers, but excludes pointers to members)
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p2 and 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm>is_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm>is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm>is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm>is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm>is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm>is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm>is_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <important>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm>is_pointer</phrase></computeroutput> detects "real"
+ pointer types only, and <emphasis>not</emphasis> smart pointers. Users
+ should not specialise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm><indexterm><primary>is_pointer</primary><secondary>is_pointer</secondary></indexterm>is_pointer</phrase></computeroutput>
+ 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
+ general to auto-magically detect smart pointer types, so such a trait would
+ have to be partially specialised for each supported smart pointer type.
+ </para>
+ </important>
+ </section>
+ <section id="boost_typetraits.reference.is_polymorphic">
+ <title><link linkend="boost_typetraits.reference.is_polymorphic"><indexterm type="class_name"><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm> is_polymorphic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm>is_polymorphic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ polymorphic type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> The implementation
+ requires some knowledge of the compilers ABI, it does actually seem to work
+ with the majority of compilers though.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm>is_polymorphic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">poly</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">poly</phrase><phrase role="special">();</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm>is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm>is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm>is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm><indexterm><primary>is_polymorphic</primary><secondary>is_polymorphic</secondary></indexterm>is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_same">
+ <title><link linkend="boost_typetraits.reference.is_same"><indexterm type="class_name"><primary>is_same</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>is_same</secondary></indexterm> is_same</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>is_same</secondary></indexterm>is_same</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T and U are the same types
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with abstract, incomplete or function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_same</primary><secondary>is_same</secondary></indexterm><indexterm><primary>is_same</primary><secondary>is_same</secondary></indexterm>is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_scalar">
+ <title><link linkend="boost_typetraits.reference.is_scalar"><indexterm type="class_name"><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm> is_scalar</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm>is_scalar</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ scalar type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ Scalar types include integral, floating point, enumeration, pointer, and
+ pointer-to-member types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm>is_scalar</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm>is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm>is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm>is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm>is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm>is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm>is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm><indexterm><primary>is_scalar</primary><secondary>is_scalar</secondary></indexterm>is_scalar</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_signed">
+ <title><link linkend="boost_typetraits.reference.is_signed"><indexterm type="class_name"><primary>is_signed</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>is_signed</secondary></indexterm> is_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_signed</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>is_signed</secondary></indexterm>is_signed</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an signed integer type
+ or an enumerated type with an underlying signed integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_signed</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>is_signed</secondary></indexterm>is_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_signed</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>is_signed</secondary></indexterm>is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_signed</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>is_signed</secondary></indexterm>is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_signed</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>is_signed</secondary></indexterm>is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_signed</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>is_signed</secondary></indexterm>is_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">myclass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_signed</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>is_signed</secondary></indexterm>is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_signed</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>is_signed</secondary></indexterm>is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_signed</primary><secondary>is_signed</secondary></indexterm><indexterm><primary>is_signed</primary><secondary>is_signed</secondary></indexterm>is_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_stateless">
+ <title><link linkend="boost_typetraits.reference.is_stateless"><indexterm type="class_name"><primary>is_stateless</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>is_stateless</secondary></indexterm> is_stateless</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_stateless</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>is_stateless</secondary></indexterm>is_stateless</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Ff T is a stateless type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ Type T must be a complete type.
+ </para>
+ <para>
+ A stateless type is a type that has no storage and whose constructors and
+ destructors are trivial. That means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_stateless</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>is_stateless</secondary></indexterm>is_stateless</phrase></computeroutput>
+ only inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>true_type</secondary></indexterm>true_type</link>
+ if the following expression is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">true</phrase></computeroutput>:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_constructor</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>has_trivial_constructor</secondary></indexterm>has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_copy</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>has_trivial_copy</secondary></indexterm>has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier"><indexterm type="class_name"><primary>has_trivial_destructor</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>has_trivial_destructor</secondary></indexterm>has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_class</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>is_class</secondary></indexterm>is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_empty</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>is_empty</secondary></indexterm>is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_stateless</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>is_stateless</secondary></indexterm>is_stateless</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para><indexterm type="class_name"><primary>is_stateless</primary><secondary>is_stateless</secondary></indexterm><indexterm><primary>is_stateless</primary><secondary>is_stateless</secondary></indexterm>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this template work automatically.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_reference">
+ <title><link linkend="boost_typetraits.reference.is_reference"><indexterm type="class_name"><primary>is_reference</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>is_reference</secondary></indexterm> is_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_reference</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>is_reference</secondary></indexterm>is_reference</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a reference pointer type
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_reference</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>is_reference</secondary></indexterm>is_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_reference</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>is_reference</secondary></indexterm>is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_reference</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>is_reference</secondary></indexterm>is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_reference</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>is_reference</secondary></indexterm>is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(&)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis> (the argument in this case
+ is a reference to a function).
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_reference</primary><secondary>is_reference</secondary></indexterm><indexterm><primary>is_reference</primary><secondary>is_reference</secondary></indexterm>is_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_union">
+ <title><link linkend="boost_typetraits.reference.is_union"><indexterm type="class_name"><primary>is_union</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>is_union</secondary></indexterm> is_union</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_union</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>is_union</secondary></indexterm>is_union</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ union type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ Currently requires some kind of compiler support, otherwise unions are identified
+ as classes.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this trait "just work" without user intervention.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_union</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>is_union</secondary></indexterm>is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_union</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>is_union</secondary></indexterm>is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_union</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>is_union</secondary></indexterm>is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_union</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>is_union</secondary></indexterm>is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_union</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>is_union</secondary></indexterm>is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_union</primary><secondary>is_union</secondary></indexterm><indexterm><primary>is_union</primary><secondary>is_union</secondary></indexterm>is_union</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_unsigned">
+ <title><link linkend="boost_typetraits.reference.is_unsigned"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm> is_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm>is_unsigned</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an unsigned integer type
+ or an enumerated type with an underlying unsigned integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm>is_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm>is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm>is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm>is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm>is_unsigned</phrase><phrase role="special"><</phrase><phrase role="identifier">myclass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm>is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm>is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm><indexterm><primary>is_unsigned</primary><secondary>is_unsigned</secondary></indexterm>is_unsigned</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_void">
+ <title><link linkend="boost_typetraits.reference.is_void"><indexterm type="class_name"><primary>is_void</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>is_void</secondary></indexterm> is_void</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_void</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>is_void</secondary></indexterm>is_void</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ void type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_void</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>is_void</secondary></indexterm>is_void</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_void</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>is_void</secondary></indexterm>is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_void</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>is_void</secondary></indexterm>is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_void</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>is_void</secondary></indexterm>is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_void</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>is_void</secondary></indexterm>is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_void</primary><secondary>is_void</secondary></indexterm><indexterm><primary>is_void</primary><secondary>is_void</secondary></indexterm>is_void</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_volatile">
+ <title><link linkend="boost_typetraits.reference.is_volatile"><indexterm type="class_name"><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm> is_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm>is_volatile</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>true_type</secondary></indexterm>true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>false_type</secondary></indexterm>false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) volatile-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>true_type</secondary></indexterm>true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>false_type</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>false_type</secondary></indexterm>false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm>is_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm>is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">volatile</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm>is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase>
+ <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="typedef_name"><primary>true_type</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>true_type</secondary></indexterm>true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm>is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm>is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the volatile qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm><indexterm><primary>is_volatile</primary><secondary>is_volatile</secondary></indexterm>is_volatile</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.make_signed">
+ <title><link linkend="boost_typetraits.reference.make_signed"><indexterm type="class_name"><primary>make_signed</primary><secondary>make_signed</secondary></indexterm><indexterm><primary>make_signed</primary><secondary>make_signed</secondary></indexterm> make_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>make_signed</secondary></indexterm><indexterm><primary>make_signed</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>make_signed</secondary></indexterm><indexterm><primary>make_signed</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.make_unsigned">
+ <title><link linkend="boost_typetraits.reference.make_unsigned"><indexterm type="class_name"><primary>make_unsigned</primary><secondary>make_unsigned</secondary></indexterm><indexterm><primary>make_unsigned</primary><secondary>make_unsigned</secondary></indexterm> make_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>make_unsigned</primary><secondary>make_unsigned</secondary></indexterm><indexterm><primary>make_unsigned</primary><secondary>make_unsigned</secondary></indexterm>make_unsigned</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>make_unsigned</primary><secondary>make_unsigned</secondary></indexterm><indexterm><primary>make_unsigned</primary><secondary>make_unsigned</secondary></indexterm>make_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>make_signed</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>make_signed</secondary></indexterm>make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.promote">
+ <title><link linkend="boost_typetraits.reference.promote"><indexterm type="class_name"><primary>promote</primary><secondary>promote</secondary></indexterm><indexterm><primary>promote</primary><secondary>promote</secondary></indexterm> promote</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>promote</primary><secondary>promote</secondary></indexterm><indexterm><primary>promote</primary><secondary>promote</secondary></indexterm>promote</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral or floating point promotion
+ can be applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies integral and floating point promotions to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ See also <link linkend="boost_typetraits.reference.integral_promotion"><indexterm type="class_name"><primary>integral_promotion</primary><secondary>promote</secondary></indexterm><indexterm><primary>promote</primary><secondary>integral_promotion</secondary></indexterm><indexterm type="class_name"><primary>integral_promotion</primary><secondary>promote</secondary></indexterm><indexterm><primary>promote</primary><secondary>integral_promotion</secondary></indexterm>integral_promotion</link>
+ and <link linkend="boost_typetraits.reference.floating_point_promotion"><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>promote</secondary></indexterm><indexterm><primary>promote</primary><secondary>floating_point_promotion</secondary></indexterm><indexterm type="class_name"><primary>floating_point_promotion</primary><secondary>promote</secondary></indexterm><indexterm><primary>promote</primary><secondary>floating_point_promotion</secondary></indexterm>floating_point_promotion</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field) and 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>promote</primary><secondary>promote</secondary></indexterm><indexterm><primary>promote</primary><secondary>promote</secondary></indexterm>promote</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>promote</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>promote</secondary></indexterm>promote</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>promote</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>promote</secondary></indexterm>promote</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>promote</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>promote</secondary></indexterm>promote</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.rank">
+ <title><link linkend="boost_typetraits.reference.rank"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm> rank</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>rank</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>RANK</phrase><phrase role="special">(</phrase><phrase role
="identifier">T</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>
+ <emphasis role="bold">Inherits:</emphasis> Class template rank inherits from
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)></phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is the
+ number of array dimensions in type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>rank</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[]></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>rank</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant"><indexterm type="class_name"><primary>integral_constant</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>integral_constant</secondary></indexterm>integral_constant</link><phrase role="special"><</phrase
><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>1</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>rank</primary><secondary>rank</secondary></indexterm><indexterm><primary>rank</primary><secondary>rank</secondary></indexterm>rank</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.remove_all_extents">
+ <title><link linkend="boost_typetraits.reference.remove_all_extents"><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm><indexterm><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm><indexterm><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm> remove_all_extents</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm><indexterm><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm><indexterm><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm>remove_all_extents</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes all of the array bounds on <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm><indexterm><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm><indexterm><primary>remove_all_extents</primary><secondary>remove_all_extents</secondary></indexterm>remove_all_extents</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_all_extents</secondary></indexterm><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_all_extents</secondary></indexterm>remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_all_extents</secondary></indexterm><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_all_extents</secondary></indexterm>remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_all_extents</secondary></indexterm><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_all_extents</secondary></indexterm>remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_all_extents</secondary></indexterm><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_all_extents</secondary></indexterm>remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_all_extents</secondary></indexterm><indexterm type="class_name"><primary>remove_all_extents</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_all_extents</secondary></indexterm>remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_const">
+ <title><link linkend="boost_typetraits.reference.remove_const"><indexterm type="class_name"><primary>remove_const</primary><secondary>remove_const</secondary></indexterm><indexterm><primary>remove_const</primary><secondary>remove_const</secondary></indexterm><indexterm type="class_name"><primary>remove_const</primary><secondary>remove_const</secondary></indexterm><indexterm><primary>remove_const</primary><secondary>remove_const</secondary></indexterm> remove_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_const</primary><secondary>remove_const</secondary></indexterm><indexterm><primary>remove_const</primary><secondary>remove_const</secondary></indexterm><indexterm type="class_name"><primary>remove_const</primary><secondary>remove_const</secondary></indexterm><indexterm><primary>remove_const</primary><secondary>remove_const</secondary></indexterm>remove_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> const-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>remove_const</primary><secondary>remove_const</secondary></indexterm><indexterm><primary>remove_const</primary><secondary>remove_const</secondary></indexterm><indexterm type="class_name"><primary>remove_const</primary><secondary>remove_const</secondary></indexterm><indexterm><primary>remove_const</primary><secondary>remove_const</secondary></indexterm>remove_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_const</secondary></indexterm><indexterm type="class_name"><primary>remove_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_const</secondary></indexterm>remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_const</secondary></indexterm><indexterm type="class_name"><primary>remove_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_const</secondary></indexterm>remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_const</secondary></indexterm><indexterm type="class_name"><primary>remove_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_const</secondary></indexterm>remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_const</secondary></indexterm><indexterm type="class_name"><primary>remove_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_const</secondary></indexterm>remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_const</secondary></indexterm><indexterm type="class_name"><primary>remove_const</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_const</secondary></indexterm>remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_cv">
+ <title><link linkend="boost_typetraits.reference.remove_cv"><indexterm type="class_name"><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm><indexterm><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm><indexterm type="class_name"><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm><indexterm><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm> remove_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm><indexterm><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm><indexterm type="class_name"><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm><indexterm><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm>remove_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> cv-qualifiers removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm><indexterm><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm><indexterm type="class_name"><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm><indexterm><primary>remove_cv</primary><secondary>remove_cv</secondary></indexterm>remove_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_cv</secondary></indexterm><indexterm type="class_name"><primary>remove_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_cv</secondary></indexterm>remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_cv</secondary></indexterm><indexterm type="class_name"><primary>remove_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_cv</secondary></indexterm>remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_cv</secondary></indexterm><indexterm type="class_name"><primary>remove_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_cv</secondary></indexterm>remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_cv</secondary></indexterm><indexterm type="class_name"><primary>remove_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_cv</secondary></indexterm>remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_cv</secondary></indexterm><indexterm type="class_name"><primary>remove_cv</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_cv</secondary></indexterm>remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_extent">
+ <title><link linkend="boost_typetraits.reference.remove_extent"><indexterm type="class_name"><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm><indexterm><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm><indexterm><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm> remove_extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm><indexterm><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm><indexterm><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm>remove_extent</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes the topmost array bound, otherwise leaves
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm><indexterm><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm><indexterm><primary>remove_extent</primary><secondary>remove_extent</secondary></indexterm>remove_extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_extent</secondary></indexterm>remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_extent</secondary></indexterm>remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_extent</secondary></indexterm>remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_extent</secondary></indexterm>remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_extent</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_extent</secondary></indexterm><indexterm type="class_name"><primary>remove_extent</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_extent</secondary></indexterm>remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_pointer">
+ <title><link linkend="boost_typetraits.reference.remove_pointer"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm><indexterm><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm><indexterm type="class_name"><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm><indexterm><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm> remove_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm><indexterm><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm><indexterm type="class_name"><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm><indexterm><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm>remove_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any pointer modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm><indexterm><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm><indexterm type="class_name"><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm><indexterm><primary>remove_pointer</primary><secondary>remove_pointer</secondary></indexterm>remove_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_pointer</secondary></indexterm><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_pointer</secondary></indexterm>remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_pointer</secondary></indexterm><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_pointer</secondary></indexterm>remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_pointer</secondary></indexterm><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_pointer</secondary></indexterm>remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">**>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_pointer</secondary></indexterm><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_pointer</secondary></indexterm>remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_pointer</secondary></indexterm><indexterm type="class_name"><primary>remove_pointer</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_pointer</secondary></indexterm>remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_reference">
+ <title><link linkend="boost_typetraits.reference.remove_reference"><indexterm type="class_name"><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm><indexterm><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm><indexterm><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm> remove_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm><indexterm><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm><indexterm><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any reference modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm><indexterm><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm><indexterm><primary>remove_reference</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_reference</secondary></indexterm><indexterm type="class_name"><primary>remove_reference</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_reference</secondary></indexterm>remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_volatile">
+ <title><link linkend="boost_typetraits.reference.remove_volatile"><indexterm type="class_name"><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm><indexterm><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm><indexterm type="class_name"><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm><indexterm><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm> remove_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm><indexterm><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm><indexterm type="class_name"><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm><indexterm><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm>remove_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> volatile-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm><indexterm><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm><indexterm type="class_name"><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm><indexterm><primary>remove_volatile</primary><secondary>remove_volatile</secondary></indexterm>remove_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_volatile</secondary></indexterm><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_volatile</secondary></indexterm>remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_volatile</secondary></indexterm><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_volatile</secondary></indexterm>remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_volatile</secondary></indexterm><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_volatile</secondary></indexterm>remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_volatile</secondary></indexterm><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_volatile</secondary></indexterm>remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier"><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_volatile</secondary></indexterm><indexterm type="class_name"><primary>remove_volatile</primary><secondary>Examples</secondary></indexterm><indexterm><primary>Examples</primary><secondary>remove_volatile</secondary></indexterm>remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.type_with_alignment">
+ <title><link linkend="boost_typetraits.reference.type_with_alignment"><indexterm type="class_name"><primary>type_with_alignment</primary><secondary>type_with_alignment</secondary></indexterm><indexterm><primary>type_with_alignment</primary><secondary>type_with_alignment</secondary></indexterm> type_with_alignment</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier"><indexterm type="class_name"><primary>type_with_alignment</primary><secondary>type_with_alignment</secondary></indexterm><indexterm><primary>type_with_alignment</primary><secondary>type_with_alignment</secondary></indexterm>type_with_alignment</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with an alignment
+ that is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier"><indexterm type="class_name"><primary>type_with_alignment</primary><secondary>type_with_alignment</secondary></indexterm><indexterm><primary>type_with_alignment</primary><secondary>type_with_alignment</secondary></indexterm>type_with_alignment</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ </section>
+ <section id="boost_typetraits.credits">
+ <title><link linkend="boost_typetraits.credits"> Credits</link></title>
+ <para>
+ This documentation was pulled together by John Maddock, using <ulink url="../../../../doc/html/quickbook.html">Boost.Quickbook</ulink>
+ and <ulink url="../../../../doc/html/boostbook.html">Boost.DocBook</ulink>.
+ </para>
+ <para>
+ The original version of this library was created by Steve Cleary, Beman Dawes,
+ Howard Hinnant, and John Maddock. John Maddock is the current maintainer of
+ the library.
+ </para>
+ <para>
+ This version of type traits library is based on contributions by Adobe Systems
+ Inc, David Abrahams, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
+ Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Thorsten Ottosen, Robert
+ Ramey and Jeremy Siek.
+ </para>
+ <para>
+ Mat Marcus and Jesse Jones invented, and <ulink url="http://opensource.adobe.com/project4/project.shtml">published
+ a paper describing</ulink>, the partial specialization workarounds used in
+ this library.
+ </para>
+ <para>
+ Aleksey Gurtovoy added MPL integration to the library.
+ </para>
+ <para>
+ The <link linkend="boost_typetraits.reference.is_convertible"><indexterm type="class_name"><primary>is_convertible</primary><secondary>Credits</secondary></indexterm><indexterm><primary>Credits</primary><secondary>is_convertible</secondary></indexterm>is_convertible</link>
+ template is based on code originally devised by Andrei Alexandrescu, see "<ulink url="http://www.cuj.com/experts/1810/alexandr.htm?topic=experts">Generic<Programming>:
+ Mappings between Types and Values</ulink>".
+ </para>
+ <para>
+ The latest version of this library and documentation can be found at <ulink url="http://www.boost.org">www.boost.org</ulink>. Bugs, suggestions and discussion
+ should be directed to boost_at_[hidden] (see <ulink url="http://www.boost.org/more/mailing_lists.htm#main">www.boost.org/more/mailing_lists.htm#main</ulink>
+ for subscription details).
+ </para>
+ </section>
+
+ <index type="class_name">
+ <title>Class Index</title>
+ </index>
+ <index type="typedef_name">
+ <title>Typedef Index</title>
+ </index>
+ <index type="macro_name">
+ <title>Macro Index</title>
+ </index>
+ <index></index>
+
+</chapter>
\ No newline at end of file
Added: sandbox/tools/auto_index/test/test2.gold
==============================================================================
--- (empty file)
+++ sandbox/tools/auto_index/test/test2.gold 2009-02-06 11:57:38 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,6622 @@
+<?xml version="1.0"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!--
+
+This file is based upon the type traits docs, but has had additional XML elements added to it
+to ensure complete testing.
+
+-->
+
+<chapter xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" id="boost_typetraits" rev:last-revision="$Date: 2008-11-28 12:41:45 +0000 (Fri, 28 Nov 2008) $">
+ <chapterinfo><author>
+ <firstname>various</firstname> <surname>authors</surname>
+ </author><copyright>
+ <year>2000</year> <year>2006</year> <holder>Adobe Systems Inc, David Abrahams,
+ Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat
+ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
+ Ramey and Jeremy Siek</holder>
+ </copyright><legalnotice>
+ <para>
+ 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>)
+ </para>
+ </legalnotice></chapterinfo>
+ <title>Boost.TypeTraits</title>
+ <para>
+ A printer-friendly <ulink url="http://svn.boost.org/svn/boost/sandbox/pdf/type_traits/release/type_traits.pdf">PDF
+ version of this manual is also available</ulink>.
+ </para>
+ <section id="boost_typetraits.intro">
+ <title><link linkend="boost_typetraits.intro"> Introduction</link></title>
+ <para>
+ 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,
+ is a type a pointer or a reference type? Or does a type have a trivial constructor,
+ or a const-qualifier?
+ </para>
+ <para>
+ The type-traits classes share a unified design: each class inherits from a
+ the type <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ otherwise.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation.
+ </para>
+ </section>
+ <section id="boost_typetraits.background">
+ <title><link linkend="boost_typetraits.background"> Background and Tutorial</link></title>
+ <para>
+ 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
+ <ulink url="http://www.ddj.com">Dr Dobb's Journal</ulink>.
+ </para>
+ <para>
+ Generic programming (writing code which works with any data type meeting a
+ set of requirements) has become the method of choice for providing reusable
+ code. However, there are times in generic programming when "generic"
+ just isn't good enough - sometimes the differences between types are too large
+ for an efficient generic implementation. This is when the traits technique
+ becomes important - by encapsulating those properties that need to be considered
+ on a type by type basis inside a traits class, we can minimize the amount of
+ code that has to differ from one type to another, and maximize the amount of
+ generic code.
+ </para>
+ <?dbfo keep-together="auto" ?>
+ <para>
+ <indexterm>
+ <primary>Foo1</primary>
+ </indexterm>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">strlen</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">wcslen</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">wchar_t</phrase></computeroutput>
+ into the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput>.
+ Generic code that works with character strings can simply use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase><phrase role="special"><>::</phrase><phrase role="identifier">length</phrase></computeroutput> to determine the length of a null
+ terminated string, safe in the knowledge that specializations of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> will use the most appropriate
+ method available to them.
+ </para>
+ <anchor id="boost_typetraits.background.type_traits"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.type_traits">Type Traits</link>
+ </bridgehead>
+ <para>
+ Class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> is a classic
+ example of a collection of type specific properties wrapped up in a single
+ class - what Nathan Myers termed a <emphasis>baggage class</emphasis><link linkend="background.references">[1]</link>. In the Boost type-traits library,
+ we<link linkend="background.references">[2]</link> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ 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.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation. All of the type-traits classes are
+ defined inside namespace <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase></computeroutput>;
+ for brevity, namespace-qualification is omitted in most of the code samples
+ given.
+ </para>
+ <anchor id="boost_typetraits.background.implementation"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.implementation">Implementation</link>
+ </bridgehead>
+ <para>
+ 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,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput> inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ only if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ Here we define a primary version of the template class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_void">is_void</link></computeroutput>,
+ and provide a full-specialization when <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>. 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput>:
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">*></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ The syntax for partial specialization is somewhat arcane and could easily occupy
+ an article in its own right; like full specialization, in order to write a
+ partial specialization for a class, you must first declare the primary template.
+ The partial specialization contains an extra <...> after the class name
+ that contains the partial specialization parameters; these define the types
+ that will bind to that partial specialization rather than the default template.
+ The rules for what can appear in a partial specialization are somewhat convoluted,
+ but as a rule of thumb if you can legally write two function overloads of the
+ form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">);</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">U</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Then you can also write a partial specialization of the form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">>{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ This rule is by no means foolproof, but it is reasonably simple to remember
+ and close enough to the actual rule to be useful for everyday use.
+ </para>
+ <para>
+ As a more complex example of partial specialization consider the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput>. This
+ class defines a single typedef-member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">[</phrase><phrase role="identifier">N</phrase><phrase role="special">]></phrase>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The aim of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ is this: imagine a generic algorithm that is passed an array type as a template
+ parameter, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ provides a means of determining the underlying type of the array. For example
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">][</phrase><phrase role="number">5</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput> would evaluate to the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">5</phrase><phrase role="special">]</phrase></computeroutput>. 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.
+ </para>
+ <anchor id="boost_typetraits.background.optimized_copy"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.optimized_copy">Optimized copy</link>
+ </bridgehead>
+ <para>
+ As an example of how the type traits classes can be used, consider the standard
+ library algorithm copy:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">Iter1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iter2</phrase><phrase role="special">></phrase>
+<phrase role="identifier">Iter2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">Iter1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter2</phrase> <phrase role="identifier">out</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Obviously, there's no problem writing a generic version of copy that works
+ for all iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput>; however, there are
+ some circumstances when the copy operation can best be performed by a call
+ to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>. In order to implement
+ copy in terms of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> all
+ of the following conditions need to be met:
+ </para>
+ <itemizedlist>
+ <listitem>
+ Both of the iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must be pointers.
+ </listitem>
+ <listitem>
+ Both <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must point to the same type - excluding
+ const and volatile-qualifiers.
+ </listitem>
+ <listitem>
+ The type pointed to by <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ must have a trivial assignment operator.
+ </listitem>
+ </itemizedlist>
+ <para>
+ By trivial assignment operator we mean that the type is either a scalar type<link linkend="background.references">[3]</link> or:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The type has no user defined assignment operator.
+ </listitem>
+ <listitem>
+ The type does not have any data members that are references.
+ </listitem>
+ <listitem>
+ All base classes, and all data member objects must have trivial assignment
+ operators.
+ </listitem>
+ </itemizedlist>
+ <para>
+ If all these conditions are met then a type can be copied using <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> rather than using a compiler generated
+ assignment operator. The type-traits library provides a class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>,
+ such that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> 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 <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ gives the wrong answer, it will give the "safe" wrong answer - that
+ trivial assignment is not allowable.
+ </para>
+ <para>
+ The code for an optimized version of copy that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ where appropriate is given in <link linkend="boost_typetraits.examples.copy">the
+ examples</link>. The code begins by defining a template function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">do_copy</phrase></computeroutput> that performs a "slow but safe"
+ copy. The last parameter passed to this function may be either a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ or a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>.
+ Following that there is an overload of do<emphasis role="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 `</emphasis>_true_type<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">.</phrase> <phrase role="identifier">Finally</phrase><phrase role="special">,</phrase> <phrase role="identifier">the</phrase> <phrase role="identifier">version</phrase>
+ <phrase role="identifier">of</phrase> </computeroutput>copy<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="identifier">calls</phrase>
+ </computeroutput>do<emphasis role="underline">copy`, passing `</emphasis>_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".
+ </para>
+ <anchor id="boost_typetraits.background.was_it_worth_it_"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.was_it_worth_it_">Was it worth it?</link>
+ </bridgehead>
+ <para>
+ It has often been repeated in these columns that "premature optimization
+ is the root of all evil" <link linkend="background.references">[4]</link>.
+ So the question must be asked: was our optimization premature? To put this
+ in perspective the timings for our version of copy compared a conventional
+ generic copy<link linkend="background.references">[5]</link> are shown in table
+ 1.
+ </para>
+ <para>
+ Clearly the optimization makes a difference in this case; but, to be fair,
+ the timings are loaded to exclude cache miss effects - without this accurate
+ comparison between algorithms becomes difficult. However, perhaps we can add
+ a couple of caveats to the premature optimization rule:
+ </para>
+ <itemizedlist>
+ <listitem>
+ If you use the right algorithm for the job in the first place then optimization
+ will not be required; in some cases, memcpy is the right algorithm.
+ </listitem>
+ <listitem>
+ If a component is going to be reused in many places by many people then optimizations
+ may well be worthwhile where they would not be so for a single case - in
+ other words, the likelihood that the optimization will be absolutely necessary
+ somewhere, sometime is that much higher. Just as importantly the perceived
+ value of the stock implementation will be higher: there is no point standardizing
+ an algorithm if users reject it on the grounds that there are better, more
+ heavily optimized versions available.
+ </listitem>
+ </itemizedlist>
+ <table frame="all"> <title>Time taken to copy 1000 elements using `copy<const
+ T*, T*>` (times in micro-seconds)</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Version
+ </para>
+ </entry><entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ Time
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 0.99
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 8.07
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 2.52
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 8.02
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <anchor id="boost_typetraits.background.pair_of_references"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.pair_of_references">Pair of References</link>
+ </bridgehead>
+ <para>
+ 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
+ code to compile that otherwise would not do so unless excessive partial specialization
+ is used. This is possible by delegating partial specialization to the type
+ traits classes. Our example for this form of usage is a pair that can hold
+ references <link linkend="background.references">[6]</link>.
+ </para>
+ <para>
+ First, let us examine the definition of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput>, omitting
+ the comparison operators, default constructor, and template copy constructor
+ for simplicity:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Now, this "pair" cannot hold references as it currently stands, because
+ the constructor would require taking a reference to a reference, which is currently
+ illegal <link linkend="background.references">[7]</link>. Let us consider what
+ the constructor's parameters would have to be in order to allow "pair"
+ to hold non-reference types, references, and constant references:
+ </para>
+ <table frame="all"> <title>Required Constructor Argument Types</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of parameter to initializing constructor
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &
+ </para>
+ </entry><entry>
+ <para>
+ T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.add_reference">add_reference</link>, which
+ adds a reference to its type, unless it is already a reference.
+ </para>
+ <table frame="all"> <title>Using add_reference to synthesize the correct constructor
+ type</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &
+ </para>
+ </entry><entry>
+ <para>
+ T & [8]
+ </para>
+ </entry><entry>
+ <para>
+ T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ This allows us to build a primary template definition for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>
+ that can contain non-reference types, reference types, and constant reference
+ types:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Add back in the standard comparison operators, default constructor, and template
+ copy constructor (which are all the same), and you have a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput> that
+ can hold reference types!
+ </para>
+ <para>
+ This same extension could have been done using partial template specialization
+ of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>, but to specialize
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput> 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
+ approach. Using type traits in this fashion allows programmers to delegate
+ partial specialization to the type traits classes, resulting in code that is
+ easier to maintain and easier to understand.
+ </para>
+ <anchor id="boost_typetraits.background.conclusion"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.conclusion">Conclusion</link>
+ </bridgehead>
+ <para>
+ 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
+ are in the boost documentation, along with further examples using type traits.
+ Templates have enabled C++ uses to take the advantage of the code reuse that
+ generic programming brings; hopefully this article has shown that generic programming
+ does not have to sink to the lowest common denominator, and that templates
+ can be optimal as well as generic.
+ </para>
+ <anchor id="boost_typetraits.background.acknowledgements"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.acknowledgements">Acknowledgements</link>
+ </bridgehead>
+ <para>
+ The authors would like to thank Beman Dawes and Howard Hinnant for their helpful
+ comments when preparing this article.
+ </para>
+ <anchor id="background.references"></anchor> <anchor id="boost_typetraits.background.references"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.references">References</link>
+ </bridgehead>
+ <orderedlist inheritnum="ignore" continuation="restarts">
+ <listitem>
+ Nathan C. Myers, C++ Report, June 1995.
+ </listitem>
+ <listitem>
+ The type traits library is based upon contributions by Steve Cleary, Beman
+ Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org.
+ </listitem>
+ <listitem>
+ A scalar type is an arithmetic type (i.e. a built-in integer or floating
+ point type), an enumeration type, a pointer, a pointer to member, or a const-
+ or volatile-qualified version of one of these types.
+ </listitem>
+ <listitem>
+ This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg
+ 268.
+ </listitem>
+ <listitem>
+ The test code is available as part of the boost utility library (see algo_opt_examples.cpp),
+ the code was compiled with gcc 2.95 with all optimisations turned on, tests
+ were conducted on a 400MHz Pentium II machine running Microsoft Windows 98.
+ </listitem>
+ <listitem>
+ John Maddock and Howard Hinnant have submitted a "compressed_pair"
+ library to Boost, which uses a technique similar to the one described here
+ to hold references. Their pair also uses type traits to determine if any
+ of the types are empty, and will derive instead of contain to conserve space
+ -- hence the name "compressed".
+ </listitem>
+ <listitem>
+ This is actually an issue with the C++ Core Language Working Group (issue
+ #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow
+ a "reference to a reference to T" to mean the same thing as a "reference
+ to T", but only in template instantiation, in a method similar to multiple
+ cv-qualifiers.
+ </listitem>
+ <listitem>
+ For those of you who are wondering why this shouldn't be const-qualified,
+ remember that references are always implicitly constant (for example, you
+ can't re-assign a reference). Remember also that "const T &"
+ is something completely different. For this reason, cv-qualifiers on template
+ type arguments that are references are ignored.
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="boost_typetraits.category">
+ <title><link linkend="boost_typetraits.category"> Type Traits by Category</link></title>
+ <section id="boost_typetraits.category.value_traits">
+ <title><link linkend="boost_typetraits.category.value_traits"> Type Traits
+ that Describe the Properties of a Type</link></title>
+ <para>
+ <indexterm>
+ <primary>Foo2</primary>
+ <secondary>Bar2</secondary>
+ </indexterm>
+ These traits are all <emphasis>value traits</emphasis>, which is to say the
+ traits classes all inherit from <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link>,
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.rank">rank</link></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.extent">extent</link></computeroutput>).
+ </para>
+ <section id="boost_typetraits.category.value_traits.primary">
+ <title><link linkend="boost_typetraits.category.value_traits.primary"> Categorizing
+ a Type</link></title>
+ <para>
+ These traits identify what "kind" of type some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> 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.
+ </para>
+ <para>
+ For any given type, exactly one primary type trait will inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ and all the others will inherit from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ in other words these traits are mutually exclusive.
+ </para>
+ <para>
+ This means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric_limits</phrase>
+ <phrase role="keyword">template</phrase></computeroutput> instead.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_array">is_array</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_complex">is_complex</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_enum">is_enum</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ The following traits are made up of the union of one or more type categorizations.
+ A type may belong to more than one of these categories, in addition to
+ one of the primary categories.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_compound">is_compound</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_object">is_object</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_scalar">is_scalar</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.properties">
+ <title><link linkend="boost_typetraits.category.value_traits.properties">
+ General Type Properties</link></title>
+ <para>
+ The following templates describe the general properties of a type.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.alignment_of">alignment_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_abstract">is_abstract</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_const">is_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_empty">is_empty</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_signed">is_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_volatile">is_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.extent">extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.relate">
+ <title><link linkend="boost_typetraits.category.value_traits.relate"> Relationships
+ Between Two Types</link></title>
+ <para>
+ These templates determine the whether there is a relationship between two
+ types:
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_base_of">is_base_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.category.transform">
+ <title><link linkend="boost_typetraits.category.transform"> Type Traits that
+ Transform One Type to Another</link></title>
+ <para>
+ The following templates transform one type to another, based upon some well-defined
+ rule. Each template has a single member called <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of applying the transformation to the template argument
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_const">add_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_cv">add_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_pointer">add_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_volatile">add_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.decay">decay</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_signed">make_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_unsigned">make_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.promote">promote</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_const">remove_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_cv">remove_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_reference">remove_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link><phrase role="special">;</phrase>
+</programlisting>
+ <anchor id="boost_typetraits.category.transform.broken_compiler_workarounds_"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
+ Compiler Workarounds:</link>
+ </bridgehead>
+ <para>
+ For all of these templates support for partial specialization of class templates
+ is required to correctly implement the transformation. On the other hand,
+ practice shows that many of the templates from this category are very useful,
+ and often essential for implementing some generic libraries. Lack of these
+ templates is often one of the major limiting factors in porting those libraries
+ to compilers that do not yet support this language feature. As some of these
+ compilers are going to be around for a while, and at least one of them is
+ very wide-spread, it was decided that the library should provide workarounds
+ where possible.
+ </para>
+ <para>
+ The basic idea behind the workaround is to manually define full specializations
+ of all type transformation templates for all fundamental types, and all their
+ 1st and 2nd rank cv-[un]qualified derivative pointer types, and to provide
+ a user-level macro that will define all the explicit specializations needed
+ for any user-defined type T.
+ </para>
+ <para>
+ The first part guarantees the successful compilation of something like this:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="special">...</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="
identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+</programlisting>
+ <para>
+ and the second part provides the library's users with a mechanism to make
+ the above code work not only for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput> or other built-in type,
+ but for their own types as well:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">namespace</phrase> <phrase role="identifier">myspace</phrase><phrase role="special">{</phrase>
+ <phrase role="keyword">struct</phrase> <phrase role="identifier">MyClass</phrase> <phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+<phrase role="comment">// declare this at global scope:
+</phrase><phrase role="identifier">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase><phrase role="special">(</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">)</phrase>
+<phrase role="comment">// transformations on myspace::MyClass now work:
+</phrase><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="comment">// etc.
+</phrase></programlisting>
+ <para>
+ Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates
+ to nothing on those compilers that <emphasis role="bold">do</emphasis> support
+ partial specialization.
+ </para>
+ </section>
+ <section id="boost_typetraits.category.alignment">
+ <title><link linkend="boost_typetraits.category.alignment"> Synthesizing Types
+ with Specific Alignments</link></title>
+ <para>
+ Some low level memory management routines need to synthesize a POD type with
+ specific alignment properties. The template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link></computeroutput>
+ finds the smallest type with a specified alignment, while template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link></computeroutput>
+ creates a type with a specific size and alignment.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.function">
+ <title><link linkend="boost_typetraits.category.function"> Decomposing Function
+ Types</link></title>
+ <para>
+ The class template <link linkend="boost_typetraits.reference.function_traits">function_traits</link>
+ extracts information from function types (see also <link linkend="boost_typetraits.reference.is_function">is_function</link>).
+ This traits class allows you to tell how many arguments a function takes,
+ what those argument types are, and what the return type is.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.function_traits">function_traits</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.user_defined">
+ <title><link linkend="boost_typetraits.user_defined"> User Defined Specializations</link></title>
+ <para>
+ 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::<link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ or boost::<link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ as appropriate:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_pod</phrase><phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_union</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">char</phrase> <phrase role="identifier">c</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special"><</phrase><phrase role="identifier">my_pod</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.intrinsics">
+ <title><link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link></title>
+ <para>
+ 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
+ of additional help from the compiler is required. Currently (April 2008) Visual
+ C++ 8 and 9, GNU GCC 4.3 and MWCW 9 provide the necessary intrinsics, and other
+ compilers will no doubt follow in due course.
+ </para>
+ <para>
+ The Following traits classes always need compiler support to do the right thing
+ for all types (but all have safe fallback positions if this support is unavailable):
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_union">is_union</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_pod">is_pod</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes can't be portably implemented in the C++ language,
+ although in practice, the implementations do in fact do the right thing on
+ all the compilers we know about:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_empty">is_empty</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes are dependent on one or more of the above:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_class">is_class</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The hooks for compiler-intrinsic support are defined in <ulink url="../../../../boost/type_traits/intrinsics.hpp">boost/type_traits/intrinsics.hpp</ulink>,
+ adding support for new compilers is simply a matter of defining one of more
+ of the following macros:
+ </para>
+ <table frame="all"> <title>Macros for Compiler Intrinsics</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_UNION(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a union type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POD(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a POD type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_EMPTY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an empty struct or union
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if the default constructor for T is trivial (i.e.
+ has no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial copy constructor (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial assignment operator (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial destructor (i.e. ~T() has
+ no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">x</phrase><phrase role="special">;</phrase></computeroutput>
+ can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">(</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">t</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">u</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">t</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">u</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_VIRTUAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true T has a virtual destructor
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ABSTRACT(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an abstract type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_BASE_OF(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a base class of U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CLASS(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a class type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CONVERTIBLE(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is convertible to U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ENUM(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true is T is an enum
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POLYMORPHIC(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a polymorphic type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_ALIGNMENT_OF(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to the alignment requirements of type T.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.mpl">
+ <title><link linkend="boost_typetraits.mpl"> MPL Interoperability</link></title>
+ <para>
+ All the value based traits in this library conform to MPL's requirements for
+ an <ulink url="../../../../libs/mpl/doc/refmanual/integral-constant.html">Integral
+ Constant type</ulink>: that includes a number of rather intrusive workarounds
+ for broken compilers.
+ </para>
+ <para>
+ Purely as an implementation detail, this means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">true_</phrase></computeroutput></ulink>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">false_</phrase></computeroutput></ulink>,
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">v</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/integral-c.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">integral_c</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">v</phrase><phrase role="special">></phrase></computeroutput></ulink>
+ (provided <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>)
+ </para>
+ </section>
+ <section id="boost_typetraits.examples">
+ <title><link linkend="boost_typetraits.examples"> Examples</link></title>
+ <section id="boost_typetraits.examples.copy">
+ <title><link linkend="boost_typetraits.examples.copy"> An Optimized Version
+ of std::copy</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">copy</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ to optimise the copy operation (see <ulink url="../../examples/copy_example.cpp">copy_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// opt::copy
+</phrase><phrase role="comment">// same semantics as std::copy
+</phrase><phrase role="comment">// calls memcpy where appropriate.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">></phrase>
+<phrase role="identifier">I2</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">>&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">out</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">memcpy</phrase><phrase role="special">(</phrase><phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="special">(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">)*</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">));</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">+(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can copy with memcpy if T has a trivial assignment operator,
+</phrase> <phrase role="comment">// and if the iterator arguments are actually pointers (this last
+</phrase> <phrase role="comment">// requirement we detect with overload resolution):
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I1</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special"><</phrase><phrase role="identifier">value_type</phrase><phrase role="special">>());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.fill">
+ <title><link linkend="boost_typetraits.examples.fill"> An Optimised Version
+ of std::fill</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">fill</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memset</phrase></computeroutput>
+ to optimise the fill operation (see <ulink url="../../examples/fill_example.cpp">fill_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// fill
+</phrase><phrase role="comment">// same as std::fill, but uses memset where appropriate
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">>&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">first</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">memset</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can do an optimised fill if T has a trivial assignment
+</phrase> <phrase role="comment">// operator and if it's size is one:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase> <phrase role="special">&&</phrase> <phrase role="special">(</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)></phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.destruct">
+ <title><link linkend="boost_typetraits.examples.destruct"> An Example that
+ Omits Destructor Calls For Types with Trivial Destructors</link></title>
+ <para>
+ Demonstrates a simple algorithm that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">__has_trivial_destruct</phrase></computeroutput>
+ to determine whether to destructors need to be called (see <ulink url="../../examples/trivial_destructor_example.cpp">trivial_destructor_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// algorithm destroy_array:
+</phrase><phrase role="comment">// The reverse of std::unitialized_copy, takes a block of
+</phrase><phrase role="comment">// initialized memory and calls destructors on all objects therein.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="identifier">first</phrase><phrase role="special">->~</phrase><phrase role="identifier">T</phrase><phrase role="special">();</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase> <phrase role="comment">// namespace detail
+</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p2</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">p2</phrase><phrase role="special">,</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.iter">
+ <title><link linkend="boost_typetraits.examples.iter"> An improved Version
+ of std::iter_swap</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase></computeroutput>
+ of it's dereferenced arguments (the same as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <ulink url="../../examples/iter_swap_example.cpp">iter_swap_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// iter_swap:
+</phrase><phrase role="comment">// tests whether iterator is a proxying iterator or not, and
+</phrase><phrase role="comment">// uses optimal form accordingly:
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">></phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">v_t</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">v_t</phrase> <phrase role="identifier">v</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">one</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">one</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">two</phrase> <phrase role="special">=</phrase> <phrase role="identifier">v</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">></phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">using</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">swap</phrase><phrase role="special">(*</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">iter_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">two</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// See is both arguments are non-proxying iterators,
+</phrase> <phrase role="comment">// and if both iterator the same type:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I1</phrase><phrase role="special">>::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r1_t</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I2</phrase><phrase role="special">>::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">;</phrase>
+
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special"><</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special"><</phrase><phrase role="identifier">r2_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special"><</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">></phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.to_double">
+ <title><link linkend="boost_typetraits.examples.to_double"> Convert Numeric
+ Types and Enums to double</link></title>
+ <para>
+ Demonstrates a conversion of <ulink url="../../../../libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types">Numeric
+ Types</ulink> and enum types to double:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">double</phrase> <phrase role="identifier">to_double</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">promoted</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric</phrase><phrase role="special">::</phrase><phrase role="identifier">converter</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase><phrase role="identifier">promoted</phrase><phrase role="special">>::</phrase><phrase role="identifier">convert</phrase><phrase role="special">(</phrase><phrase role="identifier">value</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.reference">
+ <title><link linkend="boost_typetraits.reference"> Alphabetical Reference</link></title>
+ <section id="boost_typetraits.reference.add_const">
+ <title><link linkend="boost_typetraits.reference.add_const"> add_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_cv">
+ <title><link linkend="boost_typetraits.reference.add_cv"> add_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_pointer">
+ <title><link linkend="boost_typetraits.reference.add_pointer"> add_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ <para>
+ The rationale for this template is that it produces the same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">TYPEOF</phrase><phrase role="special">(&</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput>, where
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">t</phrase></computeroutput> is an object of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_reference">
+ <title><link linkend="boost_typetraits.reference.add_reference"> add_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is not a reference type then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">&</phrase></computeroutput>, otherwise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_volatile">
+ <title><link linkend="boost_typetraits.reference.add_volatile"> add_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.aligned_storage">
+ <title><link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">aligned_storage</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with size
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Size</phrase></computeroutput> and an alignment that
+ is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">aligned_storage</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.alignment_of">
+ <title><link linkend="boost_typetraits.reference.alignment_of"> alignment_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">alignment_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template alignment<emphasis role="underline">of inherits from `</emphasis>_integral_constant<std::size_t,
+ ALIGNOF(T)><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">,</phrase> <phrase role="identifier">where</phrase>
+ </computeroutput>ALIGNOF(T)` is the alignment of type T.
+ </para>
+ <para>
+ <emphasis>Note: strictly speaking you should only rely on the value of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> 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.</emphasis>
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">alignment_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">char</phrase><phrase role="special">)></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ with value <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.decay">
+ <title><link linkend="boost_typetraits.reference.decay"> decay</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">decay</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> Let <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ be the result of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>, then if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ is an array type, the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">>*</phrase></computeroutput>,
+ otherwise if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput> is a function
+ type then the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase><phrase role="special">*</phrase></computeroutput>, otherwise the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">decay</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">(&)[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">(&)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.extent">
+ <title><link linkend="boost_typetraits.reference.extent"> extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">extent</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template extent inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)></phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is the number of elements in the N'th array
+ dimention of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">N</phrase> <phrase role="special">></phrase>
+ <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>, or if the N'th array bound is incomplete,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">],</phrase>
+ <phrase role="number">1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>4</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">],</phrase> <phrase role="number">1</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.floating_point_promotion">
+ <title><link linkend="boost_typetraits.reference.floating_point_promotion">
+ floating_point_promotion</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">floating_point_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If floating point promotion can be
+ applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies floating point promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">float</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.function_traits">
+ <title><link linkend="boost_typetraits.reference.function_traits"> function_traits</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">F</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">function_traits</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">arity</phrase> <phrase role="special">=</phrase> <replaceable>see-below</replaceable><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">result_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> arg<replaceable>N</replaceable>_type<phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The class template function_traits will only compile if:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The compiler supports partial specialization of class templates.
+ </listitem>
+ <listitem>
+ The template argument <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>
+ is a <emphasis>function type</emphasis>, note that this <emphasis><emphasis role="bold">is not</emphasis></emphasis> the same thing as a <emphasis>pointer
+ to a function</emphasis>.
+ </listitem>
+ </itemizedlist>
+ <tip>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link>.
+ </para>
+ </tip>
+ <table frame="all"> <title>Function Traits Members</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Member
+ </para>
+ </entry><entry>
+ <para>
+ Description
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that gives the number of arguments
+ accepted by the function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type returned by function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase>arg<replaceable>N</replaceable>_type</computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The <replaceable>N</replaceable>th argument type of function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="number">1</phrase> <phrase role="special"><=</phrase>
+ <phrase role="identifier">N</phrase> <phrase role="special"><=</phrase>
+ <phrase role="identifier">arity</phrase></computeroutput> of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 0.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 1.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 4.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">long</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arg1_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arg4_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arg5_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: there is no <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">arg5_type</phrase></computeroutput>
+ since there are only four arguments.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: argument type is a <emphasis>function pointer</emphasis>,
+ and not a <emphasis>function type</emphasis>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_assign">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_assign"> has_nothrow_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_assign</phrase></computeroutput>
+ 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".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_constructor">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_constructor">
+ has_nothrow_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_constructor</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_copy">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_copy"> has_nothrow_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_copy</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_cp_cons"> has_nothrow_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_no_throw_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_no_throw_def_cons"> has_nothrow_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_assign">
+ <title><link linkend="boost_typetraits.reference.has_trivial_assign"> has_trivial_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p11.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_constructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_constructor">
+ has_trivial_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ If a type has a trivial default-constructor then the constructor have no
+ effect: calls to the constructor can be safely omitted. Note that using meta-programming
+ to omit a call to a single trivial-constructor call is of no benefit whatsoever.
+ However, if loops and/or exception handling code can also be omitted, then
+ some benefit in terms of code size and speed can be obtained.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.1p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_copy">
+ <title><link linkend="boost_typetraits.reference.has_trivial_copy"> has_trivial_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_cp_cons"> has_trivial_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_def_cons"> has_trivial_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_destructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_destructor"> has_trivial_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ If a type has a trivial destructor then the destructor has no effect: calls
+ to the destructor can be safely omitted. Note that using meta-programming
+ to omit a call to a single trivial-constructor call is of no benefit whatsoever.
+ However, if loops and/or exception handling code can also be omitted, then
+ some benefit in terms of code size and speed can be obtained.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4p3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_virtual_destructor">
+ <title><link linkend="boost_typetraits.reference.has_virtual_destructor"> has_virtual_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_virtual_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a virtual destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ and has to be explicitly specialized for types with virtual destructors unless
+ the compiler used has compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ that enable the trait to do the right thing: currently (May 2005) only Visual
+ C++ 8 and GCC-4.3 have the necessary <link linkend="boost_typetraits.intrinsics">intrinsics</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_virtual_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_constant">
+ <title><link linkend="boost_typetraits.reference.integral_constant"> integral_constant</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">val</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_constant</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">></phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">true</phrase><phrase role="special">></phrase> <phrase role="identifier">true_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">false</phrase><phrase role="special">></phrase> <phrase role="identifier">false_type</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ Class template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_constant</phrase></computeroutput>
+ is the common base class for all the value-based type traits. The two typedef's
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">true_type</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">false_type</phrase></computeroutput> are provided for convenience:
+ most of the value traits are Boolean properties and so will inherit from
+ one of these.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_promotion">
+ <title><link linkend="boost_typetraits.reference.integral_promotion"> integral_promotion</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral promotion can be applied
+ to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>, then
+ applies integral promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field).
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">integral_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">enum</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">float_round_style</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.is_abstract">
+ <title><link linkend="boost_typetraits.reference.is_abstract"> is_abstract</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_abstract</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ abstract type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_abstract</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>;
+ 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
+ this in their own code if the "safe fallback" is not suitable for
+ their particular use-case.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">abc</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">abc</phrase><phrase role="special">()</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_arithmetic">
+ <title><link linkend="boost_typetraits.reference.is_arithmetic"> is_arithmetic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_arithmetic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ arithmetic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Arithmetic types include integral and floating point types (see also <link linkend="boost_typetraits.reference.is_integral">is_integral</link> and
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_arithmetic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_array">
+ <title><link linkend="boost_typetraits.reference.is_array"> is_array</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_array</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ array type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_array</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can give the wrong result with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_base_of">
+ <title><link linkend="boost_typetraits.reference.is_base_of"> is_base_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_base_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If Base is base class of type
+ Derived or if both types are the same then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ This template will detect non-public base classes, and ambiguous base classes.
+ </para>
+ <para>
+ Note that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">X</phrase><phrase role="special">,</phrase><phrase role="identifier">X</phrase><phrase role="special">></phrase></computeroutput> will always inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>.
+ <emphasis role="bold">This is the case even if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">X</phrase></computeroutput>
+ is not a class type</emphasis>. This is a change in behaviour from Boost-1.33
+ in order to track the Technical Report on C++ Library Extensions.
+ </para>
+ <para>
+ Types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput> must not be incomplete types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_base_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput>
+ is a private base class of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> is an ambiguous
+ base of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>. These compilers
+ include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and
+ older versions of EDG based compilers.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase> <phrase role="special">:</phrase>
+ <phrase role="keyword">public</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Base</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>: a class is regarded as it's
+ own base.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_class">
+ <title><link linkend="boost_typetraits.reference.is_class"> is_class</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_class</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ class type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link> for
+ union types. See also <link linkend="boost_typetraits.reference.is_union">is_union</link>.
+ Currently (May 2005) only Visual C++ 8 has the necessary compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to correctly identify union types, and therefore make is_class function correctly.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">MyClass</phrase><phrase role="special">;</phrase></computeroutput> then:
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_complex">
+ <title><link linkend="boost_typetraits.reference.is_complex"> is_complex</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_complex</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is a complex number type then true (of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">complex</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">></phrase></computeroutput>
+ for some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>), otherwise
+ false.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 26.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_complex</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_compound">
+ <title><link linkend="boost_typetraits.reference.is_compound"> is_compound</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_compound</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ compound type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Any type that is not a fundamental type is a compound type (see also <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_compound</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">MyEnum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_const">
+ <title><link linkend="boost_typetraits.reference.is_const"> is_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_const</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) const-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_convertible">
+ <title><link linkend="boost_typetraits.reference.is_convertible"> is_convertible</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_convertible</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If an imaginary lvalue of type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> is convertible to type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput> then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type From must not be an incomplete type.
+ </para>
+ <para>
+ Type To must not be an incomplete, or function type.
+ </para>
+ <para>
+ No types are considered to be convertible to array types or abstract-class
+ types.
+ </para>
+ <para>
+ This template can not detect whether a converting-constructor is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput> or not: if type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">private</phrase></computeroutput> converting constructor
+ from type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> then instantiating
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase></computeroutput>
+ will produce a compiler error. For this reason <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase></computeroutput>
+ can not be used to determine whether a type has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput>
+ copy-constructor or not.
+ </para>
+ <para>
+ This template will also produce compiler errors if the conversion is ambiguous,
+ for example:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">B</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">C</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">D</phrase> <phrase role="special">:</phrase> <phrase role="identifier">B</phrase><phrase role="special">,</phrase> <phrase role="identifier">C</phrase> <phrase role="special">{};</phrase>
+<phrase role="comment">// This produces a compiler error, the conversion is ambiguous:
+</phrase><phrase role="keyword">bool</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">y</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">D</phrase><phrase role="special">*,</phrase><phrase role="identifier">A</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4 and 8.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></computeroutput>,
+ then the template parameter <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ must not be an abstract type.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the conversion would require a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const_cast</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&,</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_empty">
+ <title><link linkend="boost_typetraits.reference.is_empty"> is_empty</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_empty</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an empty class type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10p5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_empty</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> In order to correctly
+ detect empty classes this trait relies on either:
+ </para>
+ <itemizedlist>
+ <listitem>
+ the compiler implementing zero sized empty base classes, or
+ </listitem>
+ <listitem>
+ the compiler providing <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect empty classes.
+ </listitem>
+ </itemizedlist>
+ <para>
+ Can not be used with incomplete types.
+ </para>
+ <para>
+ Can not be used with union types, until is_union can be made to work.
+ </para>
+ <para>
+ If the compiler does not support partial-specialization of class templates,
+ then this template can not be used with abstract types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">empty_class</phrase>
+ <phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_enum">
+ <title><link linkend="boost_typetraits.reference.is_enum"> is_enum</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_enum</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ enum type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_enum</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> Requires a correctly
+ functioning <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">enum</phrase> <phrase role="identifier">my_enum</phrase>
+ <phrase role="special">{</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_floating_point">
+ <title><link linkend="boost_typetraits.reference.is_floating_point"> is_floating_point</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_floating_point</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ floating point type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_floating_point</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_function">
+ <title><link linkend="boost_typetraits.reference.is_function"> is_function</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_function</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ function type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Note that this template does not detect <emphasis>pointers to functions</emphasis>,
+ or <emphasis>references to functions</emphasis>, these are detected by <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> and <link linkend="boost_typetraits.reference.is_reference">is_reference</link> respectively:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">f1</phrase><phrase role="special">();</phrase> <phrase role="comment">// f1 is of function type.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f2</phrase><phrase role="special">*)();</phrase> <phrase role="comment">// f2 is a pointer to a function.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f3</phrase><phrase role="special">&)();</phrase> <phrase role="comment">// f3 is a reference to a function.
+</phrase></programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p1 and 8.3.5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_function</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer type, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(&)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a reference to a function, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer to a member function.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <tip>
+ <para>
+ Don't confuse function-types with pointers to functions:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="identifier">f</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">);</phrase></computeroutput>
+ </para>
+ <para>
+ defines a function type,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase> <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a prototype for a function of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase></computeroutput>,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">*</phrase>
+ <phrase role="identifier">pf</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">&</phrase>
+ <phrase role="identifier">fr</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a pointer and a reference to the function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">foo</phrase></computeroutput>.
+ </para>
+ <para>
+ If you want to detect whether some type is a pointer-to-function then use:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special"><</phrase><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ </para>
+ <para>
+ or for pointers to member functions you can just use <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ directly.
+ </para>
+ </tip>
+ </section>
+ <section id="boost_typetraits.reference.is_fundamental">
+ <title><link linkend="boost_typetraits.reference.is_fundamental"> is_fundamental</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_fundamental</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ fundamental type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Fundamental types include integral, floating point and void types (see also
+ <link linkend="boost_typetraits.reference.is_integral">is_integral</link>,
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>
+ and <link linkend="boost_typetraits.reference.is_void">is_void</link>)
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_fundamental</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_integral">
+ <title><link linkend="boost_typetraits.reference.is_integral"> is_integral</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_integral</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ integral type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p7.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_integral</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_function_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_function_pointer">
+ is_member_function_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_function_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member function then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a data member and not a member
+ function, see <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_object_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_object_pointer">
+ is_member_object_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_object_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member object (a data member) then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a member function and not a
+ member object, see <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_pointer"> is_member_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member (either a function or a data member) then inherits from
+ <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_object">
+ <title><link linkend="boost_typetraits.reference.is_object"> is_object</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_object</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ object type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ All types are object types except references, void, and function types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_object</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: reference types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: function types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ void is not an object type
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pod">
+ <title><link linkend="boost_typetraits.reference.is_pod"> is_pod</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pod</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ POD type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ POD stands for "Plain old data". Arithmetic types, and enumeration
+ types, a pointers and pointer to members are all PODs. Classes and unions
+ can also be POD's if they have no non-static data members that are of reference
+ or non-POD type, no user defined constructors, no user defined assignment
+ operators, no private or protected non-static data members, no virtual functions
+ and no base classes. Finally, a cv-qualified POD is still a POD, as is an
+ array of PODs.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10 and 9p4 (Note
+ that POD's are also aggregates, see 8.5.1).
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, is<emphasis role="underline">pod
+ will never report that a class or struct is a POD; this is always safe, if
+ possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have
+ the necessary compiler-</emphasis>_intrinsics.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pointer">
+ <title><link linkend="boost_typetraits.reference.is_pointer"> is_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer type (includes function pointers, but excludes pointers to members)
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p2 and 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <important>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput> detects "real"
+ pointer types only, and <emphasis>not</emphasis> smart pointers. Users
+ should not specialise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput>
+ 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
+ general to auto-magically detect smart pointer types, so such a trait would
+ have to be partially specialised for each supported smart pointer type.
+ </para>
+ </important>
+ </section>
+ <section id="boost_typetraits.reference.is_polymorphic">
+ <title><link linkend="boost_typetraits.reference.is_polymorphic"> is_polymorphic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_polymorphic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ polymorphic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> The implementation
+ requires some knowledge of the compilers ABI, it does actually seem to work
+ with the majority of compilers though.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_polymorphic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">poly</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">poly</phrase><phrase role="special">();</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_same">
+ <title><link linkend="boost_typetraits.reference.is_same"> is_same</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_same</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T and U are the same types
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_same</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with abstract, incomplete or function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_scalar">
+ <title><link linkend="boost_typetraits.reference.is_scalar"> is_scalar</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_scalar</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ scalar type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Scalar types include integral, floating point, enumeration, pointer, and
+ pointer-to-member types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_scalar</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_signed">
+ <title><link linkend="boost_typetraits.reference.is_signed"> is_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_signed</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an signed integer type
+ or an enumerated type with an underlying signed integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">myclass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_stateless">
+ <title><link linkend="boost_typetraits.reference.is_stateless"> is_stateless</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_stateless</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Ff T is a stateless type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type T must be a complete type.
+ </para>
+ <para>
+ A stateless type is a type that has no storage and whose constructors and
+ destructors are trivial. That means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_stateless</phrase></computeroutput>
+ only inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the following expression is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">true</phrase></computeroutput>:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_stateless</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this template work automatically.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_reference">
+ <title><link linkend="boost_typetraits.reference.is_reference"> is_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_reference</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a reference pointer type
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(&)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis> (the argument in this case
+ is a reference to a function).
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_union">
+ <title><link linkend="boost_typetraits.reference.is_union"> is_union</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_union</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ union type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Currently requires some kind of compiler support, otherwise unions are identified
+ as classes.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this trait "just work" without user intervention.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_unsigned">
+ <title><link linkend="boost_typetraits.reference.is_unsigned"> is_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_unsigned</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an unsigned integer type
+ or an enumerated type with an underlying unsigned integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="identifier">myclass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_void">
+ <title><link linkend="boost_typetraits.reference.is_void"> is_void</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_void</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ void type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_void</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_volatile">
+ <title><link linkend="boost_typetraits.reference.is_volatile"> is_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_volatile</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) volatile-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">volatile</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase>
+ <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the volatile qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.make_signed">
+ <title><link linkend="boost_typetraits.reference.make_signed"> make_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_signed</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.make_unsigned">
+ <title><link linkend="boost_typetraits.reference.make_unsigned"> make_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_unsigned</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.promote">
+ <title><link linkend="boost_typetraits.reference.promote"> promote</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">promote</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral or floating point promotion
+ can be applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies integral and floating point promotions to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ See also <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link>
+ and <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field) and 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">promote</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.rank">
+ <title><link linkend="boost_typetraits.reference.rank"> rank</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">rank</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template rank inherits from
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)></phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is the
+ number of array dimensions in type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">rank</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[]></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>1</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.remove_all_extents">
+ <title><link linkend="boost_typetraits.reference.remove_all_extents"> remove_all_extents</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_all_extents</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes all of the array bounds on <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_all_extents</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_const">
+ <title><link linkend="boost_typetraits.reference.remove_const"> remove_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> const-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_cv">
+ <title><link linkend="boost_typetraits.reference.remove_cv"> remove_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> cv-qualifiers removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_extent">
+ <title><link linkend="boost_typetraits.reference.remove_extent"> remove_extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_extent</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes the topmost array bound, otherwise leaves
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_pointer">
+ <title><link linkend="boost_typetraits.reference.remove_pointer"> remove_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any pointer modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">**>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_reference">
+ <title><link linkend="boost_typetraits.reference.remove_reference"> remove_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any reference modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_volatile">
+ <title><link linkend="boost_typetraits.reference.remove_volatile"> remove_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> volatile-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.type_with_alignment">
+ <title><link linkend="boost_typetraits.reference.type_with_alignment"> type_with_alignment</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">type_with_alignment</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with an alignment
+ that is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">type_with_alignment</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ </section>
+ <section id="boost_typetraits.credits">
+ <title><link linkend="boost_typetraits.credits"> Credits</link></title>
+ <para>
+ This documentation was pulled together by John Maddock, using <ulink url="../../../../doc/html/quickbook.html">Boost.Quickbook</ulink>
+ and <ulink url="../../../../doc/html/boostbook.html">Boost.DocBook</ulink>.
+ </para>
+ <para>
+ The original version of this library was created by Steve Cleary, Beman Dawes,
+ Howard Hinnant, and John Maddock. John Maddock is the current maintainer of
+ the library.
+ </para>
+ <para>
+ This version of type traits library is based on contributions by Adobe Systems
+ Inc, David Abrahams, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
+ Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Thorsten Ottosen, Robert
+ Ramey and Jeremy Siek.
+ </para>
+ <para>
+ Mat Marcus and Jesse Jones invented, and <ulink url="http://opensource.adobe.com/project4/project.shtml">published
+ a paper describing</ulink>, the partial specialization workarounds used in
+ this library.
+ </para>
+ <para>
+ Aleksey Gurtovoy added MPL integration to the library.
+ </para>
+ <para>
+ The <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ template is based on code originally devised by Andrei Alexandrescu, see "<ulink url="http://www.cuj.com/experts/1810/alexandr.htm?topic=experts">Generic<Programming>:
+ Mappings between Types and Values</ulink>".
+ </para>
+ <para>
+ The latest version of this library and documentation can be found at <ulink url="http://www.boost.org">www.boost.org</ulink>. Bugs, suggestions and discussion
+ should be directed to boost_at_[hidden] (see <ulink url="http://www.boost.org/more/mailing_lists.htm#main">www.boost.org/more/mailing_lists.htm#main</ulink>
+ for subscription details).
+ </para>
+ </section>
+
+ <section>
+ <title>Class Index</title>
+ <para><link linkend="idx_id_0">A</link> <link linkend="idx_id_1">C</link> <link linkend="idx_id_2">D</link> <link linkend="idx_id_3">E</link> <link linkend="idx_id_4">F</link> <link linkend="idx_id_5">H</link> <link linkend="idx_id_6">I</link> <link linkend="idx_id_7">M</link> <link linkend="idx_id_8">P</link> <link linkend="idx_id_9">R</link> <link linkend="idx_id_10">T</link> </para><variablelist><varlistentry id="idx_id_0"><term>A</term><listitem><variablelist><varlistentry><term>add_const</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_const">add_const</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Constrained Index Term</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistent
ry><term>add_cv</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_cv">add_cv</link></para></member><member><para><link linkend="boost_typetraits.reference.add_cv">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_pointer">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.add_pointer">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.add_pointer">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_reference</term><listitem><simplelist><member><p
ara><link linkend="boost_typetraits.reference.add_reference">add_reference</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.add_reference">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member><member><para><link linkend="boost_typetraits.background">Using add_reference to synthesize the correct constructor type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_volatile">add_volatile</link></para></member><member><para><link linkend="boost_typetraits.reference.add_volatile">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member><
/simplelist></listitem></varlistentry><varlistentry><term>alignment_of</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.alignment_of">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_1"><term>C</term><listitem><variablelist><varlistentry><term>Constrained Index Term</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_const">add_const</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Examples</link></para></member></simplelist></listitem></v
arlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_2"><term>D</term><listitem><variablelist><varlistentry><term>decay</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_3"><term>E</term><listitem><variablelist><varlistentry><term>extent</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_
typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.extent">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.reference.extent">rank</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_4"><term>F</term><listitem><variablelist><varlistentry><term>floating_point_promotion</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.floating_point_promotion">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost_type
traits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>function_traits</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.function">Decomposing Function Types</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">Function Traits Members</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">result_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_5"><term>H</term><listitem><variablelist><varlistentry
><term>has_nothrow_assign</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.
reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_copy</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy_constructor</link></para></member><member
><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_copy_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_cp_cons">has_nothrow_copy_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_default_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has
_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_no_throw_def_cons">has_nothrow_default_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_assign</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.fill">An Optimised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.intri
nsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link link
end="boost_typetraits.reference.has_trivial_constructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_copy</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">true_type</link></para></member></simplelist></listitem></varlistent
ry><varlistentry><term>has_trivial_copy_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_cp_cons">has_trivial_copy_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_default_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_def_cons">has_trivial_default_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_d
estructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_virtual_destructor</term><listitem><simplelist><member><para><link l
inkend="boost_typetraits.reference.has_virtual_destructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_6"><term>I</term><listitem><variablelist><varlistentry><term>integral_constant</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><lin
k linkend="boost_typetraits.examples.fill">An Optimised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.reference.rank">rank</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">true_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>
integral_promotion</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.integral_promotion">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_abstract</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_abstract">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link
></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_arithmetic</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">true_type</link></para></member></simplelist></listitem></varlistentry><varlisten
try><term>is_array</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_base_of</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_base_of">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">true_type</link></para></member></simplelist></listitem></varlist
entry><varlistentry><term>is_class</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_complex</term><listitem><simplelist><member><para><link link
end="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_compound</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">true_type</link></para></mem
ber></simplelist></listitem></varlistentry><varlistentry><term>is_const</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_const">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_convertible</term><listitem><simplelist><member><para><link linkend="boost_typetraits.credits">Credits</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></mem
ber><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_empty</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_empty">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for
Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_enum</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_floating_point</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.referen
ce.is_floating_point">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_function</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.category.function">Decomposing Function Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></
member><member><para><link linkend="boost_typetraits.reference.is_function">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_fundamental</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.
is_fundamental">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_integral</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><p
ara><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_member_function_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_pointer</link></pa
ra></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_member_object_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentr
y><term>is_member_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_object</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetra
its.reference.is_object">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_pod</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_pod">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry
><varlistentry><term>is_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_polymorphic</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_polymorphic">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><m
ember><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_reference</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.refer
ence.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_same</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">true_type</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_scalar</term><listitem><simplelist
><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_signed</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_signed">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_stateless</term><listi
tem><simplelist><member><para><link linkend="boost_typetraits.reference.is_stateless">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link
linkend="boost_typetraits.reference.is_stateless">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_union</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist><
/listitem></varlistentry><varlistentry><term>is_unsigned</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_unsigned">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_void</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</li
nk></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_volatile">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">is_volatile</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_7"><term>M</term><listitem><variablelist><varlistentry><term>make_signed</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.make_signed">Exampl
es</link></para></member><member><para><link linkend="boost_typetraits.reference.make_signed">make_signed</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>make_unsigned</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.make_unsigned">make_unsigned</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_8"><term>P</term><listitem><variablelist><varlistentry><term>promote</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.to_double">Convert Numeric Types and Enums to double</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">Examples</link></par
a></member><member><para><link linkend="boost_typetraits.reference.promote">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_9"><term>R</term><listitem><variablelist><varlistentry><term>rank</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.rank">integral_constant</link></para></member><member><para><link linkend="boost_typetrait
s.reference.rank">rank</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_all_extents</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_all_extents">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_const</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_const">Examples</link></para></member><member><para><link linkend="boost_
typetraits.reference.remove_const">remove_const</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_cv</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_cv">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_cv">remove_cv</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_extent</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_extent">Examples</link></para>
</member><member><para><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_pointer">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_reference</term><listitem><simplelist><memb
er><para><link linkend="boost_typetraits.reference.add_pointer">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_reference">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_reference">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_volatile">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></va
rlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_10"><term>T</term><listitem><variablelist><varlistentry><term>type_with_alignment</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.alignment">Synthesizing Types with Specific Alignments</link></para></member><member><para><link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry></variablelist></section>
+ <section>
+ <title>Typedef Index</title>
+ <para><link linkend="idx_id_11">F</link> <link linkend="idx_id_12">R</link> <link linkend="idx_id_13">T</link> </para><variablelist><varlistentry id="idx_id_11"><term>F</term><listitem><variablelist><varlistentry><term>false_type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para
><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.intro">Introduction</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><p
ara><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="
boost_typetraits.reference.is_floating_point">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.referen
ce.is_pointer">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">is_union</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile"
>is_volatile</link></para></member><member><para><link linkend="boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_12"><term>R</term><listitem><variablelist><varlistentry><term>result_type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.function_traits">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">Function Traits Members</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_13"><term>T</term><listitem><variablelist><varlistentry><term>true_type</term><listitem><simplelist><member><para><link linkend="boost_ty
petraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.examples.fill">An Optimised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has
_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.intro">Introduction</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_
arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point<
/link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">is_pointer</link></para></member><member><para><l
ink linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">is_union</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">is_volatile</link></para></member><member><para><link linkend="
boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry></variablelist></section>
+ <section>
+ <title>Macro Index</title>
+ <para><link linkend="idx_id_14">B</link> </para><variablelist><varlistentry id="idx_id_14"><term>B</term><listitem><variablelist><varlistentry><term>BOOST_ALIGNMENT_OF</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_ASSIGN</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_CONSTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para>
</member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_COPY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_ASSIGN</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_CONSTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_COPY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_DESTRUCTOR</term><listitem><simplelist><memb
er><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_VIRTUAL_DESTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_ABSTRACT</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_BASE_OF</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_CLASS</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlis
tentry><term>BOOST_IS_CONVERTIBLE</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_EMPTY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_ENUM</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_POD</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_POLYMORPHIC</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></me
mber></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_UNION</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry></variablelist></section>
+ <section><title>Index</title><para><link linkend="idx_id_15">A</link> <link linkend="idx_id_16">B</link> <link linkend="idx_id_17">C</link> <link linkend="idx_id_18">D</link> <link linkend="idx_id_19">E</link> <link linkend="idx_id_20">F</link> <link linkend="idx_id_21">G</link> <link linkend="idx_id_22">H</link> <link linkend="idx_id_23">I</link> <link linkend="idx_id_24">M</link> <link linkend="idx_id_25">O</link> <link linkend="idx_id_26">P</link> <link linkend="idx_id_27">R</link> <link linkend="idx_id_28">S</link> <link linkend="idx_id_29">T</link> <link linkend="idx_id_30">U</link> </para><variablelist><varlistentry id="idx_id_15"><term>A</term><listitem><variablelist><varlistentry><term>add_const</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_const">add_const</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Constrained Index Term</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">E
xamples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_cv</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_cv">add_cv</link></para></member><member><para><link linkend="boost_typetraits.reference.add_cv">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_pointer">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.add_pointer">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.add_pointer">remove_reference</link></para></member><member><para><link linkend="bo
ost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_reference</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_reference">add_reference</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.add_reference">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member><member><para><link linkend="boost_typetraits.background">Using add_reference to synthesize the correct constructor type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_volatile">add_volatile</link></para></member><member><para><link li
nkend="boost_typetraits.reference.add_volatile">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>alignment_of</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.alignment_of">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_16"><term>B</term><listitem><variablelist><varlistentry><term>Background and Tutorial</term><listitem><simplelist><member
><para><link linkend="boost_typetraits.background">add_reference</link></para></member><member><para><link linkend="boost_typetraits.background">false_type</link></para></member><member><para><link linkend="boost_typetraits.background">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.background">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.background">is_void</link></para></member><member><para><link linkend="boost_typetraits.background">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.background">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_ALIGNMENT_OF</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</term><listitem><simplelist><member><para><link linkend="b
oost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_ASSIGN</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_CONSTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_COPY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_ASSIGN</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem
></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_CONSTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_COPY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_DESTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_VIRTUAL_DESTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_ABSTRACT</term><listitem><simplelist><member><para><link linkend="boost_typ
etraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_BASE_OF</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_CLASS</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_CONVERTIBLE</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_EMPTY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_ENUM</term><listitem><
simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_POD</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_POLYMORPHIC</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_UNION</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_17"><term>C</term><listitem><variablelist><varlistentry><term>Categorizing a Type</term><listitem><simplelist><member><para><link linkend="boost_typetrai
ts.category.value_traits.primary">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_array</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_class</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_complex</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_compound</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_enum</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_function</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.pri
mary">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_integral</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_object</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_reference</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.category.value_t
raits.primary">is_union</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_void</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Constrained Index Term</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_const">add_const</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Examples</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Convert Numeric Types and Enums to double</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.to_double">promote</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Credits</term><listitem><simplelist><member><para><link linkend="boost_typetraits.credits">is_convertible</link></para></member></simplelist></listitem></varlistentry></v
ariablelist></listitem></varlistentry><varlistentry id="idx_id_18"><term>D</term><listitem><variablelist><varlistentry><term>decay</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Decomposing Function Types</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.function">function_traits</link></para></member><member><para><link linkend="boost_typetraits.category.function">is_function</link></para></member></simplelist></listitem></v
arlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_19"><term>E</term><listitem><variablelist><varlistentry><term>Example that Omits Destructor Calls For Types with Trivial Destructors</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">false_type</link></para></member><member><para><link linkend="boost_typetraits.examples.destruct">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.examples.destruct">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Examples</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_const">add_const</link></para></member><member><para><link linkend="boost_typetraits.reference.add_cv">add_cv</link></para></member><member><para><link linkend="boost_typetraits.reference.add_pointer">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.add_reference">add_reference</li
nk></para></member><member><para><link linkend="boost_typetraits.reference.add_volatile">add_volatile</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Constrained Index Term</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.make_signed">make_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link></para></member><member><para><link link
end="boost_typetraits.reference.remove_const">remove_const</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_cv">remove_cv</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_reference">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">result_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>extent</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link
></para></member><member><para><link linkend="boost_typetraits.reference.extent">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.reference.extent">rank</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_20"><term>F</term><listitem><variablelist><varlistentry><term>false_type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">
Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><member><para><li
nk linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.intro">Introduction</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="bo
ost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_me
mber_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union
">is_union</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">is_volatile</link></para></member><member><para><link linkend="boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>floating_point_promotion</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.floating_point_promotion">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost_
typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term><link linkend="boost_typetraits.background">Foo1</link></term><listitem><simplelist></simplelist></listitem></varlistentry><varlistentry><term>Foo2</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits">Bar2</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Function Traits Members</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">result_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>function_traits</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.function">Decomposing Function Types</link></para></member><member><para><link linkend="boost_typetraits.
reference.function_traits">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">Function Traits Members</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">result_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_21"><term>G</term><listitem><variablelist><varlistentry><term>General Type Properties</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">extent</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.propert
ies">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_nothrow_copy_constructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_nothrow_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_copy_cons
tructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_const</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_empty</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_pod</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.c
ategory.value_traits.properties">is_signed</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_volatile</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">rank</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_22"><term>H</term><listitem><variablelist><varlistentry><term>has_nothrow_assign</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has
_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link
linkend="boost_typetraits.reference.has_nothrow_constructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_copy</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy_constructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_copy_constructor</term><listitem><simplelist><member><para><link l
inkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_cp_cons">has_nothrow_copy_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_default_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_no_throw_def_cons">has_nothrow_default_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_assign</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.fill">An Op
timised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_trivial_
constructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_copy</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">false_type</link></para></member><member><para><link linkend="boost_typetraits.ca
tegory.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_copy_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="
boost_typetraits.reference.has_trivial_cp_cons">has_trivial_copy_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_default_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_def_cons">has_trivial_default_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_destructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">false_type</link></para></member><member><para><link linkend="boost_t
ypetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_virtual_destructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><memb
er><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_23"><term>I</term><listitem><variablelist><varlistentry><term>improved Version of std::iter_swap</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.iter">false_type</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">is_reference</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">is_same</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>integral_constant</term><listitem><simpl
elist><member><para><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.examples.fill">An Optimised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.reference.rank">rank</link></para></member><member><para><link linkend="boost_typetraits.reference.in
tegral_constant">true_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>integral_promotion</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.integral_promotion">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Introduction</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intro">false_type</link></para></member><member><para><link linkend="boost_typetraits.intro">true_type</link></para></member><
/simplelist></listitem></varlistentry><varlistentry><term>is_abstract</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_abstract">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_arithmetic</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is
_arithmetic">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_array</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">true_type</link></para></member></simplelist></listitem></varlistentry><va
rlistentry><term>is_base_of</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_base_of">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_class</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link
linkend="boost_typetraits.reference.is_class">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_complex</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_compound</term><listitem><simplelist><membe
r><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_const</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_const">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">true_type</lin
k></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_convertible</term><listitem><simplelist><member><para><link linkend="boost_typetraits.credits">Credits</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_empty</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_empty">false_t
ype</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_enum</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">false_type</link></para></member><member><para><link linkend="boost_typetraits.refe
rence.is_enum">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_floating_point</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">true_type</link></para></member></simplel
ist></listitem></varlistentry><varlistentry><term>is_function</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.category.function">Decomposing Function Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_functi
on">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_fundamental</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">true_type</link></para></member></simplelist></listitem><
/varlistentry><varlistentry><term>is_integral</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_member_function_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_
pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_member_object_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">false_type</link></para></member><member><para><link linkend=
"boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_member_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_mem
ber_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_object</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_pod</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_pod">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.
value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><
link linkend="boost_typetraits.reference.is_pointer">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_polymorphic</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_polymorphic">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_reference</ter
m><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_same</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">false_type</link></para></member><member><para><link linkend="boo
st_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">true_type</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_scalar</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_signed</term><listitem
><simplelist><member><para><link linkend="boost_typetraits.reference.is_signed">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_stateless</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_stateless">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">has_trivial_copy</link></para></member><member><para><link linkend="boo
st_typetraits.reference.is_stateless">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_union</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member>
<para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_unsigned</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_unsigned">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">true_type</link><
/para></member></simplelist></listitem></varlistentry><varlistentry><term>is_void</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_volatile">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Ty
pe Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">is_volatile</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_24"><term>M</term><listitem><variablelist><varlistentry><term>Macros for Compiler Intrinsics</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">BOOST_ALIGNMENT_OF</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_NOTHROW_ASSIGN</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_NOTHROW_CONSTRUCTOR</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_NOTHROW_COPY</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_TRIVIAL_ASSIGN</link></para></member><member><para><link linkend="boost_
typetraits.intrinsics">BOOST_HAS_TRIVIAL_CONSTRUCTOR</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_TRIVIAL_COPY</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_TRIVIAL_DESTRUCTOR</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_VIRTUAL_DESTRUCTOR</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_ABSTRACT</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_BASE_OF</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_CLASS</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_CONVERTIBLE</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_EMPTY</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_ENUM</link></para></member><member><para><link linkend="boost_typetraits.i
ntrinsics">BOOST_IS_POD</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_POLYMORPHIC</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_UNION</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>make_signed</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.make_signed">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.make_signed">make_signed</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>make_unsigned</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.make_unsigned">make_unsigned</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member><
/simplelist></listitem></varlistentry><varlistentry><term>MPL Interoperability</term><listitem><simplelist><member><para><link linkend="boost_typetraits.mpl">false_type</link></para></member><member><para><link linkend="boost_typetraits.mpl">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.mpl">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_25"><term>O</term><listitem><variablelist><varlistentry><term>Optimised Version of std::fill</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.fill">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.examples.fill">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.examples.fill">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Optimized Version of std::copy</term><listitem><simplelist><member><para><lin
k linkend="boost_typetraits.examples.copy">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_26"><term>P</term><listitem><variablelist><varlistentry><term>promote</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.to_double">Convert Numeric Types and Enums to double</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><me
mber><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_27"><term>R</term><listitem><variablelist><varlistentry><term>rank</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.rank">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.reference.rank">rank</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></si
mplelist></listitem></varlistentry><varlistentry><term>Relationships Between Two Types</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.relate">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">is_same</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_all_extents</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_all_extents">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_const</term><listitem><simplelist><member><para><
link linkend="boost_typetraits.reference.remove_const">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_const">remove_const</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_cv</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_cv">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_cv">remove_cv</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_extent</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">
decay</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_extent">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_pointer">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></pa
ra></member></simplelist></listitem></varlistentry><varlistentry><term>remove_reference</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_pointer">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_reference">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_reference">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_volatile">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link></para></member><member><para><link linkend="boost_typetra
its.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>result_type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.function_traits">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">Function Traits Members</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_28"><term>S</term><listitem><variablelist><varlistentry><term>Support for Compiler Intrinsics</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_nothr
ow_copy</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">is_class</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">is_empty</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">is_pod</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">is_stateless</link></para></member><member><para><link linkend="boost
_typetraits.intrinsics">is_union</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Synthesizing Types with Specific Alignments</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.alignment">type_with_alignment</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_29"><term>T</term><listitem><variablelist><varlistentry><term>true_type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.examples.fill">An Optimised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member>
<para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_de
structor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.intro">Introduction</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.is
_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><li
nk linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></mem
ber><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">is_union</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">is_volatile</link></para></member><member><para><link linkend="boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Type Traits that Describe the Properties of a Type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">
extent</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">rank</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Type Traits that Transform One Type to Another</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.transform">add_const</link></para></member><member><para><link linkend="boost_typetraits.category.transform">add_cv</link></para></member><member><para><link linkend="boost_typetraits.category.transform">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.transform">add_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">add_volatile</link></para></member><member><para><link linkend="boost_typetraits.category.transform">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</link></para></member><member><para><link li
nkend="boost_typetraits.category.transform">decay</link></para></member><member><para><link linkend="boost_typetraits.category.transform">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.category.transform">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.category.transform">is_same</link></para></member><member><para><link linkend="boost_typetraits.category.transform">make_signed</link></para></member><member><para><link linkend="boost_typetraits.category.transform">make_unsigned</link></para></member><member><para><link linkend="boost_typetraits.category.transform">promote</link></para></member><member><para><link linkend="boost_typetraits.category.transform">rank</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_all_extents</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_const</link></para></member><member><para><link linkend="boost_t
ypetraits.category.transform">remove_cv</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_volatile</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>type_with_alignment</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.alignment">Synthesizing Types with Specific Alignments</link></para></member><member><para><link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_30"><term>U</term><listitem><variablelist><varlistentry><term>User Defined Specializ
ations</term><listitem><simplelist><member><para><link linkend="boost_typetraits.user_defined">false_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">is_class</link></para></member><member><para><link linkend="boost_typetraits.user_defined">is_pod</link></para></member><member><para><link linkend="boost_typetraits.user_defined">is_union</link></para></member><member><para><link linkend="boost_typetraits.user_defined">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Using add_reference to synthesize the correct constructor type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">add_reference</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry></variablelist></section>
+
+</chapter>
\ No newline at end of file
Added: sandbox/tools/auto_index/test/test3.gold
==============================================================================
--- (empty file)
+++ sandbox/tools/auto_index/test/test3.gold 2009-02-06 11:57:38 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,6622 @@
+<?xml version="1.0"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!--
+
+This file is based upon the type traits docs, but has had additional XML elements added to it
+to ensure complete testing.
+
+-->
+
+<chapter xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" id="boost_typetraits" rev:last-revision="$Date: 2008-11-28 12:41:45 +0000 (Fri, 28 Nov 2008) $">
+ <chapterinfo><author>
+ <firstname>various</firstname> <surname>authors</surname>
+ </author><copyright>
+ <year>2000</year> <year>2006</year> <holder>Adobe Systems Inc, David Abrahams,
+ Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat
+ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
+ Ramey and Jeremy Siek</holder>
+ </copyright><legalnotice>
+ <para>
+ 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>)
+ </para>
+ </legalnotice></chapterinfo>
+ <title>Boost.TypeTraits</title>
+ <para>
+ A printer-friendly <ulink url="http://svn.boost.org/svn/boost/sandbox/pdf/type_traits/release/type_traits.pdf">PDF
+ version of this manual is also available</ulink>.
+ </para>
+ <section id="boost_typetraits.intro">
+ <title><link linkend="boost_typetraits.intro"> Introduction</link></title>
+ <para>
+ 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,
+ is a type a pointer or a reference type? Or does a type have a trivial constructor,
+ or a const-qualifier?
+ </para>
+ <para>
+ The type-traits classes share a unified design: each class inherits from a
+ the type <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ otherwise.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation.
+ </para>
+ </section>
+ <section id="boost_typetraits.background">
+ <title><link linkend="boost_typetraits.background"> Background and Tutorial</link></title>
+ <para>
+ 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
+ <ulink url="http://www.ddj.com">Dr Dobb's Journal</ulink>.
+ </para>
+ <para>
+ Generic programming (writing code which works with any data type meeting a
+ set of requirements) has become the method of choice for providing reusable
+ code. However, there are times in generic programming when "generic"
+ just isn't good enough - sometimes the differences between types are too large
+ for an efficient generic implementation. This is when the traits technique
+ becomes important - by encapsulating those properties that need to be considered
+ on a type by type basis inside a traits class, we can minimize the amount of
+ code that has to differ from one type to another, and maximize the amount of
+ generic code.
+ </para>
+ <?dbfo keep-together="auto" ?>
+ <para>
+ <indexterm>
+ <primary>Foo1</primary>
+ </indexterm>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">strlen</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">wcslen</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">wchar_t</phrase></computeroutput>
+ into the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput>.
+ Generic code that works with character strings can simply use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase><phrase role="special"><>::</phrase><phrase role="identifier">length</phrase></computeroutput> to determine the length of a null
+ terminated string, safe in the knowledge that specializations of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> will use the most appropriate
+ method available to them.
+ </para>
+ <anchor id="boost_typetraits.background.type_traits"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.type_traits">Type Traits</link>
+ </bridgehead>
+ <para>
+ Class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> is a classic
+ example of a collection of type specific properties wrapped up in a single
+ class - what Nathan Myers termed a <emphasis>baggage class</emphasis><link linkend="background.references">[1]</link>. In the Boost type-traits library,
+ we<link linkend="background.references">[2]</link> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ 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.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation. All of the type-traits classes are
+ defined inside namespace <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase></computeroutput>;
+ for brevity, namespace-qualification is omitted in most of the code samples
+ given.
+ </para>
+ <anchor id="boost_typetraits.background.implementation"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.implementation">Implementation</link>
+ </bridgehead>
+ <para>
+ 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,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput> inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ only if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ Here we define a primary version of the template class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_void">is_void</link></computeroutput>,
+ and provide a full-specialization when <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>. 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput>:
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">*></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ The syntax for partial specialization is somewhat arcane and could easily occupy
+ an article in its own right; like full specialization, in order to write a
+ partial specialization for a class, you must first declare the primary template.
+ The partial specialization contains an extra <...> after the class name
+ that contains the partial specialization parameters; these define the types
+ that will bind to that partial specialization rather than the default template.
+ The rules for what can appear in a partial specialization are somewhat convoluted,
+ but as a rule of thumb if you can legally write two function overloads of the
+ form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">);</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">U</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Then you can also write a partial specialization of the form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">>{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ This rule is by no means foolproof, but it is reasonably simple to remember
+ and close enough to the actual rule to be useful for everyday use.
+ </para>
+ <para>
+ As a more complex example of partial specialization consider the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput>. This
+ class defines a single typedef-member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">[</phrase><phrase role="identifier">N</phrase><phrase role="special">]></phrase>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The aim of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ is this: imagine a generic algorithm that is passed an array type as a template
+ parameter, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ provides a means of determining the underlying type of the array. For example
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">][</phrase><phrase role="number">5</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput> would evaluate to the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">5</phrase><phrase role="special">]</phrase></computeroutput>. 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.
+ </para>
+ <anchor id="boost_typetraits.background.optimized_copy"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.optimized_copy">Optimized copy</link>
+ </bridgehead>
+ <para>
+ As an example of how the type traits classes can be used, consider the standard
+ library algorithm copy:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">Iter1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iter2</phrase><phrase role="special">></phrase>
+<phrase role="identifier">Iter2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">Iter1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter2</phrase> <phrase role="identifier">out</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Obviously, there's no problem writing a generic version of copy that works
+ for all iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput>; however, there are
+ some circumstances when the copy operation can best be performed by a call
+ to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>. In order to implement
+ copy in terms of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> all
+ of the following conditions need to be met:
+ </para>
+ <itemizedlist>
+ <listitem>
+ Both of the iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must be pointers.
+ </listitem>
+ <listitem>
+ Both <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must point to the same type - excluding
+ const and volatile-qualifiers.
+ </listitem>
+ <listitem>
+ The type pointed to by <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ must have a trivial assignment operator.
+ </listitem>
+ </itemizedlist>
+ <para>
+ By trivial assignment operator we mean that the type is either a scalar type<link linkend="background.references">[3]</link> or:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The type has no user defined assignment operator.
+ </listitem>
+ <listitem>
+ The type does not have any data members that are references.
+ </listitem>
+ <listitem>
+ All base classes, and all data member objects must have trivial assignment
+ operators.
+ </listitem>
+ </itemizedlist>
+ <para>
+ If all these conditions are met then a type can be copied using <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> rather than using a compiler generated
+ assignment operator. The type-traits library provides a class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>,
+ such that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> 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 <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ gives the wrong answer, it will give the "safe" wrong answer - that
+ trivial assignment is not allowable.
+ </para>
+ <para>
+ The code for an optimized version of copy that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ where appropriate is given in <link linkend="boost_typetraits.examples.copy">the
+ examples</link>. The code begins by defining a template function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">do_copy</phrase></computeroutput> that performs a "slow but safe"
+ copy. The last parameter passed to this function may be either a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ or a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>.
+ Following that there is an overload of do<emphasis role="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 `</emphasis>_true_type<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">.</phrase> <phrase role="identifier">Finally</phrase><phrase role="special">,</phrase> <phrase role="identifier">the</phrase> <phrase role="identifier">version</phrase>
+ <phrase role="identifier">of</phrase> </computeroutput>copy<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="identifier">calls</phrase>
+ </computeroutput>do<emphasis role="underline">copy`, passing `</emphasis>_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".
+ </para>
+ <anchor id="boost_typetraits.background.was_it_worth_it_"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.was_it_worth_it_">Was it worth it?</link>
+ </bridgehead>
+ <para>
+ It has often been repeated in these columns that "premature optimization
+ is the root of all evil" <link linkend="background.references">[4]</link>.
+ So the question must be asked: was our optimization premature? To put this
+ in perspective the timings for our version of copy compared a conventional
+ generic copy<link linkend="background.references">[5]</link> are shown in table
+ 1.
+ </para>
+ <para>
+ Clearly the optimization makes a difference in this case; but, to be fair,
+ the timings are loaded to exclude cache miss effects - without this accurate
+ comparison between algorithms becomes difficult. However, perhaps we can add
+ a couple of caveats to the premature optimization rule:
+ </para>
+ <itemizedlist>
+ <listitem>
+ If you use the right algorithm for the job in the first place then optimization
+ will not be required; in some cases, memcpy is the right algorithm.
+ </listitem>
+ <listitem>
+ If a component is going to be reused in many places by many people then optimizations
+ may well be worthwhile where they would not be so for a single case - in
+ other words, the likelihood that the optimization will be absolutely necessary
+ somewhere, sometime is that much higher. Just as importantly the perceived
+ value of the stock implementation will be higher: there is no point standardizing
+ an algorithm if users reject it on the grounds that there are better, more
+ heavily optimized versions available.
+ </listitem>
+ </itemizedlist>
+ <table frame="all"> <title>Time taken to copy 1000 elements using `copy<const
+ T*, T*>` (times in micro-seconds)</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Version
+ </para>
+ </entry><entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ Time
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 0.99
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 8.07
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 2.52
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 8.02
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <anchor id="boost_typetraits.background.pair_of_references"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.pair_of_references">Pair of References</link>
+ </bridgehead>
+ <para>
+ 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
+ code to compile that otherwise would not do so unless excessive partial specialization
+ is used. This is possible by delegating partial specialization to the type
+ traits classes. Our example for this form of usage is a pair that can hold
+ references <link linkend="background.references">[6]</link>.
+ </para>
+ <para>
+ First, let us examine the definition of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput>, omitting
+ the comparison operators, default constructor, and template copy constructor
+ for simplicity:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Now, this "pair" cannot hold references as it currently stands, because
+ the constructor would require taking a reference to a reference, which is currently
+ illegal <link linkend="background.references">[7]</link>. Let us consider what
+ the constructor's parameters would have to be in order to allow "pair"
+ to hold non-reference types, references, and constant references:
+ </para>
+ <table frame="all"> <title>Required Constructor Argument Types</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of parameter to initializing constructor
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &
+ </para>
+ </entry><entry>
+ <para>
+ T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.add_reference">add_reference</link>, which
+ adds a reference to its type, unless it is already a reference.
+ </para>
+ <table frame="all"> <title>Using add_reference to synthesize the correct constructor
+ type</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &
+ </para>
+ </entry><entry>
+ <para>
+ T & [8]
+ </para>
+ </entry><entry>
+ <para>
+ T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ This allows us to build a primary template definition for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>
+ that can contain non-reference types, reference types, and constant reference
+ types:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Add back in the standard comparison operators, default constructor, and template
+ copy constructor (which are all the same), and you have a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput> that
+ can hold reference types!
+ </para>
+ <para>
+ This same extension could have been done using partial template specialization
+ of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>, but to specialize
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput> 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
+ approach. Using type traits in this fashion allows programmers to delegate
+ partial specialization to the type traits classes, resulting in code that is
+ easier to maintain and easier to understand.
+ </para>
+ <anchor id="boost_typetraits.background.conclusion"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.conclusion">Conclusion</link>
+ </bridgehead>
+ <para>
+ 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
+ are in the boost documentation, along with further examples using type traits.
+ Templates have enabled C++ uses to take the advantage of the code reuse that
+ generic programming brings; hopefully this article has shown that generic programming
+ does not have to sink to the lowest common denominator, and that templates
+ can be optimal as well as generic.
+ </para>
+ <anchor id="boost_typetraits.background.acknowledgements"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.acknowledgements">Acknowledgements</link>
+ </bridgehead>
+ <para>
+ The authors would like to thank Beman Dawes and Howard Hinnant for their helpful
+ comments when preparing this article.
+ </para>
+ <anchor id="background.references"></anchor> <anchor id="boost_typetraits.background.references"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.references">References</link>
+ </bridgehead>
+ <orderedlist inheritnum="ignore" continuation="restarts">
+ <listitem>
+ Nathan C. Myers, C++ Report, June 1995.
+ </listitem>
+ <listitem>
+ The type traits library is based upon contributions by Steve Cleary, Beman
+ Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org.
+ </listitem>
+ <listitem>
+ A scalar type is an arithmetic type (i.e. a built-in integer or floating
+ point type), an enumeration type, a pointer, a pointer to member, or a const-
+ or volatile-qualified version of one of these types.
+ </listitem>
+ <listitem>
+ This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg
+ 268.
+ </listitem>
+ <listitem>
+ The test code is available as part of the boost utility library (see algo_opt_examples.cpp),
+ the code was compiled with gcc 2.95 with all optimisations turned on, tests
+ were conducted on a 400MHz Pentium II machine running Microsoft Windows 98.
+ </listitem>
+ <listitem>
+ John Maddock and Howard Hinnant have submitted a "compressed_pair"
+ library to Boost, which uses a technique similar to the one described here
+ to hold references. Their pair also uses type traits to determine if any
+ of the types are empty, and will derive instead of contain to conserve space
+ -- hence the name "compressed".
+ </listitem>
+ <listitem>
+ This is actually an issue with the C++ Core Language Working Group (issue
+ #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow
+ a "reference to a reference to T" to mean the same thing as a "reference
+ to T", but only in template instantiation, in a method similar to multiple
+ cv-qualifiers.
+ </listitem>
+ <listitem>
+ For those of you who are wondering why this shouldn't be const-qualified,
+ remember that references are always implicitly constant (for example, you
+ can't re-assign a reference). Remember also that "const T &"
+ is something completely different. For this reason, cv-qualifiers on template
+ type arguments that are references are ignored.
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="boost_typetraits.category">
+ <title><link linkend="boost_typetraits.category"> Type Traits by Category</link></title>
+ <section id="boost_typetraits.category.value_traits">
+ <title><link linkend="boost_typetraits.category.value_traits"> Type Traits
+ that Describe the Properties of a Type</link></title>
+ <para>
+ <indexterm>
+ <primary>Foo2</primary>
+ <secondary>Bar2</secondary>
+ </indexterm>
+ These traits are all <emphasis>value traits</emphasis>, which is to say the
+ traits classes all inherit from <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link>,
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.rank">rank</link></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.extent">extent</link></computeroutput>).
+ </para>
+ <section id="boost_typetraits.category.value_traits.primary">
+ <title><link linkend="boost_typetraits.category.value_traits.primary"> Categorizing
+ a Type</link></title>
+ <para>
+ These traits identify what "kind" of type some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> 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.
+ </para>
+ <para>
+ For any given type, exactly one primary type trait will inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ and all the others will inherit from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ in other words these traits are mutually exclusive.
+ </para>
+ <para>
+ This means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric_limits</phrase>
+ <phrase role="keyword">template</phrase></computeroutput> instead.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_array">is_array</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_complex">is_complex</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_enum">is_enum</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ The following traits are made up of the union of one or more type categorizations.
+ A type may belong to more than one of these categories, in addition to
+ one of the primary categories.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_compound">is_compound</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_object">is_object</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_scalar">is_scalar</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.properties">
+ <title><link linkend="boost_typetraits.category.value_traits.properties">
+ General Type Properties</link></title>
+ <para>
+ The following templates describe the general properties of a type.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.alignment_of">alignment_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_abstract">is_abstract</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_const">is_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_empty">is_empty</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_signed">is_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_volatile">is_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.extent">extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.relate">
+ <title><link linkend="boost_typetraits.category.value_traits.relate"> Relationships
+ Between Two Types</link></title>
+ <para>
+ These templates determine the whether there is a relationship between two
+ types:
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_base_of">is_base_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.category.transform">
+ <title><link linkend="boost_typetraits.category.transform"> Type Traits that
+ Transform One Type to Another</link></title>
+ <para>
+ The following templates transform one type to another, based upon some well-defined
+ rule. Each template has a single member called <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of applying the transformation to the template argument
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_const">add_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_cv">add_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_pointer">add_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_volatile">add_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.decay">decay</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_signed">make_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_unsigned">make_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.promote">promote</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_const">remove_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_cv">remove_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_reference">remove_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link><phrase role="special">;</phrase>
+</programlisting>
+ <anchor id="boost_typetraits.category.transform.broken_compiler_workarounds_"></anchor>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
+ Compiler Workarounds:</link>
+ </bridgehead>
+ <para>
+ For all of these templates support for partial specialization of class templates
+ is required to correctly implement the transformation. On the other hand,
+ practice shows that many of the templates from this category are very useful,
+ and often essential for implementing some generic libraries. Lack of these
+ templates is often one of the major limiting factors in porting those libraries
+ to compilers that do not yet support this language feature. As some of these
+ compilers are going to be around for a while, and at least one of them is
+ very wide-spread, it was decided that the library should provide workarounds
+ where possible.
+ </para>
+ <para>
+ The basic idea behind the workaround is to manually define full specializations
+ of all type transformation templates for all fundamental types, and all their
+ 1st and 2nd rank cv-[un]qualified derivative pointer types, and to provide
+ a user-level macro that will define all the explicit specializations needed
+ for any user-defined type T.
+ </para>
+ <para>
+ The first part guarantees the successful compilation of something like this:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="special">...</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="
identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+</programlisting>
+ <para>
+ and the second part provides the library's users with a mechanism to make
+ the above code work not only for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput> or other built-in type,
+ but for their own types as well:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">namespace</phrase> <phrase role="identifier">myspace</phrase><phrase role="special">{</phrase>
+ <phrase role="keyword">struct</phrase> <phrase role="identifier">MyClass</phrase> <phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+<phrase role="comment">// declare this at global scope:
+</phrase><phrase role="identifier">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase><phrase role="special">(</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">)</phrase>
+<phrase role="comment">// transformations on myspace::MyClass now work:
+</phrase><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="comment">// etc.
+</phrase></programlisting>
+ <para>
+ Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates
+ to nothing on those compilers that <emphasis role="bold">do</emphasis> support
+ partial specialization.
+ </para>
+ </section>
+ <section id="boost_typetraits.category.alignment">
+ <title><link linkend="boost_typetraits.category.alignment"> Synthesizing Types
+ with Specific Alignments</link></title>
+ <para>
+ Some low level memory management routines need to synthesize a POD type with
+ specific alignment properties. The template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link></computeroutput>
+ finds the smallest type with a specified alignment, while template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link></computeroutput>
+ creates a type with a specific size and alignment.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.function">
+ <title><link linkend="boost_typetraits.category.function"> Decomposing Function
+ Types</link></title>
+ <para>
+ The class template <link linkend="boost_typetraits.reference.function_traits">function_traits</link>
+ extracts information from function types (see also <link linkend="boost_typetraits.reference.is_function">is_function</link>).
+ This traits class allows you to tell how many arguments a function takes,
+ what those argument types are, and what the return type is.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.function_traits">function_traits</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.user_defined">
+ <title><link linkend="boost_typetraits.user_defined"> User Defined Specializations</link></title>
+ <para>
+ 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::<link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ or boost::<link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ as appropriate:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_pod</phrase><phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_union</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">char</phrase> <phrase role="identifier">c</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special"><</phrase><phrase role="identifier">my_pod</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.intrinsics">
+ <title><link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link></title>
+ <para>
+ 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
+ of additional help from the compiler is required. Currently (April 2008) Visual
+ C++ 8 and 9, GNU GCC 4.3 and MWCW 9 provide the necessary intrinsics, and other
+ compilers will no doubt follow in due course.
+ </para>
+ <para>
+ The Following traits classes always need compiler support to do the right thing
+ for all types (but all have safe fallback positions if this support is unavailable):
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_union">is_union</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_pod">is_pod</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes can't be portably implemented in the C++ language,
+ although in practice, the implementations do in fact do the right thing on
+ all the compilers we know about:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_empty">is_empty</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes are dependent on one or more of the above:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_class">is_class</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The hooks for compiler-intrinsic support are defined in <ulink url="../../../../boost/type_traits/intrinsics.hpp">boost/type_traits/intrinsics.hpp</ulink>,
+ adding support for new compilers is simply a matter of defining one of more
+ of the following macros:
+ </para>
+ <table frame="all"> <title>Macros for Compiler Intrinsics</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_UNION(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a union type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POD(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a POD type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_EMPTY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an empty struct or union
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if the default constructor for T is trivial (i.e.
+ has no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial copy constructor (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial assignment operator (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial destructor (i.e. ~T() has
+ no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">x</phrase><phrase role="special">;</phrase></computeroutput>
+ can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">(</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">t</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">u</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">t</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">u</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_VIRTUAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true T has a virtual destructor
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ABSTRACT(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an abstract type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_BASE_OF(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a base class of U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CLASS(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a class type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CONVERTIBLE(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is convertible to U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ENUM(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true is T is an enum
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POLYMORPHIC(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a polymorphic type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_ALIGNMENT_OF(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to the alignment requirements of type T.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.mpl">
+ <title><link linkend="boost_typetraits.mpl"> MPL Interoperability</link></title>
+ <para>
+ All the value based traits in this library conform to MPL's requirements for
+ an <ulink url="../../../../libs/mpl/doc/refmanual/integral-constant.html">Integral
+ Constant type</ulink>: that includes a number of rather intrusive workarounds
+ for broken compilers.
+ </para>
+ <para>
+ Purely as an implementation detail, this means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">true_</phrase></computeroutput></ulink>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">false_</phrase></computeroutput></ulink>,
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">v</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/integral-c.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">integral_c</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">v</phrase><phrase role="special">></phrase></computeroutput></ulink>
+ (provided <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>)
+ </para>
+ </section>
+ <section id="boost_typetraits.examples">
+ <title><link linkend="boost_typetraits.examples"> Examples</link></title>
+ <section id="boost_typetraits.examples.copy">
+ <title><link linkend="boost_typetraits.examples.copy"> An Optimized Version
+ of std::copy</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">copy</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ to optimise the copy operation (see <ulink url="../../examples/copy_example.cpp">copy_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// opt::copy
+</phrase><phrase role="comment">// same semantics as std::copy
+</phrase><phrase role="comment">// calls memcpy where appropriate.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">></phrase>
+<phrase role="identifier">I2</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">>&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">out</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">memcpy</phrase><phrase role="special">(</phrase><phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="special">(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">)*</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">));</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">+(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can copy with memcpy if T has a trivial assignment operator,
+</phrase> <phrase role="comment">// and if the iterator arguments are actually pointers (this last
+</phrase> <phrase role="comment">// requirement we detect with overload resolution):
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I1</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special"><</phrase><phrase role="identifier">value_type</phrase><phrase role="special">>());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.fill">
+ <title><link linkend="boost_typetraits.examples.fill"> An Optimised Version
+ of std::fill</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">fill</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memset</phrase></computeroutput>
+ to optimise the fill operation (see <ulink url="../../examples/fill_example.cpp">fill_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// fill
+</phrase><phrase role="comment">// same as std::fill, but uses memset where appropriate
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">>&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">first</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">memset</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can do an optimised fill if T has a trivial assignment
+</phrase> <phrase role="comment">// operator and if it's size is one:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase> <phrase role="special">&&</phrase> <phrase role="special">(</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)></phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.destruct">
+ <title><link linkend="boost_typetraits.examples.destruct"> An Example that
+ Omits Destructor Calls For Types with Trivial Destructors</link></title>
+ <para>
+ Demonstrates a simple algorithm that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">__has_trivial_destruct</phrase></computeroutput>
+ to determine whether to destructors need to be called (see <ulink url="../../examples/trivial_destructor_example.cpp">trivial_destructor_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// algorithm destroy_array:
+</phrase><phrase role="comment">// The reverse of std::unitialized_copy, takes a block of
+</phrase><phrase role="comment">// initialized memory and calls destructors on all objects therein.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="identifier">first</phrase><phrase role="special">->~</phrase><phrase role="identifier">T</phrase><phrase role="special">();</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase> <phrase role="comment">// namespace detail
+</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p2</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">p2</phrase><phrase role="special">,</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.iter">
+ <title><link linkend="boost_typetraits.examples.iter"> An improved Version
+ of std::iter_swap</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase></computeroutput>
+ of it's dereferenced arguments (the same as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <ulink url="../../examples/iter_swap_example.cpp">iter_swap_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// iter_swap:
+</phrase><phrase role="comment">// tests whether iterator is a proxying iterator or not, and
+</phrase><phrase role="comment">// uses optimal form accordingly:
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">></phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">v_t</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">v_t</phrase> <phrase role="identifier">v</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">one</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">one</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">two</phrase> <phrase role="special">=</phrase> <phrase role="identifier">v</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">></phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">using</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">swap</phrase><phrase role="special">(*</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">iter_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">two</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// See is both arguments are non-proxying iterators,
+</phrase> <phrase role="comment">// and if both iterator the same type:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I1</phrase><phrase role="special">>::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r1_t</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I2</phrase><phrase role="special">>::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">;</phrase>
+
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special"><</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special"><</phrase><phrase role="identifier">r2_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special"><</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">></phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.to_double">
+ <title><link linkend="boost_typetraits.examples.to_double"> Convert Numeric
+ Types and Enums to double</link></title>
+ <para>
+ Demonstrates a conversion of <ulink url="../../../../libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types">Numeric
+ Types</ulink> and enum types to double:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">double</phrase> <phrase role="identifier">to_double</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">promoted</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric</phrase><phrase role="special">::</phrase><phrase role="identifier">converter</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase><phrase role="identifier">promoted</phrase><phrase role="special">>::</phrase><phrase role="identifier">convert</phrase><phrase role="special">(</phrase><phrase role="identifier">value</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.reference">
+ <title><link linkend="boost_typetraits.reference"> Alphabetical Reference</link></title>
+ <section id="boost_typetraits.reference.add_const">
+ <title><link linkend="boost_typetraits.reference.add_const"> add_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_cv">
+ <title><link linkend="boost_typetraits.reference.add_cv"> add_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_pointer">
+ <title><link linkend="boost_typetraits.reference.add_pointer"> add_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ <para>
+ The rationale for this template is that it produces the same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">TYPEOF</phrase><phrase role="special">(&</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput>, where
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">t</phrase></computeroutput> is an object of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_reference">
+ <title><link linkend="boost_typetraits.reference.add_reference"> add_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is not a reference type then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">&</phrase></computeroutput>, otherwise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_volatile">
+ <title><link linkend="boost_typetraits.reference.add_volatile"> add_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.aligned_storage">
+ <title><link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">aligned_storage</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with size
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Size</phrase></computeroutput> and an alignment that
+ is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">aligned_storage</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.alignment_of">
+ <title><link linkend="boost_typetraits.reference.alignment_of"> alignment_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">alignment_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template alignment<emphasis role="underline">of inherits from `</emphasis>_integral_constant<std::size_t,
+ ALIGNOF(T)><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">,</phrase> <phrase role="identifier">where</phrase>
+ </computeroutput>ALIGNOF(T)` is the alignment of type T.
+ </para>
+ <para>
+ <emphasis>Note: strictly speaking you should only rely on the value of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> 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.</emphasis>
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">alignment_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">char</phrase><phrase role="special">)></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ with value <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.decay">
+ <title><link linkend="boost_typetraits.reference.decay"> decay</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">decay</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> Let <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ be the result of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>, then if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ is an array type, the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">>*</phrase></computeroutput>,
+ otherwise if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput> is a function
+ type then the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase><phrase role="special">*</phrase></computeroutput>, otherwise the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">decay</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">(&)[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">(&)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.extent">
+ <title><link linkend="boost_typetraits.reference.extent"> extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">extent</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template extent inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)></phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is the number of elements in the N'th array
+ dimention of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">N</phrase> <phrase role="special">></phrase>
+ <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>, or if the N'th array bound is incomplete,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">],</phrase>
+ <phrase role="number">1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>4</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">],</phrase> <phrase role="number">1</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.floating_point_promotion">
+ <title><link linkend="boost_typetraits.reference.floating_point_promotion">
+ floating_point_promotion</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">floating_point_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If floating point promotion can be
+ applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies floating point promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">float</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.function_traits">
+ <title><link linkend="boost_typetraits.reference.function_traits"> function_traits</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">F</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">function_traits</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">arity</phrase> <phrase role="special">=</phrase> <replaceable>see-below</replaceable><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">result_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> arg<replaceable>N</replaceable>_type<phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The class template function_traits will only compile if:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The compiler supports partial specialization of class templates.
+ </listitem>
+ <listitem>
+ The template argument <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>
+ is a <emphasis>function type</emphasis>, note that this <emphasis><emphasis role="bold">is not</emphasis></emphasis> the same thing as a <emphasis>pointer
+ to a function</emphasis>.
+ </listitem>
+ </itemizedlist>
+ <tip>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link>.
+ </para>
+ </tip>
+ <table frame="all"> <title>Function Traits Members</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Member
+ </para>
+ </entry><entry>
+ <para>
+ Description
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that gives the number of arguments
+ accepted by the function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type returned by function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase>arg<replaceable>N</replaceable>_type</computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The <replaceable>N</replaceable>th argument type of function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="number">1</phrase> <phrase role="special"><=</phrase>
+ <phrase role="identifier">N</phrase> <phrase role="special"><=</phrase>
+ <phrase role="identifier">arity</phrase></computeroutput> of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 0.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 1.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 4.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">long</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arg1_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arg4_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arg5_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: there is no <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">arg5_type</phrase></computeroutput>
+ since there are only four arguments.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: argument type is a <emphasis>function pointer</emphasis>,
+ and not a <emphasis>function type</emphasis>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_assign">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_assign"> has_nothrow_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_assign</phrase></computeroutput>
+ 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".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_constructor">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_constructor">
+ has_nothrow_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_constructor</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_copy">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_copy"> has_nothrow_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_copy</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_cp_cons"> has_nothrow_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_no_throw_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_no_throw_def_cons"> has_nothrow_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_assign">
+ <title><link linkend="boost_typetraits.reference.has_trivial_assign"> has_trivial_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p11.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_constructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_constructor">
+ has_trivial_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ If a type has a trivial default-constructor then the constructor have no
+ effect: calls to the constructor can be safely omitted. Note that using meta-programming
+ to omit a call to a single trivial-constructor call is of no benefit whatsoever.
+ However, if loops and/or exception handling code can also be omitted, then
+ some benefit in terms of code size and speed can be obtained.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.1p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_copy">
+ <title><link linkend="boost_typetraits.reference.has_trivial_copy"> has_trivial_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_cp_cons"> has_trivial_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_def_cons"> has_trivial_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_destructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_destructor"> has_trivial_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ If a type has a trivial destructor then the destructor has no effect: calls
+ to the destructor can be safely omitted. Note that using meta-programming
+ to omit a call to a single trivial-constructor call is of no benefit whatsoever.
+ However, if loops and/or exception handling code can also be omitted, then
+ some benefit in terms of code size and speed can be obtained.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4p3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_virtual_destructor">
+ <title><link linkend="boost_typetraits.reference.has_virtual_destructor"> has_virtual_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_virtual_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a virtual destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ and has to be explicitly specialized for types with virtual destructors unless
+ the compiler used has compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ that enable the trait to do the right thing: currently (May 2005) only Visual
+ C++ 8 and GCC-4.3 have the necessary <link linkend="boost_typetraits.intrinsics">intrinsics</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_virtual_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_constant">
+ <title><link linkend="boost_typetraits.reference.integral_constant"> integral_constant</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">val</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_constant</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">></phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">true</phrase><phrase role="special">></phrase> <phrase role="identifier">true_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">false</phrase><phrase role="special">></phrase> <phrase role="identifier">false_type</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ Class template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_constant</phrase></computeroutput>
+ is the common base class for all the value-based type traits. The two typedef's
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">true_type</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">false_type</phrase></computeroutput> are provided for convenience:
+ most of the value traits are Boolean properties and so will inherit from
+ one of these.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_promotion">
+ <title><link linkend="boost_typetraits.reference.integral_promotion"> integral_promotion</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral promotion can be applied
+ to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>, then
+ applies integral promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field).
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">integral_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">enum</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">float_round_style</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.is_abstract">
+ <title><link linkend="boost_typetraits.reference.is_abstract"> is_abstract</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_abstract</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ abstract type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_abstract</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>;
+ 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
+ this in their own code if the "safe fallback" is not suitable for
+ their particular use-case.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">abc</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">abc</phrase><phrase role="special">()</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_arithmetic">
+ <title><link linkend="boost_typetraits.reference.is_arithmetic"> is_arithmetic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_arithmetic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ arithmetic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Arithmetic types include integral and floating point types (see also <link linkend="boost_typetraits.reference.is_integral">is_integral</link> and
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_arithmetic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_array">
+ <title><link linkend="boost_typetraits.reference.is_array"> is_array</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_array</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ array type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_array</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can give the wrong result with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_base_of">
+ <title><link linkend="boost_typetraits.reference.is_base_of"> is_base_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_base_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If Base is base class of type
+ Derived or if both types are the same then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ This template will detect non-public base classes, and ambiguous base classes.
+ </para>
+ <para>
+ Note that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">X</phrase><phrase role="special">,</phrase><phrase role="identifier">X</phrase><phrase role="special">></phrase></computeroutput> will always inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>.
+ <emphasis role="bold">This is the case even if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">X</phrase></computeroutput>
+ is not a class type</emphasis>. This is a change in behaviour from Boost-1.33
+ in order to track the Technical Report on C++ Library Extensions.
+ </para>
+ <para>
+ Types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput> must not be incomplete types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_base_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput>
+ is a private base class of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> is an ambiguous
+ base of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>. These compilers
+ include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and
+ older versions of EDG based compilers.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase> <phrase role="special">:</phrase>
+ <phrase role="keyword">public</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Base</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>: a class is regarded as it's
+ own base.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_class">
+ <title><link linkend="boost_typetraits.reference.is_class"> is_class</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_class</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ class type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link> for
+ union types. See also <link linkend="boost_typetraits.reference.is_union">is_union</link>.
+ Currently (May 2005) only Visual C++ 8 has the necessary compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to correctly identify union types, and therefore make is_class function correctly.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">MyClass</phrase><phrase role="special">;</phrase></computeroutput> then:
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_complex">
+ <title><link linkend="boost_typetraits.reference.is_complex"> is_complex</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_complex</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is a complex number type then true (of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">complex</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">></phrase></computeroutput>
+ for some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>), otherwise
+ false.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 26.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_complex</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_compound">
+ <title><link linkend="boost_typetraits.reference.is_compound"> is_compound</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_compound</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ compound type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Any type that is not a fundamental type is a compound type (see also <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_compound</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">MyEnum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_const">
+ <title><link linkend="boost_typetraits.reference.is_const"> is_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_const</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) const-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_convertible">
+ <title><link linkend="boost_typetraits.reference.is_convertible"> is_convertible</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_convertible</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If an imaginary lvalue of type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> is convertible to type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput> then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type From must not be an incomplete type.
+ </para>
+ <para>
+ Type To must not be an incomplete, or function type.
+ </para>
+ <para>
+ No types are considered to be convertible to array types or abstract-class
+ types.
+ </para>
+ <para>
+ This template can not detect whether a converting-constructor is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput> or not: if type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">private</phrase></computeroutput> converting constructor
+ from type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> then instantiating
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase></computeroutput>
+ will produce a compiler error. For this reason <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase></computeroutput>
+ can not be used to determine whether a type has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput>
+ copy-constructor or not.
+ </para>
+ <para>
+ This template will also produce compiler errors if the conversion is ambiguous,
+ for example:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">B</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">C</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">D</phrase> <phrase role="special">:</phrase> <phrase role="identifier">B</phrase><phrase role="special">,</phrase> <phrase role="identifier">C</phrase> <phrase role="special">{};</phrase>
+<phrase role="comment">// This produces a compiler error, the conversion is ambiguous:
+</phrase><phrase role="keyword">bool</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">y</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">D</phrase><phrase role="special">*,</phrase><phrase role="identifier">A</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4 and 8.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></computeroutput>,
+ then the template parameter <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ must not be an abstract type.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the conversion would require a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const_cast</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&,</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_empty">
+ <title><link linkend="boost_typetraits.reference.is_empty"> is_empty</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_empty</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an empty class type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10p5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_empty</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> In order to correctly
+ detect empty classes this trait relies on either:
+ </para>
+ <itemizedlist>
+ <listitem>
+ the compiler implementing zero sized empty base classes, or
+ </listitem>
+ <listitem>
+ the compiler providing <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect empty classes.
+ </listitem>
+ </itemizedlist>
+ <para>
+ Can not be used with incomplete types.
+ </para>
+ <para>
+ Can not be used with union types, until is_union can be made to work.
+ </para>
+ <para>
+ If the compiler does not support partial-specialization of class templates,
+ then this template can not be used with abstract types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">empty_class</phrase>
+ <phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_enum">
+ <title><link linkend="boost_typetraits.reference.is_enum"> is_enum</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_enum</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ enum type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_enum</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> Requires a correctly
+ functioning <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">enum</phrase> <phrase role="identifier">my_enum</phrase>
+ <phrase role="special">{</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_floating_point">
+ <title><link linkend="boost_typetraits.reference.is_floating_point"> is_floating_point</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_floating_point</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ floating point type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_floating_point</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_function">
+ <title><link linkend="boost_typetraits.reference.is_function"> is_function</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_function</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ function type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Note that this template does not detect <emphasis>pointers to functions</emphasis>,
+ or <emphasis>references to functions</emphasis>, these are detected by <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> and <link linkend="boost_typetraits.reference.is_reference">is_reference</link> respectively:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">f1</phrase><phrase role="special">();</phrase> <phrase role="comment">// f1 is of function type.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f2</phrase><phrase role="special">*)();</phrase> <phrase role="comment">// f2 is a pointer to a function.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f3</phrase><phrase role="special">&)();</phrase> <phrase role="comment">// f3 is a reference to a function.
+</phrase></programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p1 and 8.3.5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_function</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer type, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(&)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a reference to a function, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer to a member function.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <tip>
+ <para>
+ Don't confuse function-types with pointers to functions:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="identifier">f</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">);</phrase></computeroutput>
+ </para>
+ <para>
+ defines a function type,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase> <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a prototype for a function of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase></computeroutput>,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">*</phrase>
+ <phrase role="identifier">pf</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">&</phrase>
+ <phrase role="identifier">fr</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a pointer and a reference to the function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">foo</phrase></computeroutput>.
+ </para>
+ <para>
+ If you want to detect whether some type is a pointer-to-function then use:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special"><</phrase><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ </para>
+ <para>
+ or for pointers to member functions you can just use <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ directly.
+ </para>
+ </tip>
+ </section>
+ <section id="boost_typetraits.reference.is_fundamental">
+ <title><link linkend="boost_typetraits.reference.is_fundamental"> is_fundamental</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_fundamental</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ fundamental type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Fundamental types include integral, floating point and void types (see also
+ <link linkend="boost_typetraits.reference.is_integral">is_integral</link>,
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>
+ and <link linkend="boost_typetraits.reference.is_void">is_void</link>)
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_fundamental</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_integral">
+ <title><link linkend="boost_typetraits.reference.is_integral"> is_integral</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_integral</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ integral type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p7.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_integral</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_function_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_function_pointer">
+ is_member_function_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_function_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member function then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a data member and not a member
+ function, see <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_object_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_object_pointer">
+ is_member_object_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_object_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member object (a data member) then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a member function and not a
+ member object, see <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_pointer"> is_member_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member (either a function or a data member) then inherits from
+ <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_object">
+ <title><link linkend="boost_typetraits.reference.is_object"> is_object</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_object</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ object type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ All types are object types except references, void, and function types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_object</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: reference types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: function types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ void is not an object type
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pod">
+ <title><link linkend="boost_typetraits.reference.is_pod"> is_pod</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pod</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ POD type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ POD stands for "Plain old data". Arithmetic types, and enumeration
+ types, a pointers and pointer to members are all PODs. Classes and unions
+ can also be POD's if they have no non-static data members that are of reference
+ or non-POD type, no user defined constructors, no user defined assignment
+ operators, no private or protected non-static data members, no virtual functions
+ and no base classes. Finally, a cv-qualified POD is still a POD, as is an
+ array of PODs.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10 and 9p4 (Note
+ that POD's are also aggregates, see 8.5.1).
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, is<emphasis role="underline">pod
+ will never report that a class or struct is a POD; this is always safe, if
+ possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have
+ the necessary compiler-</emphasis>_intrinsics.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pointer">
+ <title><link linkend="boost_typetraits.reference.is_pointer"> is_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer type (includes function pointers, but excludes pointers to members)
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p2 and 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <important>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput> detects "real"
+ pointer types only, and <emphasis>not</emphasis> smart pointers. Users
+ should not specialise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput>
+ 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
+ general to auto-magically detect smart pointer types, so such a trait would
+ have to be partially specialised for each supported smart pointer type.
+ </para>
+ </important>
+ </section>
+ <section id="boost_typetraits.reference.is_polymorphic">
+ <title><link linkend="boost_typetraits.reference.is_polymorphic"> is_polymorphic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_polymorphic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ polymorphic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> The implementation
+ requires some knowledge of the compilers ABI, it does actually seem to work
+ with the majority of compilers though.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_polymorphic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">poly</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">poly</phrase><phrase role="special">();</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_same">
+ <title><link linkend="boost_typetraits.reference.is_same"> is_same</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_same</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T and U are the same types
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_same</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with abstract, incomplete or function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_scalar">
+ <title><link linkend="boost_typetraits.reference.is_scalar"> is_scalar</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_scalar</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ scalar type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Scalar types include integral, floating point, enumeration, pointer, and
+ pointer-to-member types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_scalar</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_signed">
+ <title><link linkend="boost_typetraits.reference.is_signed"> is_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_signed</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an signed integer type
+ or an enumerated type with an underlying signed integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">myclass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_stateless">
+ <title><link linkend="boost_typetraits.reference.is_stateless"> is_stateless</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_stateless</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Ff T is a stateless type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type T must be a complete type.
+ </para>
+ <para>
+ A stateless type is a type that has no storage and whose constructors and
+ destructors are trivial. That means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_stateless</phrase></computeroutput>
+ only inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the following expression is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">true</phrase></computeroutput>:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_stateless</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this template work automatically.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_reference">
+ <title><link linkend="boost_typetraits.reference.is_reference"> is_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_reference</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a reference pointer type
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(&)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis> (the argument in this case
+ is a reference to a function).
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_union">
+ <title><link linkend="boost_typetraits.reference.is_union"> is_union</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_union</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ union type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Currently requires some kind of compiler support, otherwise unions are identified
+ as classes.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this trait "just work" without user intervention.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_unsigned">
+ <title><link linkend="boost_typetraits.reference.is_unsigned"> is_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_unsigned</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an unsigned integer type
+ or an enumerated type with an underlying unsigned integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="identifier">myclass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_void">
+ <title><link linkend="boost_typetraits.reference.is_void"> is_void</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_void</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ void type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_void</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_volatile">
+ <title><link linkend="boost_typetraits.reference.is_volatile"> is_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_volatile</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) volatile-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">volatile</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase>
+ <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the volatile qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.make_signed">
+ <title><link linkend="boost_typetraits.reference.make_signed"> make_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_signed</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.make_unsigned">
+ <title><link linkend="boost_typetraits.reference.make_unsigned"> make_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_unsigned</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.promote">
+ <title><link linkend="boost_typetraits.reference.promote"> promote</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">promote</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral or floating point promotion
+ can be applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies integral and floating point promotions to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ See also <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link>
+ and <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field) and 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">promote</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.rank">
+ <title><link linkend="boost_typetraits.reference.rank"> rank</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">rank</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template rank inherits from
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)></phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is the
+ number of array dimensions in type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">rank</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[]></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>1</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.remove_all_extents">
+ <title><link linkend="boost_typetraits.reference.remove_all_extents"> remove_all_extents</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_all_extents</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes all of the array bounds on <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_all_extents</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_const">
+ <title><link linkend="boost_typetraits.reference.remove_const"> remove_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> const-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_cv">
+ <title><link linkend="boost_typetraits.reference.remove_cv"> remove_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> cv-qualifiers removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_extent">
+ <title><link linkend="boost_typetraits.reference.remove_extent"> remove_extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_extent</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes the topmost array bound, otherwise leaves
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_pointer">
+ <title><link linkend="boost_typetraits.reference.remove_pointer"> remove_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any pointer modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">**>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_reference">
+ <title><link linkend="boost_typetraits.reference.remove_reference"> remove_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any reference modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_volatile">
+ <title><link linkend="boost_typetraits.reference.remove_volatile"> remove_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> volatile-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.type_with_alignment">
+ <title><link linkend="boost_typetraits.reference.type_with_alignment"> type_with_alignment</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">type_with_alignment</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with an alignment
+ that is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">type_with_alignment</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ </section>
+ <section id="boost_typetraits.credits">
+ <title><link linkend="boost_typetraits.credits"> Credits</link></title>
+ <para>
+ This documentation was pulled together by John Maddock, using <ulink url="../../../../doc/html/quickbook.html">Boost.Quickbook</ulink>
+ and <ulink url="../../../../doc/html/boostbook.html">Boost.DocBook</ulink>.
+ </para>
+ <para>
+ The original version of this library was created by Steve Cleary, Beman Dawes,
+ Howard Hinnant, and John Maddock. John Maddock is the current maintainer of
+ the library.
+ </para>
+ <para>
+ This version of type traits library is based on contributions by Adobe Systems
+ Inc, David Abrahams, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
+ Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Thorsten Ottosen, Robert
+ Ramey and Jeremy Siek.
+ </para>
+ <para>
+ Mat Marcus and Jesse Jones invented, and <ulink url="http://opensource.adobe.com/project4/project.shtml">published
+ a paper describing</ulink>, the partial specialization workarounds used in
+ this library.
+ </para>
+ <para>
+ Aleksey Gurtovoy added MPL integration to the library.
+ </para>
+ <para>
+ The <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ template is based on code originally devised by Andrei Alexandrescu, see "<ulink url="http://www.cuj.com/experts/1810/alexandr.htm?topic=experts">Generic<Programming>:
+ Mappings between Types and Values</ulink>".
+ </para>
+ <para>
+ The latest version of this library and documentation can be found at <ulink url="http://www.boost.org">www.boost.org</ulink>. Bugs, suggestions and discussion
+ should be directed to boost_at_[hidden] (see <ulink url="http://www.boost.org/more/mailing_lists.htm#main">www.boost.org/more/mailing_lists.htm#main</ulink>
+ for subscription details).
+ </para>
+ </section>
+
+ <appendix>
+ <title>Class Index</title>
+ <para><link linkend="idx_id_0">A</link> <link linkend="idx_id_1">C</link> <link linkend="idx_id_2">D</link> <link linkend="idx_id_3">E</link> <link linkend="idx_id_4">F</link> <link linkend="idx_id_5">H</link> <link linkend="idx_id_6">I</link> <link linkend="idx_id_7">M</link> <link linkend="idx_id_8">P</link> <link linkend="idx_id_9">R</link> <link linkend="idx_id_10">T</link> </para><variablelist><varlistentry id="idx_id_0"><term>A</term><listitem><variablelist><varlistentry><term>add_const</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_const">add_const</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Constrained Index Term</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistent
ry><term>add_cv</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_cv">add_cv</link></para></member><member><para><link linkend="boost_typetraits.reference.add_cv">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_pointer">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.add_pointer">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.add_pointer">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_reference</term><listitem><simplelist><member><p
ara><link linkend="boost_typetraits.reference.add_reference">add_reference</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.add_reference">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member><member><para><link linkend="boost_typetraits.background">Using add_reference to synthesize the correct constructor type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_volatile">add_volatile</link></para></member><member><para><link linkend="boost_typetraits.reference.add_volatile">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member><
/simplelist></listitem></varlistentry><varlistentry><term>alignment_of</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.alignment_of">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_1"><term>C</term><listitem><variablelist><varlistentry><term>Constrained Index Term</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_const">add_const</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Examples</link></para></member></simplelist></listitem></v
arlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_2"><term>D</term><listitem><variablelist><varlistentry><term>decay</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_3"><term>E</term><listitem><variablelist><varlistentry><term>extent</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_
typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.extent">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.reference.extent">rank</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_4"><term>F</term><listitem><variablelist><varlistentry><term>floating_point_promotion</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.floating_point_promotion">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost_type
traits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>function_traits</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.function">Decomposing Function Types</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">Function Traits Members</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">result_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_5"><term>H</term><listitem><variablelist><varlistentry
><term>has_nothrow_assign</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.
reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_copy</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy_constructor</link></para></member><member
><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_copy_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_cp_cons">has_nothrow_copy_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_default_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has
_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_no_throw_def_cons">has_nothrow_default_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_assign</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.fill">An Optimised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.intri
nsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link link
end="boost_typetraits.reference.has_trivial_constructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_copy</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">true_type</link></para></member></simplelist></listitem></varlistent
ry><varlistentry><term>has_trivial_copy_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_cp_cons">has_trivial_copy_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_default_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_def_cons">has_trivial_default_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_d
estructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_virtual_destructor</term><listitem><simplelist><member><para><link l
inkend="boost_typetraits.reference.has_virtual_destructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_6"><term>I</term><listitem><variablelist><varlistentry><term>integral_constant</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><lin
k linkend="boost_typetraits.examples.fill">An Optimised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.reference.rank">rank</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">true_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>
integral_promotion</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.integral_promotion">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_abstract</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_abstract">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link
></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_arithmetic</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">true_type</link></para></member></simplelist></listitem></varlistentry><varlisten
try><term>is_array</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_base_of</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_base_of">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">true_type</link></para></member></simplelist></listitem></varlist
entry><varlistentry><term>is_class</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_complex</term><listitem><simplelist><member><para><link link
end="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_compound</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">true_type</link></para></mem
ber></simplelist></listitem></varlistentry><varlistentry><term>is_const</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_const">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_convertible</term><listitem><simplelist><member><para><link linkend="boost_typetraits.credits">Credits</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></mem
ber><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_empty</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_empty">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for
Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_enum</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_floating_point</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.referen
ce.is_floating_point">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_function</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.category.function">Decomposing Function Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></
member><member><para><link linkend="boost_typetraits.reference.is_function">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_fundamental</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.
is_fundamental">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_integral</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><p
ara><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_member_function_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_pointer</link></pa
ra></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_member_object_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentr
y><term>is_member_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_object</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetra
its.reference.is_object">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_pod</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_pod">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry
><varlistentry><term>is_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_polymorphic</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_polymorphic">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><m
ember><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_reference</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.refer
ence.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_same</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">true_type</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_scalar</term><listitem><simplelist
><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_signed</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_signed">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_stateless</term><listi
tem><simplelist><member><para><link linkend="boost_typetraits.reference.is_stateless">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link
linkend="boost_typetraits.reference.is_stateless">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_union</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist><
/listitem></varlistentry><varlistentry><term>is_unsigned</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_unsigned">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_void</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</li
nk></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_volatile">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">is_volatile</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_7"><term>M</term><listitem><variablelist><varlistentry><term>make_signed</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.make_signed">Exampl
es</link></para></member><member><para><link linkend="boost_typetraits.reference.make_signed">make_signed</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>make_unsigned</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.make_unsigned">make_unsigned</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_8"><term>P</term><listitem><variablelist><varlistentry><term>promote</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.to_double">Convert Numeric Types and Enums to double</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">Examples</link></par
a></member><member><para><link linkend="boost_typetraits.reference.promote">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_9"><term>R</term><listitem><variablelist><varlistentry><term>rank</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.rank">integral_constant</link></para></member><member><para><link linkend="boost_typetrait
s.reference.rank">rank</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_all_extents</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_all_extents">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_const</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_const">Examples</link></para></member><member><para><link linkend="boost_
typetraits.reference.remove_const">remove_const</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_cv</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_cv">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_cv">remove_cv</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_extent</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_extent">Examples</link></para>
</member><member><para><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_pointer">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_reference</term><listitem><simplelist><memb
er><para><link linkend="boost_typetraits.reference.add_pointer">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_reference">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_reference">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_volatile">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></va
rlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_10"><term>T</term><listitem><variablelist><varlistentry><term>type_with_alignment</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.alignment">Synthesizing Types with Specific Alignments</link></para></member><member><para><link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry></variablelist></appendix>
+ <appendix>
+ <title>Typedef Index</title>
+ <para><link linkend="idx_id_11">F</link> <link linkend="idx_id_12">R</link> <link linkend="idx_id_13">T</link> </para><variablelist><varlistentry id="idx_id_11"><term>F</term><listitem><variablelist><varlistentry><term>false_type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para
><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.intro">Introduction</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><p
ara><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="
boost_typetraits.reference.is_floating_point">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.referen
ce.is_pointer">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">is_union</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile"
>is_volatile</link></para></member><member><para><link linkend="boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_12"><term>R</term><listitem><variablelist><varlistentry><term>result_type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.function_traits">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">Function Traits Members</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_13"><term>T</term><listitem><variablelist><varlistentry><term>true_type</term><listitem><simplelist><member><para><link linkend="boost_ty
petraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.examples.fill">An Optimised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has
_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.intro">Introduction</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_
arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point<
/link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">is_pointer</link></para></member><member><para><l
ink linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">is_union</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">is_volatile</link></para></member><member><para><link linkend="
boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry></variablelist></appendix>
+ <appendix>
+ <title>Macro Index</title>
+ <para><link linkend="idx_id_14">B</link> </para><variablelist><varlistentry id="idx_id_14"><term>B</term><listitem><variablelist><varlistentry><term>BOOST_ALIGNMENT_OF</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_ASSIGN</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_CONSTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para>
</member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_COPY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_ASSIGN</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_CONSTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_COPY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_DESTRUCTOR</term><listitem><simplelist><memb
er><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_VIRTUAL_DESTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_ABSTRACT</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_BASE_OF</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_CLASS</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlis
tentry><term>BOOST_IS_CONVERTIBLE</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_EMPTY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_ENUM</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_POD</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_POLYMORPHIC</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></me
mber></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_UNION</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry></variablelist></appendix>
+ <appendix><title>Index</title><para><link linkend="idx_id_15">A</link> <link linkend="idx_id_16">B</link> <link linkend="idx_id_17">C</link> <link linkend="idx_id_18">D</link> <link linkend="idx_id_19">E</link> <link linkend="idx_id_20">F</link> <link linkend="idx_id_21">G</link> <link linkend="idx_id_22">H</link> <link linkend="idx_id_23">I</link> <link linkend="idx_id_24">M</link> <link linkend="idx_id_25">O</link> <link linkend="idx_id_26">P</link> <link linkend="idx_id_27">R</link> <link linkend="idx_id_28">S</link> <link linkend="idx_id_29">T</link> <link linkend="idx_id_30">U</link> </para><variablelist><varlistentry id="idx_id_15"><term>A</term><listitem><variablelist><varlistentry><term>add_const</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_const">add_const</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Constrained Index Term</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">
Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_cv</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_cv">add_cv</link></para></member><member><para><link linkend="boost_typetraits.reference.add_cv">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_pointer">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.add_pointer">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.add_pointer">remove_reference</link></para></member><member><para><link linkend="b
oost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_reference</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_reference">add_reference</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.add_reference">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member><member><para><link linkend="boost_typetraits.background">Using add_reference to synthesize the correct constructor type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>add_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_volatile">add_volatile</link></para></member><member><para><link l
inkend="boost_typetraits.reference.add_volatile">Examples</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>alignment_of</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.alignment_of">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_16"><term>B</term><listitem><variablelist><varlistentry><term>Background and Tutorial</term><listitem><simplelist><membe
r><para><link linkend="boost_typetraits.background">add_reference</link></para></member><member><para><link linkend="boost_typetraits.background">false_type</link></para></member><member><para><link linkend="boost_typetraits.background">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.background">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.background">is_void</link></para></member><member><para><link linkend="boost_typetraits.background">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.background">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_ALIGNMENT_OF</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</term><listitem><simplelist><member><para><link linkend="
boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_ASSIGN</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_CONSTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_NOTHROW_COPY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_ASSIGN</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listite
m></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_CONSTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_COPY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_TRIVIAL_DESTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_HAS_VIRTUAL_DESTRUCTOR</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_ABSTRACT</term><listitem><simplelist><member><para><link linkend="boost_ty
petraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_BASE_OF</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_CLASS</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_CONVERTIBLE</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_EMPTY</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_ENUM</term><listitem>
<simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_POD</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_POLYMORPHIC</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>BOOST_IS_UNION</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">Macros for Compiler Intrinsics</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_17"><term>C</term><listitem><variablelist><varlistentry><term>Categorizing a Type</term><listitem><simplelist><member><para><link linkend="boost_typetra
its.category.value_traits.primary">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_array</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_class</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_complex</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_compound</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_enum</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_function</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.pr
imary">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_integral</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_object</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_reference</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.category.value_
traits.primary">is_union</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">is_void</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Constrained Index Term</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_const">add_const</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Examples</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Convert Numeric Types and Enums to double</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.to_double">promote</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Credits</term><listitem><simplelist><member><para><link linkend="boost_typetraits.credits">is_convertible</link></para></member></simplelist></listitem></varlistentry></
variablelist></listitem></varlistentry><varlistentry id="idx_id_18"><term>D</term><listitem><variablelist><varlistentry><term>decay</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Decomposing Function Types</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.function">function_traits</link></para></member><member><para><link linkend="boost_typetraits.category.function">is_function</link></para></member></simplelist></listitem></
varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_19"><term>E</term><listitem><variablelist><varlistentry><term>Example that Omits Destructor Calls For Types with Trivial Destructors</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">false_type</link></para></member><member><para><link linkend="boost_typetraits.examples.destruct">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.examples.destruct">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Examples</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_const">add_const</link></para></member><member><para><link linkend="boost_typetraits.reference.add_cv">add_cv</link></para></member><member><para><link linkend="boost_typetraits.reference.add_pointer">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.add_reference">add_reference</l
ink></para></member><member><para><link linkend="boost_typetraits.reference.add_volatile">add_volatile</link></para></member><member><para><link linkend="boost_typetraits.reference.add_const">Constrained Index Term</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.make_signed">make_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link></para></member><member><para><link lin
kend="boost_typetraits.reference.remove_const">remove_const</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_cv">remove_cv</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_reference">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">result_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>extent</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</lin
k></para></member><member><para><link linkend="boost_typetraits.reference.extent">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.reference.extent">rank</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_20"><term>F</term><listitem><variablelist><varlistentry><term>false_type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary"
>Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><member><para><l
ink linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.intro">Introduction</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="b
oost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_m
ember_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unio
n">is_union</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">is_volatile</link></para></member><member><para><link linkend="boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>floating_point_promotion</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.floating_point_promotion">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost
_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term><link linkend="boost_typetraits.background">Foo1</link></term><listitem><simplelist></simplelist></listitem></varlistentry><varlistentry><term>Foo2</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits">Bar2</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Function Traits Members</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">result_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>function_traits</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.function">Decomposing Function Types</link></para></member><member><para><link linkend="boost_typetraits
.reference.function_traits">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">Function Traits Members</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">result_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_21"><term>G</term><listitem><variablelist><varlistentry><term>General Type Properties</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">extent</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.proper
ties">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_nothrow_copy_constructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_nothrow_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_copy_con
structor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_const</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_empty</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_pod</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.
category.value_traits.properties">is_signed</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">is_volatile</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">rank</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_22"><term>H</term><listitem><variablelist><varlistentry><term>has_nothrow_assign</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.ha
s_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link
linkend="boost_typetraits.reference.has_nothrow_constructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_copy</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy_constructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_copy_constructor</term><listitem><simplelist><member><para><link
linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_cp_cons">has_nothrow_copy_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_nothrow_default_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_no_throw_def_cons">has_nothrow_default_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_assign</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.fill">An O
ptimised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_trivial
_constructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_default_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_copy</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">false_type</link></para></member><member><para><link linkend="boost_typetraits.c
ategory.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_copy_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend=
"boost_typetraits.reference.has_trivial_cp_cons">has_trivial_copy_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_default_constructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_def_cons">has_trivial_default_constructor</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_trivial_destructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">false_type</link></para></member><member><para><link linkend="boost_
typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>has_virtual_destructor</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><mem
ber><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_23"><term>I</term><listitem><variablelist><varlistentry><term>improved Version of std::iter_swap</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.iter">false_type</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">is_reference</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">is_same</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>integral_constant</term><listitem><simp
lelist><member><para><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.examples.fill">An Optimised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.reference.rank">rank</link></para></member><member><para><link linkend="boost_typetraits.reference.i
ntegral_constant">true_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>integral_promotion</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.integral_promotion">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Introduction</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intro">false_type</link></para></member><member><para><link linkend="boost_typetraits.intro">true_type</link></para></member>
</simplelist></listitem></varlistentry><varlistentry><term>is_abstract</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_abstract">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_arithmetic</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.i
s_arithmetic">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_array</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">true_type</link></para></member></simplelist></listitem></varlistentry><v
arlistentry><term>is_base_of</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_base_of">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_class</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><lin
k linkend="boost_typetraits.reference.is_class">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_complex</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_compound</term><listitem><simplelist><memb
er><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_const</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_const">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">true_type</li
nk></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_convertible</term><listitem><simplelist><member><para><link linkend="boost_typetraits.credits">Credits</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_empty</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_empty">false_
type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_enum</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">false_type</link></para></member><member><para><link linkend="boost_typetraits.ref
erence.is_enum">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_floating_point</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">true_type</link></para></member></simple
list></listitem></varlistentry><varlistentry><term>is_function</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.category.function">Decomposing Function Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_funct
ion">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_fundamental</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">true_type</link></para></member></simplelist></listitem>
</varlistentry><varlistentry><term>is_integral</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_member_function_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function
_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_member_object_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">false_type</link></para></member><member><para><link linkend
="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_member_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_object_pointer">is_me
mber_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_object</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_pod</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_pod">false_type</link></para></member><member><para><link linkend="boost_typetraits.category
.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para>
<link linkend="boost_typetraits.reference.is_pointer">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_polymorphic</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_polymorphic">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_reference</te
rm><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_same</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">false_type</link></para></member><member><para><link linkend="bo
ost_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">Relationships Between Two Types</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">true_type</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_scalar</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_signed</term><listite
m><simplelist><member><para><link linkend="boost_typetraits.reference.is_signed">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_stateless</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_stateless">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">has_trivial_copy</link></para></member><member><para><link linkend="bo
ost_typetraits.reference.is_stateless">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_stateless">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_union</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member
><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">is_union</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">Support for Compiler Intrinsics</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">true_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_unsigned</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_unsigned">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">true_type</link>
</para></member></simplelist></listitem></varlistentry><varlistentry><term>is_void</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">false_type</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>is_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.is_volatile">false_type</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General T
ype Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">is_volatile</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_24"><term>M</term><listitem><variablelist><varlistentry><term>Macros for Compiler Intrinsics</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">BOOST_ALIGNMENT_OF</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_NOTHROW_ASSIGN</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_NOTHROW_CONSTRUCTOR</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_NOTHROW_COPY</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_TRIVIAL_ASSIGN</link></para></member><member><para><link linkend="boost
_typetraits.intrinsics">BOOST_HAS_TRIVIAL_CONSTRUCTOR</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_TRIVIAL_COPY</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_TRIVIAL_DESTRUCTOR</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_HAS_VIRTUAL_DESTRUCTOR</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_ABSTRACT</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_BASE_OF</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_CLASS</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_CONVERTIBLE</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_EMPTY</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_ENUM</link></para></member><member><para><link linkend="boost_typetraits.
intrinsics">BOOST_IS_POD</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_POLYMORPHIC</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">BOOST_IS_UNION</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>make_signed</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.make_signed">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.make_signed">make_signed</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>make_unsigned</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.make_unsigned">make_unsigned</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member>
</simplelist></listitem></varlistentry><varlistentry><term>MPL Interoperability</term><listitem><simplelist><member><para><link linkend="boost_typetraits.mpl">false_type</link></para></member><member><para><link linkend="boost_typetraits.mpl">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.mpl">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_25"><term>O</term><listitem><variablelist><varlistentry><term>Optimised Version of std::fill</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.fill">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.examples.fill">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.examples.fill">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Optimized Version of std::copy</term><listitem><simplelist><member><para><li
nk linkend="boost_typetraits.examples.copy">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">true_type</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_26"><term>P</term><listitem><variablelist><varlistentry><term>promote</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.to_double">Convert Numeric Types and Enums to double</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.reference.promote">promote</link></para></member><m
ember><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_27"><term>R</term><listitem><variablelist><varlistentry><term>rank</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.extent">extent</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.properties">General Type Properties</link></para></member><member><para><link linkend="boost_typetraits.reference.rank">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.reference.rank">rank</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">Type Traits that Describe the Properties of a Type</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></s
implelist></listitem></varlistentry><varlistentry><term>Relationships Between Two Types</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits.relate">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.relate">is_same</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_all_extents</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_all_extents">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_const</term><listitem><simplelist><member><para>
<link linkend="boost_typetraits.reference.remove_const">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_const">remove_const</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_cv</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_cv">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_cv">remove_cv</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_extent</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.reference.decay"
>decay</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_extent">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_pointer</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_pointer">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></p
ara></member></simplelist></listitem></varlistentry><varlistentry><term>remove_reference</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.add_pointer">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.decay">decay</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_reference">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_reference">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>remove_volatile</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.remove_volatile">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link></para></member><member><para><link linkend="boost_typetr
aits.category.transform">Type Traits that Transform One Type to Another</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>result_type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.reference.function_traits">Examples</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">Function Traits Members</link></para></member><member><para><link linkend="boost_typetraits.reference.function_traits">function_traits</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_28"><term>S</term><listitem><variablelist><varlistentry><term>Support for Compiler Intrinsics</term><listitem><simplelist><member><para><link linkend="boost_typetraits.intrinsics">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_noth
row_copy</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_trivial_destructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">is_class</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">is_empty</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">is_pod</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.intrinsics">is_stateless</link></para></member><member><para><link linkend="boos
t_typetraits.intrinsics">is_union</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Synthesizing Types with Specific Alignments</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.alignment">type_with_alignment</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_29"><term>T</term><listitem><variablelist><varlistentry><term>true_type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.examples.destruct">An Example that Omits Destructor Calls For Types with Trivial Destructors</link></para></member><member><para><link linkend="boost_typetraits.examples.iter">An improved Version of std::iter_swap</link></para></member><member><para><link linkend="boost_typetraits.examples.fill">An Optimised Version of std::fill</link></para></member><member><para><link linkend="boost_typetraits.examples.copy">An Optimized Version of std::copy</link></para></member><member
><para><link linkend="boost_typetraits.background">Background and Tutorial</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits.primary">Categorizing a Type</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link></para></member><member><para><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_d
estructor</link></para></member><member><para><link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link></para></member><member><para><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.intro">Introduction</link></para></member><member><para><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></para></member><member><para><link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_array">is_array</link></para></member><member><para><link linkend="boost_typetraits.reference.is_base_of">is_base_of</link></para></member><member><para><link linkend="boost_typetraits.reference.is_class">is_class</link></para></member><member><para><link linkend="boost_typetraits.reference.is_complex">is_complex</link></para></member><member><para><link linkend="boost_typetraits.reference.i
s_compound">is_compound</link></para></member><member><para><link linkend="boost_typetraits.reference.is_const">is_const</link></para></member><member><para><link linkend="boost_typetraits.reference.is_convertible">is_convertible</link></para></member><member><para><link linkend="boost_typetraits.reference.is_empty">is_empty</link></para></member><member><para><link linkend="boost_typetraits.reference.is_enum">is_enum</link></para></member><member><para><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link></para></member><member><para><link linkend="boost_typetraits.reference.is_function">is_function</link></para></member><member><para><link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link></para></member><member><para><link linkend="boost_typetraits.reference.is_integral">is_integral</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link></para></member><member><para><l
ink linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_object">is_object</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pod">is_pod</link></para></member><member><para><link linkend="boost_typetraits.reference.is_pointer">is_pointer</link></para></member><member><para><link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link></para></member><member><para><link linkend="boost_typetraits.reference.is_reference">is_reference</link></para></member><member><para><link linkend="boost_typetraits.reference.is_same">is_same</link></para></member><member><para><link linkend="boost_typetraits.reference.is_scalar">is_scalar</link></para></member><member><para><link linkend="boost_typetraits.reference.is_signed">is_signed</link></para></me
mber><member><para><link linkend="boost_typetraits.reference.is_stateless">is_stateless</link></para></member><member><para><link linkend="boost_typetraits.reference.is_union">is_union</link></para></member><member><para><link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link></para></member><member><para><link linkend="boost_typetraits.reference.is_void">is_void</link></para></member><member><para><link linkend="boost_typetraits.reference.is_volatile">is_volatile</link></para></member><member><para><link linkend="boost_typetraits.mpl">MPL Interoperability</link></para></member><member><para><link linkend="boost_typetraits.user_defined">User Defined Specializations</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Type Traits that Describe the Properties of a Type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.value_traits">alignment_of</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits"
>extent</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">integral_constant</link></para></member><member><para><link linkend="boost_typetraits.category.value_traits">rank</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Type Traits that Transform One Type to Another</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.transform">add_const</link></para></member><member><para><link linkend="boost_typetraits.category.transform">add_cv</link></para></member><member><para><link linkend="boost_typetraits.category.transform">add_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.transform">add_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">add_volatile</link></para></member><member><para><link linkend="boost_typetraits.category.transform">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</link></para></member><member><para><link l
inkend="boost_typetraits.category.transform">decay</link></para></member><member><para><link linkend="boost_typetraits.category.transform">floating_point_promotion</link></para></member><member><para><link linkend="boost_typetraits.category.transform">integral_promotion</link></para></member><member><para><link linkend="boost_typetraits.category.transform">is_same</link></para></member><member><para><link linkend="boost_typetraits.category.transform">make_signed</link></para></member><member><para><link linkend="boost_typetraits.category.transform">make_unsigned</link></para></member><member><para><link linkend="boost_typetraits.category.transform">promote</link></para></member><member><para><link linkend="boost_typetraits.category.transform">rank</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_all_extents</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_const</link></para></member><member><para><link linkend="boost_
typetraits.category.transform">remove_cv</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_extent</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_pointer</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_reference</link></para></member><member><para><link linkend="boost_typetraits.category.transform">remove_volatile</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>type_with_alignment</term><listitem><simplelist><member><para><link linkend="boost_typetraits.category.alignment">Synthesizing Types with Specific Alignments</link></para></member><member><para><link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry><varlistentry id="idx_id_30"><term>U</term><listitem><variablelist><varlistentry><term>User Defined Speciali
zations</term><listitem><simplelist><member><para><link linkend="boost_typetraits.user_defined">false_type</link></para></member><member><para><link linkend="boost_typetraits.user_defined">is_class</link></para></member><member><para><link linkend="boost_typetraits.user_defined">is_pod</link></para></member><member><para><link linkend="boost_typetraits.user_defined">is_union</link></para></member><member><para><link linkend="boost_typetraits.user_defined">true_type</link></para></member></simplelist></listitem></varlistentry><varlistentry><term>Using add_reference to synthesize the correct constructor type</term><listitem><simplelist><member><para><link linkend="boost_typetraits.background">add_reference</link></para></member></simplelist></listitem></varlistentry></variablelist></listitem></varlistentry></variablelist></appendix>
+
+</chapter>
\ No newline at end of file
Added: sandbox/tools/auto_index/test/type_traits.docbook
==============================================================================
--- (empty file)
+++ sandbox/tools/auto_index/test/type_traits.docbook 2009-02-06 11:57:38 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,6623 @@
+<?xml version="1.0"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+
+This file is based upon the type traits docs, but has had additional XML elements added to it
+to ensure complete testing.
+
+-->
+
+<chapter xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" id="boost_typetraits" rev:last-revision="$Date: 2008-11-28 12:41:45 +0000 (Fri, 28 Nov 2008) $">
+ <chapterinfo><author>
+ <firstname>various</firstname> <surname>authors</surname>
+ </author><copyright>
+ <year>2000</year> <year>2006</year> <holder>Adobe Systems Inc, David Abrahams,
+ Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat
+ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
+ Ramey and Jeremy Siek</holder>
+ </copyright><legalnotice>
+ <para>
+ 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>)
+ </para>
+ </legalnotice></chapterinfo>
+ <title>Boost.TypeTraits</title>
+ <para>
+ A printer-friendly <ulink url="http://svn.boost.org/svn/boost/sandbox/pdf/type_traits/release/type_traits.pdf">PDF
+ version of this manual is also available</ulink>.
+ </para>
+ <section id="boost_typetraits.intro">
+ <title><link linkend="boost_typetraits.intro"> Introduction</link></title>
+ <para>
+ 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,
+ is a type a pointer or a reference type? Or does a type have a trivial constructor,
+ or a const-qualifier?
+ </para>
+ <para>
+ The type-traits classes share a unified design: each class inherits from a
+ the type <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ otherwise.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation.
+ </para>
+ </section>
+ <section id="boost_typetraits.background">
+ <title><link linkend="boost_typetraits.background"> Background and Tutorial</link></title>
+ <para>
+ 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
+ <ulink url="http://www.ddj.com">Dr Dobb's Journal</ulink>.
+ </para>
+ <para>
+ Generic programming (writing code which works with any data type meeting a
+ set of requirements) has become the method of choice for providing reusable
+ code. However, there are times in generic programming when "generic"
+ just isn't good enough - sometimes the differences between types are too large
+ for an efficient generic implementation. This is when the traits technique
+ becomes important - by encapsulating those properties that need to be considered
+ on a type by type basis inside a traits class, we can minimize the amount of
+ code that has to differ from one type to another, and maximize the amount of
+ generic code.
+ </para>
+ <?dbfo keep-together="auto" ?>
+ <para>
+ <indexterm>
+ <primary>Foo1</primary>
+ </indexterm>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">strlen</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">wcslen</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">wchar_t</phrase></computeroutput>
+ into the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput>.
+ Generic code that works with character strings can simply use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase><phrase role="special"><>::</phrase><phrase role="identifier">length</phrase></computeroutput> to determine the length of a null
+ terminated string, safe in the knowledge that specializations of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> will use the most appropriate
+ method available to them.
+ </para>
+ <anchor id="boost_typetraits.background.type_traits"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.type_traits">Type Traits</link>
+ </bridgehead>
+ <para>
+ Class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">char_traits</phrase></computeroutput> is a classic
+ example of a collection of type specific properties wrapped up in a single
+ class - what Nathan Myers termed a <emphasis>baggage class</emphasis><link linkend="background.references">[1]</link>. In the Boost type-traits library,
+ we<link linkend="background.references">[2]</link> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the type has the specified property and inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ 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.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of the transformation. All of the type-traits classes are
+ defined inside namespace <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase></computeroutput>;
+ for brevity, namespace-qualification is omitted in most of the code samples
+ given.
+ </para>
+ <anchor id="boost_typetraits.background.implementation"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.implementation">Implementation</link>
+ </bridgehead>
+ <para>
+ 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,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput> inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ only if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ Here we define a primary version of the template class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_void">is_void</link></computeroutput>,
+ and provide a full-specialization when <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>. 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput>:
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">*></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ The syntax for partial specialization is somewhat arcane and could easily occupy
+ an article in its own right; like full specialization, in order to write a
+ partial specialization for a class, you must first declare the primary template.
+ The partial specialization contains an extra <...> after the class name
+ that contains the partial specialization parameters; these define the types
+ that will bind to that partial specialization rather than the default template.
+ The rules for what can appear in a partial specialization are somewhat convoluted,
+ but as a rule of thumb if you can legally write two function overloads of the
+ form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">);</phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">U</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Then you can also write a partial specialization of the form:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special">{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">class</phrase> <phrase role="identifier">c</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">>{</phrase> <phrase role="comment">/*details*/</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ This rule is by no means foolproof, but it is reasonably simple to remember
+ and close enough to the actual rule to be useful for everyday use.
+ </para>
+ <para>
+ As a more complex example of partial specialization consider the class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">></phrase></computeroutput>. This
+ class defines a single typedef-member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ 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:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">[</phrase><phrase role="identifier">N</phrase><phrase role="special">]></phrase>
+<phrase role="special">{</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The aim of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ is this: imagine a generic algorithm that is passed an array type as a template
+ parameter, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.remove_extent">remove_extent</link></computeroutput>
+ provides a means of determining the underlying type of the array. For example
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">][</phrase><phrase role="number">5</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput> would evaluate to the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">5</phrase><phrase role="special">]</phrase></computeroutput>. 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.
+ </para>
+ <anchor id="boost_typetraits.background.optimized_copy"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.optimized_copy">Optimized copy</link>
+ </bridgehead>
+ <para>
+ As an example of how the type traits classes can be used, consider the standard
+ library algorithm copy:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">Iter1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iter2</phrase><phrase role="special">></phrase>
+<phrase role="identifier">Iter2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">Iter1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iter2</phrase> <phrase role="identifier">out</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <para>
+ Obviously, there's no problem writing a generic version of copy that works
+ for all iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput>; however, there are
+ some circumstances when the copy operation can best be performed by a call
+ to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>. In order to implement
+ copy in terms of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> all
+ of the following conditions need to be met:
+ </para>
+ <itemizedlist>
+ <listitem>
+ Both of the iterator types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must be pointers.
+ </listitem>
+ <listitem>
+ Both <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter2</phrase></computeroutput> must point to the same type - excluding
+ const and volatile-qualifiers.
+ </listitem>
+ <listitem>
+ The type pointed to by <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Iter1</phrase></computeroutput>
+ must have a trivial assignment operator.
+ </listitem>
+ </itemizedlist>
+ <para>
+ By trivial assignment operator we mean that the type is either a scalar type<link linkend="background.references">[3]</link> or:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The type has no user defined assignment operator.
+ </listitem>
+ <listitem>
+ The type does not have any data members that are references.
+ </listitem>
+ <listitem>
+ All base classes, and all data member objects must have trivial assignment
+ operators.
+ </listitem>
+ </itemizedlist>
+ <para>
+ If all these conditions are met then a type can be copied using <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput> rather than using a compiler generated
+ assignment operator. The type-traits library provides a class <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>,
+ such that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> 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 <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ gives the wrong answer, it will give the "safe" wrong answer - that
+ trivial assignment is not allowable.
+ </para>
+ <para>
+ The code for an optimized version of copy that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ where appropriate is given in <link linkend="boost_typetraits.examples.copy">the
+ examples</link>. The code begins by defining a template function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">do_copy</phrase></computeroutput> that performs a "slow but safe"
+ copy. The last parameter passed to this function may be either a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ or a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>.
+ Following that there is an overload of do<emphasis role="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 `</emphasis>_true_type<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">.</phrase> <phrase role="identifier">Finally</phrase><phrase role="special">,</phrase> <phrase role="identifier">the</phrase> <phrase role="identifier">version</phrase>
+ <phrase role="identifier">of</phrase> </computeroutput>copy<computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="identifier">calls</phrase>
+ </computeroutput>do<emphasis role="underline">copy`, passing `</emphasis>_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".
+ </para>
+ <anchor id="boost_typetraits.background.was_it_worth_it_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.was_it_worth_it_">Was it worth it?</link>
+ </bridgehead>
+ <para>
+ It has often been repeated in these columns that "premature optimization
+ is the root of all evil" <link linkend="background.references">[4]</link>.
+ So the question must be asked: was our optimization premature? To put this
+ in perspective the timings for our version of copy compared a conventional
+ generic copy<link linkend="background.references">[5]</link> are shown in table
+ 1.
+ </para>
+ <para>
+ Clearly the optimization makes a difference in this case; but, to be fair,
+ the timings are loaded to exclude cache miss effects - without this accurate
+ comparison between algorithms becomes difficult. However, perhaps we can add
+ a couple of caveats to the premature optimization rule:
+ </para>
+ <itemizedlist>
+ <listitem>
+ If you use the right algorithm for the job in the first place then optimization
+ will not be required; in some cases, memcpy is the right algorithm.
+ </listitem>
+ <listitem>
+ If a component is going to be reused in many places by many people then optimizations
+ may well be worthwhile where they would not be so for a single case - in
+ other words, the likelihood that the optimization will be absolutely necessary
+ somewhere, sometime is that much higher. Just as importantly the perceived
+ value of the stock implementation will be higher: there is no point standardizing
+ an algorithm if users reject it on the grounds that there are better, more
+ heavily optimized versions available.
+ </listitem>
+ </itemizedlist>
+ <table frame="all"> <title>Time taken to copy 1000 elements using `copy<const
+ T*, T*>` (times in micro-seconds)</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Version
+ </para>
+ </entry><entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ Time
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 0.99
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ char
+ </para>
+ </entry><entry>
+ <para>
+ 8.07
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ "Optimized" copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 2.52
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Conventional copy
+ </para>
+ </entry><entry>
+ <para>
+ int
+ </para>
+ </entry><entry>
+ <para>
+ 8.02
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <anchor id="boost_typetraits.background.pair_of_references"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.pair_of_references">Pair of References</link>
+ </bridgehead>
+ <para>
+ 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
+ code to compile that otherwise would not do so unless excessive partial specialization
+ is used. This is possible by delegating partial specialization to the type
+ traits classes. Our example for this form of usage is a pair that can hold
+ references <link linkend="background.references">[6]</link>.
+ </para>
+ <para>
+ First, let us examine the definition of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput>, omitting
+ the comparison operators, default constructor, and template copy constructor
+ for simplicity:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Now, this "pair" cannot hold references as it currently stands, because
+ the constructor would require taking a reference to a reference, which is currently
+ illegal <link linkend="background.references">[7]</link>. Let us consider what
+ the constructor's parameters would have to be in order to allow "pair"
+ to hold non-reference types, references, and constant references:
+ </para>
+ <table frame="all"> <title>Required Constructor Argument Types</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of parameter to initializing constructor
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &
+ </para>
+ </entry><entry>
+ <para>
+ T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.add_reference">add_reference</link>, which
+ adds a reference to its type, unless it is already a reference.
+ </para>
+ <table frame="all"> <title>Using add_reference to synthesize the correct constructor
+ type</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ Type of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ T
+ </para>
+ </entry><entry>
+ <para>
+ const T
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ T &
+ </para>
+ </entry><entry>
+ <para>
+ T & [8]
+ </para>
+ </entry><entry>
+ <para>
+ T &
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry><entry>
+ <para>
+ const T &
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ This allows us to build a primary template definition for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>
+ that can contain non-reference types, reference types, and constant reference
+ types:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">pair</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T1</phrase> <phrase role="identifier">first_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">T2</phrase> <phrase role="identifier">second_type</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">T1</phrase> <phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+<phrase role="identifier">T2</phrase> <phrase role="identifier">second</phrase><phrase role="special">;</phrase>
+
+<phrase role="identifier">pair</phrase><phrase role="special">(</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nfirst</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T2</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase>
+<phrase role="special">:</phrase><phrase role="identifier">first</phrase><phrase role="special">(</phrase><phrase role="identifier">nfirst</phrase><phrase role="special">),</phrase> <phrase role="identifier">second</phrase><phrase role="special">(</phrase><phrase role="identifier">nsecond</phrase><phrase role="special">)</phrase> <phrase role="special">{</phrase> <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ Add back in the standard comparison operators, default constructor, and template
+ copy constructor (which are all the same), and you have a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase></computeroutput> that
+ can hold reference types!
+ </para>
+ <para>
+ This same extension could have been done using partial template specialization
+ of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput>, but to specialize
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">pair</phrase></computeroutput> 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
+ approach. Using type traits in this fashion allows programmers to delegate
+ partial specialization to the type traits classes, resulting in code that is
+ easier to maintain and easier to understand.
+ </para>
+ <anchor id="boost_typetraits.background.conclusion"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.conclusion">Conclusion</link>
+ </bridgehead>
+ <para>
+ 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
+ are in the boost documentation, along with further examples using type traits.
+ Templates have enabled C++ uses to take the advantage of the code reuse that
+ generic programming brings; hopefully this article has shown that generic programming
+ does not have to sink to the lowest common denominator, and that templates
+ can be optimal as well as generic.
+ </para>
+ <anchor id="boost_typetraits.background.acknowledgements"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.acknowledgements">Acknowledgements</link>
+ </bridgehead>
+ <para>
+ The authors would like to thank Beman Dawes and Howard Hinnant for their helpful
+ comments when preparing this article.
+ </para>
+ <anchor id="background.references"/> <anchor id="boost_typetraits.background.references"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.background.references">References</link>
+ </bridgehead>
+ <orderedlist inheritnum="ignore" continuation="restarts">
+ <listitem>
+ Nathan C. Myers, C++ Report, June 1995.
+ </listitem>
+ <listitem>
+ The type traits library is based upon contributions by Steve Cleary, Beman
+ Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org.
+ </listitem>
+ <listitem>
+ A scalar type is an arithmetic type (i.e. a built-in integer or floating
+ point type), an enumeration type, a pointer, a pointer to member, or a const-
+ or volatile-qualified version of one of these types.
+ </listitem>
+ <listitem>
+ This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg
+ 268.
+ </listitem>
+ <listitem>
+ The test code is available as part of the boost utility library (see algo_opt_examples.cpp),
+ the code was compiled with gcc 2.95 with all optimisations turned on, tests
+ were conducted on a 400MHz Pentium II machine running Microsoft Windows 98.
+ </listitem>
+ <listitem>
+ John Maddock and Howard Hinnant have submitted a "compressed_pair"
+ library to Boost, which uses a technique similar to the one described here
+ to hold references. Their pair also uses type traits to determine if any
+ of the types are empty, and will derive instead of contain to conserve space
+ -- hence the name "compressed".
+ </listitem>
+ <listitem>
+ This is actually an issue with the C++ Core Language Working Group (issue
+ #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow
+ a "reference to a reference to T" to mean the same thing as a "reference
+ to T", but only in template instantiation, in a method similar to multiple
+ cv-qualifiers.
+ </listitem>
+ <listitem>
+ For those of you who are wondering why this shouldn't be const-qualified,
+ remember that references are always implicitly constant (for example, you
+ can't re-assign a reference). Remember also that "const T &"
+ is something completely different. For this reason, cv-qualifiers on template
+ type arguments that are references are ignored.
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="boost_typetraits.category">
+ <title><link linkend="boost_typetraits.category"> Type Traits by Category</link></title>
+ <section id="boost_typetraits.category.value_traits">
+ <title><link linkend="boost_typetraits.category.value_traits"> Type Traits
+ that Describe the Properties of a Type</link></title>
+ <para>
+ <indexterm>
+ <primary>Foo2</primary>
+ <secondary>Bar2</secondary>
+ </indexterm>
+ These traits are all <emphasis>value traits</emphasis>, which is to say the
+ traits classes all inherit from <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link>,
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.alignment_of">alignment_of</link></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.rank">rank</link></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.extent">extent</link></computeroutput>).
+ </para>
+ <section id="boost_typetraits.category.value_traits.primary">
+ <title><link linkend="boost_typetraits.category.value_traits.primary"> Categorizing
+ a Type</link></title>
+ <para>
+ These traits identify what "kind" of type some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> 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.
+ </para>
+ <para>
+ For any given type, exactly one primary type trait will inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ and all the others will inherit from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ in other words these traits are mutually exclusive.
+ </para>
+ <para>
+ This means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric_limits</phrase>
+ <phrase role="keyword">template</phrase></computeroutput> instead.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_array">is_array</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_complex">is_complex</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_enum">is_enum</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_integral">is_integral</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_void">is_void</link><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ The following traits are made up of the union of one or more type categorizations.
+ A type may belong to more than one of these categories, in addition to
+ one of the primary categories.
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_arithmetic">is_arithmetic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_compound">is_compound</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_object">is_object</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_scalar">is_scalar</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.properties">
+ <title><link linkend="boost_typetraits.category.value_traits.properties">
+ General Type Properties</link></title>
+ <para>
+ The following templates describe the general properties of a type.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.alignment_of">alignment_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_default_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy_constructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_abstract">is_abstract</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_const">is_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_empty">is_empty</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_signed">is_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_unsigned">is_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_volatile">is_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.extent">extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.value_traits.relate">
+ <title><link linkend="boost_typetraits.category.value_traits.relate"> Relationships
+ Between Two Types</link></title>
+ <para>
+ These templates determine the whether there is a relationship between two
+ types:
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_base_of">is_base_of</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.category.transform">
+ <title><link linkend="boost_typetraits.category.transform"> Type Traits that
+ Transform One Type to Another</link></title>
+ <para>
+ The following templates transform one type to another, based upon some well-defined
+ rule. Each template has a single member called <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ that is the result of applying the transformation to the template argument
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis:</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_const">add_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_cv">add_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_pointer">add_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_reference">add_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.add_volatile">add_volatile</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.decay">decay</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_signed">make_signed</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.make_unsigned">make_unsigned</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.promote">promote</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_all_extents">remove_all_extents</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_const">remove_const</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_cv">remove_cv</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_extent">remove_extent</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_reference">remove_reference</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.remove_volatile">remove_volatile</link><phrase role="special">;</phrase>
+</programlisting>
+ <anchor id="boost_typetraits.category.transform.broken_compiler_workarounds_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
+ Compiler Workarounds:</link>
+ </bridgehead>
+ <para>
+ For all of these templates support for partial specialization of class templates
+ is required to correctly implement the transformation. On the other hand,
+ practice shows that many of the templates from this category are very useful,
+ and often essential for implementing some generic libraries. Lack of these
+ templates is often one of the major limiting factors in porting those libraries
+ to compilers that do not yet support this language feature. As some of these
+ compilers are going to be around for a while, and at least one of them is
+ very wide-spread, it was decided that the library should provide workarounds
+ where possible.
+ </para>
+ <para>
+ The basic idea behind the workaround is to manually define full specializations
+ of all type transformation templates for all fundamental types, and all their
+ 1st and 2nd rank cv-[un]qualified derivative pointer types, and to provide
+ a user-level macro that will define all the explicit specializations needed
+ for any user-defined type T.
+ </para>
+ <para>
+ The first part guarantees the successful compilation of something like this:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="special">...</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="
identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+</programlisting>
+ <para>
+ and the second part provides the library's users with a mechanism to make
+ the above code work not only for <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput> or other built-in type,
+ but for their own types as well:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">namespace</phrase> <phrase role="identifier">myspace</phrase><phrase role="special">{</phrase>
+ <phrase role="keyword">struct</phrase> <phrase role="identifier">MyClass</phrase> <phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+<phrase role="comment">// declare this at global scope:
+</phrase><phrase role="identifier">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</phrase><phrase role="special">(</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">)</phrase>
+<phrase role="comment">// transformations on myspace::MyClass now work:
+</phrase><phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="identifier">BOOST_STATIC_ASSERT</phrase><phrase role="special">((</phrase><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">,</phrase> <phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="identifier">myspace</phrase><phrase role="special">::</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">));</phrase>
+<phrase role="comment">// etc.
+</phrase></programlisting>
+ <para>
+ Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates
+ to nothing on those compilers that <emphasis role="bold">do</emphasis> support
+ partial specialization.
+ </para>
+ </section>
+ <section id="boost_typetraits.category.alignment">
+ <title><link linkend="boost_typetraits.category.alignment"> Synthesizing Types
+ with Specific Alignments</link></title>
+ <para>
+ Some low level memory management routines need to synthesize a POD type with
+ specific alignment properties. The template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link></computeroutput>
+ finds the smallest type with a specified alignment, while template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link></computeroutput>
+ creates a type with a specific size and alignment.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.type_with_alignment">type_with_alignment</link><phrase role="special">;</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.aligned_storage">aligned_storage</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.category.function">
+ <title><link linkend="boost_typetraits.category.function"> Decomposing Function
+ Types</link></title>
+ <para>
+ The class template <link linkend="boost_typetraits.reference.function_traits">function_traits</link>
+ extracts information from function types (see also <link linkend="boost_typetraits.reference.is_function">is_function</link>).
+ This traits class allows you to tell how many arguments a function takes,
+ what those argument types are, and what the return type is.
+ </para>
+ <para>
+ <emphasis role="bold">Synopsis</emphasis>
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.function_traits">function_traits</link><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.user_defined">
+ <title><link linkend="boost_typetraits.user_defined"> User Defined Specializations</link></title>
+ <para>
+ 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::<link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ or boost::<link linkend="boost_typetraits.reference.integral_constant">false_type</link>
+ as appropriate:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+<phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase>
+
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_pod</phrase><phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">my_union</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">char</phrase> <phrase role="identifier">c</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special"><</phrase><phrase role="identifier">my_pod</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_pod">is_pod</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_union">is_union</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">{};</phrase>
+
+ <phrase role="keyword">template</phrase><phrase role="special"><></phrase>
+ <phrase role="keyword">struct</phrase> <link linkend="boost_typetraits.reference.is_class">is_class</link><phrase role="special"><</phrase><phrase role="identifier">my_union</phrase><phrase role="special">></phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">{};</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.intrinsics">
+ <title><link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link></title>
+ <para>
+ 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
+ of additional help from the compiler is required. Currently (April 2008) Visual
+ C++ 8 and 9, GNU GCC 4.3 and MWCW 9 provide the necessary intrinsics, and other
+ compilers will no doubt follow in due course.
+ </para>
+ <para>
+ The Following traits classes always need compiler support to do the right thing
+ for all types (but all have safe fallback positions if this support is unavailable):
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_union">is_union</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_pod">is_pod</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_nothrow_assign">has_nothrow_assign</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.has_virtual_destructor">has_virtual_destructor</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes can't be portably implemented in the C++ language,
+ although in practice, the implementations do in fact do the right thing on
+ all the compilers we know about:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_empty">is_empty</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The following traits classes are dependent on one or more of the above:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_class">is_class</link>
+ </listitem>
+ <listitem>
+ <link linkend="boost_typetraits.reference.is_stateless">is_stateless</link>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The hooks for compiler-intrinsic support are defined in <ulink url="../../../../boost/type_traits/intrinsics.hpp">boost/type_traits/intrinsics.hpp</ulink>,
+ adding support for new compilers is simply a matter of defining one of more
+ of the following macros:
+ </para>
+ <table frame="all"> <title>Macros for Compiler Intrinsics</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_UNION(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a union type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POD(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a POD type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_EMPTY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an empty struct or union
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if the default constructor for T is trivial (i.e.
+ has no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial copy constructor (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial assignment operator (and can
+ therefore be replaced by a call to memcpy)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T has a trivial destructor (i.e. ~T() has
+ no effect)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_CONSTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">x</phrase><phrase role="special">;</phrase></computeroutput>
+ can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_COPY(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">(</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_NOTHROW_ASSIGN(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="identifier">t</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">u</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">t</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">u</phrase></computeroutput> can not throw
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_HAS_VIRTUAL_DESTRUCTOR(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true T has a virtual destructor
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ABSTRACT(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is an abstract type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_BASE_OF(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a base class of U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CLASS(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a class type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_CONVERTIBLE(T,U)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is convertible to U
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_ENUM(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true is T is an enum
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_IS_POLYMORPHIC(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to true if T is a polymorphic type
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ BOOST_ALIGNMENT_OF(T)
+ </para>
+ </entry><entry>
+ <para>
+ Should evaluate to the alignment requirements of type T.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.mpl">
+ <title><link linkend="boost_typetraits.mpl"> MPL Interoperability</link></title>
+ <para>
+ All the value based traits in this library conform to MPL's requirements for
+ an <ulink url="../../../../libs/mpl/doc/refmanual/integral-constant.html">Integral
+ Constant type</ulink>: that includes a number of rather intrusive workarounds
+ for broken compilers.
+ </para>
+ <para>
+ Purely as an implementation detail, this means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">true_</phrase></computeroutput></ulink>,
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">false_type</link></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/bool.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">false_</phrase></computeroutput></ulink>,
+ and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">v</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <ulink url="../../../../libs/mpl/doc/refmanual/integral-c.html"><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mpl</phrase><phrase role="special">::</phrase><phrase role="identifier">integral_c</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">v</phrase><phrase role="special">></phrase></computeroutput></ulink>
+ (provided <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>)
+ </para>
+ </section>
+ <section id="boost_typetraits.examples">
+ <title><link linkend="boost_typetraits.examples"> Examples</link></title>
+ <section id="boost_typetraits.examples.copy">
+ <title><link linkend="boost_typetraits.examples.copy"> An Optimized Version
+ of std::copy</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">copy</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>
+ to optimise the copy operation (see <ulink url="../../examples/copy_example.cpp">copy_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// opt::copy
+</phrase><phrase role="comment">// same semantics as std::copy
+</phrase><phrase role="comment">// calls memcpy where appropriate.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">></phrase>
+<phrase role="identifier">I2</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">>&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">out</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">memcpy</phrase><phrase role="special">(</phrase><phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="special">(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">)*</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">));</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">out</phrase><phrase role="special">+(</phrase><phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">copy</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I1</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">out</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can copy with memcpy if T has a trivial assignment operator,
+</phrase> <phrase role="comment">// and if the iterator arguments are actually pointers (this last
+</phrase> <phrase role="comment">// requirement we detect with overload resolution):
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I1</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">copy_imp</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">out</phrase><phrase role="special">,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special"><</phrase><phrase role="identifier">value_type</phrase><phrase role="special">>());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.fill">
+ <title><link linkend="boost_typetraits.examples.fill"> An Optimised Version
+ of std::fill</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">fill</phrase></computeroutput>
+ that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link></computeroutput>
+ to determine whether to use <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memset</phrase></computeroutput>
+ to optimise the fill operation (see <ulink url="../../examples/fill_example.cpp">fill_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// fill
+</phrase><phrase role="comment">// same as std::fill, but uses memset where appropriate
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase> <phrase role="identifier">b</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="identifier">b</phrase><phrase role="special">>&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">first</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">memset</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">-</phrase><phrase role="identifier">first</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">I</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">fill</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase><phrase role="special">&</phrase> <phrase role="identifier">val</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// We can do an optimised fill if T has a trivial assignment
+</phrase> <phrase role="comment">// operator and if it's size is one:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_assign">has_trivial_assign</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase> <phrase role="special">&&</phrase> <phrase role="special">(</phrase><phrase role="keyword">sizeof</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)></phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_fill</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.destruct">
+ <title><link linkend="boost_typetraits.examples.destruct"> An Example that
+ Omits Destructor Calls For Types with Trivial Destructors</link></title>
+ <para>
+ Demonstrates a simple algorithm that uses <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">__has_trivial_destruct</phrase></computeroutput>
+ to determine whether to destructors need to be called (see <ulink url="../../examples/trivial_destructor_example.cpp">trivial_destructor_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// algorithm destroy_array:
+</phrase><phrase role="comment">// The reverse of std::unitialized_copy, takes a block of
+</phrase><phrase role="comment">// initialized memory and calls destructors on all objects therein.
+</phrase><phrase role="comment">//
+</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">while</phrase><phrase role="special">(</phrase><phrase role="identifier">first</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">last</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="identifier">first</phrase><phrase role="special">->~</phrase><phrase role="identifier">T</phrase><phrase role="special">();</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">first</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">first</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">last</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase> <phrase role="comment">// namespace detail
+</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase><phrase role="special">*</phrase> <phrase role="identifier">p2</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_destroy_array</phrase><phrase role="special">(</phrase><phrase role="identifier">p1</phrase><phrase role="special">,</phrase> <phrase role="identifier">p2</phrase><phrase role="special">,</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.has_trivial_destructor">has_trivial_destructor</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.iter">
+ <title><link linkend="boost_typetraits.examples.iter"> An improved Version
+ of std::iter_swap</link></title>
+ <para>
+ Demonstrates a version of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase></computeroutput>
+ of it's dereferenced arguments (the same as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iter_swap</phrase></computeroutput>
+ 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 <ulink url="../../examples/iter_swap_example.cpp">iter_swap_example.cpp</ulink>):
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="comment">//
+</phrase><phrase role="comment">// iter_swap:
+</phrase><phrase role="comment">// tests whether iterator is a proxying iterator or not, and
+</phrase><phrase role="comment">// uses optimal form accordingly:
+</phrase><phrase role="comment">//
+</phrase><phrase role="keyword">namespace</phrase> <phrase role="identifier">detail</phrase><phrase role="special">{</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">></phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">false_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase> <phrase role="identifier">v_t</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">v_t</phrase> <phrase role="identifier">v</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">one</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">one</phrase> <phrase role="special">=</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">;</phrase>
+ <phrase role="special">*</phrase><phrase role="identifier">two</phrase> <phrase role="special">=</phrase> <phrase role="identifier">v</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I</phrase><phrase role="special">></phrase>
+<phrase role="keyword">static</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">true_type</link><phrase role="special">&)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">using</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">swap</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">swap</phrase><phrase role="special">(*</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="special">*</phrase><phrase role="identifier">two</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">typename</phrase> <phrase role="identifier">I1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">I2</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">iter_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">I1</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">I2</phrase> <phrase role="identifier">two</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">//
+</phrase> <phrase role="comment">// See is both arguments are non-proxying iterators,
+</phrase> <phrase role="comment">// and if both iterator the same type:
+</phrase> <phrase role="comment">//
+</phrase> <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I1</phrase><phrase role="special">>::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r1_t</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">iterator_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">I2</phrase><phrase role="special">>::</phrase><phrase role="identifier">reference</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">;</phrase>
+
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase>
+ <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special"><</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_reference">is_reference</link><phrase role="special"><</phrase><phrase role="identifier">r2_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><link linkend="boost_typetraits.reference.is_same">is_same</link><phrase role="special"><</phrase><phrase role="identifier">r1_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">r2_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase><phrase role="special">></phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">;</phrase>
+
+ <phrase role="identifier">detail</phrase><phrase role="special">::</phrase><phrase role="identifier">do_swap</phrase><phrase role="special">(</phrase><phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase><phrase role="special">,</phrase> <phrase role="identifier">truth_type</phrase><phrase role="special">());</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="boost_typetraits.examples.to_double">
+ <title><link linkend="boost_typetraits.examples.to_double"> Convert Numeric
+ Types and Enums to double</link></title>
+ <para>
+ Demonstrates a conversion of <ulink url="../../../../libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types">Numeric
+ Types</ulink> and enum types to double:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">inline</phrase> <phrase role="keyword">double</phrase> <phrase role="identifier">to_double</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase> <phrase role="identifier">promoted</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">numeric</phrase><phrase role="special">::</phrase><phrase role="identifier">converter</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase><phrase role="identifier">promoted</phrase><phrase role="special">>::</phrase><phrase role="identifier">convert</phrase><phrase role="special">(</phrase><phrase role="identifier">value</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="boost_typetraits.reference">
+ <title><link linkend="boost_typetraits.reference"> Alphabetical Reference</link></title>
+ <section id="boost_typetraits.reference.add_const">
+ <title><link linkend="boost_typetraits.reference.add_const"> add_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_cv">
+ <title><link linkend="boost_typetraits.reference.add_cv"> add_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_pointer">
+ <title><link linkend="boost_typetraits.reference.add_pointer"> add_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ <para>
+ The rationale for this template is that it produces the same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">TYPEOF</phrase><phrase role="special">(&</phrase><phrase role="identifier">t</phrase><phrase role="special">)</phrase></computeroutput>, where
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">t</phrase></computeroutput> is an object of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">**</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_reference">
+ <title><link linkend="boost_typetraits.reference.add_reference"> add_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is not a reference type then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase><phrase role="special">&</phrase></computeroutput>, otherwise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.add_volatile">
+ <title><link linkend="boost_typetraits.reference.add_volatile"> add_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">add_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput> for all <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">add_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">add_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.aligned_storage">
+ <title><link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Size</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">aligned_storage</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with size
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Size</phrase></computeroutput> and an alignment that
+ is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">aligned_storage</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.alignment_of">
+ <title><link linkend="boost_typetraits.reference.alignment_of"> alignment_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">alignment_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template alignment<emphasis role="underline">of inherits from `</emphasis>_integral_constant<std::size_t,
+ ALIGNOF(T)><computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">,</phrase> <phrase role="identifier">where</phrase>
+ </computeroutput>ALIGNOF(T)` is the alignment of type T.
+ </para>
+ <para>
+ <emphasis>Note: strictly speaking you should only rely on the value of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> 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.</emphasis>
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">alignment_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">char</phrase><phrase role="special">)></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ with value <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">ALIGNOF</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">alignment_of</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.decay">
+ <title><link linkend="boost_typetraits.reference.decay"> decay</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">decay</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> Let <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ be the result of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>, then if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>
+ is an array type, the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">>*</phrase></computeroutput>,
+ otherwise if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput> is a function
+ type then the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase><phrase role="special">*</phrase></computeroutput>, otherwise the result is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">decay</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">(&)[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">decay</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">(&)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">)</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.extent">
+ <title><link linkend="boost_typetraits.reference.extent"> extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">N</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">extent</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template extent inherits
+ from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)></phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is the number of elements in the N'th array
+ dimention of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">N</phrase> <phrase role="special">></phrase>
+ <link linkend="boost_typetraits.reference.rank">rank</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>, or if the N'th array bound is incomplete,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">EXTENT</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase><phrase role="identifier">N</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">],</phrase>
+ <phrase role="number">1</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>4</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">],</phrase> <phrase role="number">1</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">extent</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.floating_point_promotion">
+ <title><link linkend="boost_typetraits.reference.floating_point_promotion">
+ floating_point_promotion</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">floating_point_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If floating point promotion can be
+ applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies floating point promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">floating_point_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">float</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">floating_point_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.function_traits">
+ <title><link linkend="boost_typetraits.reference.function_traits"> function_traits</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">F</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">function_traits</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">arity</phrase> <phrase role="special">=</phrase> <replaceable>see-below</replaceable><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">result_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> arg<replaceable>N</replaceable>_type<phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ The class template function_traits will only compile if:
+ </para>
+ <itemizedlist>
+ <listitem>
+ The compiler supports partial specialization of class templates.
+ </listitem>
+ <listitem>
+ The template argument <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>
+ is a <emphasis>function type</emphasis>, note that this <emphasis><emphasis role="bold">is not</emphasis></emphasis> the same thing as a <emphasis>pointer
+ to a function</emphasis>.
+ </listitem>
+ </itemizedlist>
+ <tip>
+ <para>
+ 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 <link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link>.
+ </para>
+ </tip>
+ <table frame="all"> <title>Function Traits Members</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Member
+ </para>
+ </entry><entry>
+ <para>
+ Description
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that gives the number of arguments
+ accepted by the function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type returned by function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="identifier">F</phrase><phrase role="special">>::</phrase>arg<replaceable>N</replaceable>_type</computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The <replaceable>N</replaceable>th argument type of function type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="number">1</phrase> <phrase role="special"><=</phrase>
+ <phrase role="identifier">N</phrase> <phrase role="special"><=</phrase>
+ <phrase role="identifier">arity</phrase></computeroutput> of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">F</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table> <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 0.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 1.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An integral constant expression that has the value 4.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">result_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">long</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arg1_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arg4_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ The type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">void</phrase><phrase role="special">*</phrase></computeroutput>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">long</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">void</phrase><phrase role="special">*)>::</phrase><phrase role="identifier">arg5_type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: there is no <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">arg5_type</phrase></computeroutput>
+ since there are only four arguments.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">function_traits</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">arity</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A compiler error: argument type is a <emphasis>function pointer</emphasis>,
+ and not a <emphasis>function type</emphasis>.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_assign">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_assign"> has_nothrow_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_assign</phrase></computeroutput>
+ 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".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_constructor">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_constructor">
+ has_nothrow_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_constructor</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_copy">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_copy"> has_nothrow_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_nothrow_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a non-throwing copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_nothrow_copy</phrase></computeroutput>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to ensure that this trait "just works".
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_nothrow_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_nothrow_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_nothrow_cp_cons"> has_nothrow_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_copy">has_nothrow_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_no_throw_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_no_throw_def_cons"> has_nothrow_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_nothrow_constructor">has_nothrow_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_assign">
+ <title><link linkend="boost_typetraits.reference.has_trivial_assign"> has_trivial_assign</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_assign</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial assignment-operator then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p11.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_assign</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_assign</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_constructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_constructor">
+ has_trivial_constructor</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_default_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial default-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ If a type has a trivial default-constructor then the constructor have no
+ effect: calls to the constructor can be safely omitted. Note that using meta-programming
+ to omit a call to a single trivial-constructor call is of no benefit whatsoever.
+ However, if loops and/or exception handling code can also be omitted, then
+ some benefit in terms of code size and speed can be obtained.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.1p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_copy">
+ <title><link linkend="boost_typetraits.reference.has_trivial_copy"> has_trivial_copy</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+
+<phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_copy_constructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial copy-constructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ These two traits are synonyms for each other.
+ </para>
+ <para>
+ 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">memcpy</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.8p6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_cp_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_cp_cons"> has_trivial_copy_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_copy">has_trivial_copy</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_def_cons">
+ <title><link linkend="boost_typetraits.reference.has_trivial_def_cons"> has_trivial_default_constructor</link></title>
+ <para>
+ See <link linkend="boost_typetraits.reference.has_trivial_constructor">has_trivial_constructor</link>.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.has_trivial_destructor">
+ <title><link linkend="boost_typetraits.reference.has_trivial_destructor"> has_trivial_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_trivial_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a trivial destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ If a type has a trivial destructor then the destructor has no effect: calls
+ to the destructor can be safely omitted. Note that using meta-programming
+ to omit a call to a single trivial-constructor call is of no benefit whatsoever.
+ However, if loops and/or exception handling code can also be omitted, then
+ some benefit in terms of code size and speed can be obtained.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect user-defined classes with trivial constructors.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4p3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.has_virtual_destructor">
+ <title><link linkend="boost_typetraits.reference.has_virtual_destructor"> has_virtual_destructor</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">has_virtual_destructor</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ type with a virtual destructor then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">false_type</link>,
+ and has to be explicitly specialized for types with virtual destructors unless
+ the compiler used has compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ that enable the trait to do the right thing: currently (May 2005) only Visual
+ C++ 8 and GCC-4.3 have the necessary <link linkend="boost_typetraits.intrinsics">intrinsics</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 12.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">has_virtual_destructor</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_constant">
+ <title><link linkend="boost_typetraits.reference.integral_constant"> integral_constant</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">val</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_constant</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="identifier">val</phrase><phrase role="special">></phrase> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">typedef</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">T</phrase> <phrase role="identifier">value</phrase> <phrase role="special">=</phrase> <phrase role="identifier">val</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">true</phrase><phrase role="special">></phrase> <phrase role="identifier">true_type</phrase><phrase role="special">;</phrase>
+<phrase role="keyword">typedef</phrase> <phrase role="identifier">integral_constant</phrase><phrase role="special"><</phrase><phrase role="keyword">bool</phrase><phrase role="special">,</phrase> <phrase role="keyword">false</phrase><phrase role="special">></phrase> <phrase role="identifier">false_type</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ Class template <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_constant</phrase></computeroutput>
+ is the common base class for all the value-based type traits. The two typedef's
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">true_type</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">false_type</phrase></computeroutput> are provided for convenience:
+ most of the value traits are Boolean properties and so will inherit from
+ one of these.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.integral_promotion">
+ <title><link linkend="boost_typetraits.reference.integral_promotion"> integral_promotion</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">integral_promotion</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral promotion can be applied
+ to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>, then
+ applies integral promotion to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field).
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">integral_promotion</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">integral_promotion</phrase><phrase role="special"><</phrase><phrase role="keyword">enum</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">float_round_style</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.is_abstract">
+ <title><link linkend="boost_typetraits.reference.is_abstract"> is_abstract</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_abstract</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ abstract type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_abstract</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.is_polymorphic">is_polymorphic</link>;
+ 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
+ this in their own code if the "safe fallback" is not suitable for
+ their particular use-case.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">abc</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">abc</phrase><phrase role="special">()</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">abc</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_abstract</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_arithmetic">
+ <title><link linkend="boost_typetraits.reference.is_arithmetic"> is_arithmetic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_arithmetic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ arithmetic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Arithmetic types include integral and floating point types (see also <link linkend="boost_typetraits.reference.is_integral">is_integral</link> and
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_arithmetic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_arithmetic</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_array">
+ <title><link linkend="boost_typetraits.reference.is_array"> is_array</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_array</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ array type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_array</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can give the wrong result with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_array</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_base_of">
+ <title><link linkend="boost_typetraits.reference.is_base_of"> is_base_of</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_base_of</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If Base is base class of type
+ Derived or if both types are the same then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ This template will detect non-public base classes, and ambiguous base classes.
+ </para>
+ <para>
+ Note that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">X</phrase><phrase role="special">,</phrase><phrase role="identifier">X</phrase><phrase role="special">></phrase></computeroutput> will always inherit from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>.
+ <emphasis role="bold">This is the case even if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">X</phrase></computeroutput>
+ is not a class type</emphasis>. This is a change in behaviour from Boost-1.33
+ in order to track the Technical Report on C++ Library Extensions.
+ </para>
+ <para>
+ Types <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> and <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput> must not be incomplete types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_base_of</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput>
+ is a private base class of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>,
+ or if <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Base</phrase></computeroutput> is an ambiguous
+ base of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Derived</phrase></computeroutput>. These compilers
+ include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and
+ older versions of EDG based compilers.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="keyword">class</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">Derived</phrase> <phrase role="special">:</phrase>
+ <phrase role="keyword">public</phrase> <phrase role="identifier">Base</phrase><phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Derived</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">Base</phrase><phrase role="special">,</phrase> <phrase role="identifier">Base</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>: a class is regarded as it's
+ own base.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_base_of</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_class">
+ <title><link linkend="boost_typetraits.reference.is_class"> is_class</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_class</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ class type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_class</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link> for
+ union types. See also <link linkend="boost_typetraits.reference.is_union">is_union</link>.
+ Currently (May 2005) only Visual C++ 8 has the necessary compiler <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to correctly identify union types, and therefore make is_class function correctly.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">MyClass</phrase><phrase role="special">;</phrase></computeroutput> then:
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_complex">
+ <title><link linkend="boost_typetraits.reference.is_complex"> is_complex</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_complex</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is a complex number type then true (of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">complex</phrase><phrase role="special"><</phrase><phrase role="identifier">U</phrase><phrase role="special">></phrase></computeroutput>
+ for some type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">U</phrase></computeroutput>), otherwise
+ false.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 26.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_complex</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_compound">
+ <title><link linkend="boost_typetraits.reference.is_compound"> is_compound</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_compound</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ compound type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Any type that is not a fundamental type is a compound type (see also <link linkend="boost_typetraits.reference.is_fundamental">is_fundamental</link>).
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_compound</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">MyEnum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_compound</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_const">
+ <title><link linkend="boost_typetraits.reference.is_const"> is_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_const</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) const-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the const-qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_const</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_convertible">
+ <title><link linkend="boost_typetraits.reference.is_convertible"> is_convertible</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_convertible</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If an imaginary lvalue of type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> is convertible to type
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput> then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type From must not be an incomplete type.
+ </para>
+ <para>
+ Type To must not be an incomplete, or function type.
+ </para>
+ <para>
+ No types are considered to be convertible to array types or abstract-class
+ types.
+ </para>
+ <para>
+ This template can not detect whether a converting-constructor is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput> or not: if type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">private</phrase></computeroutput> converting constructor
+ from type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">From</phrase></computeroutput> then instantiating
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">From</phrase><phrase role="special">,</phrase> <phrase role="identifier">To</phrase><phrase role="special">></phrase></computeroutput>
+ will produce a compiler error. For this reason <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase></computeroutput>
+ can not be used to determine whether a type has a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">public</phrase></computeroutput>
+ copy-constructor or not.
+ </para>
+ <para>
+ This template will also produce compiler errors if the conversion is ambiguous,
+ for example:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">B</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">C</phrase> <phrase role="special">:</phrase> <phrase role="identifier">A</phrase> <phrase role="special">{};</phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">D</phrase> <phrase role="special">:</phrase> <phrase role="identifier">B</phrase><phrase role="special">,</phrase> <phrase role="identifier">C</phrase> <phrase role="special">{};</phrase>
+<phrase role="comment">// This produces a compiler error, the conversion is ambiguous:
+</phrase><phrase role="keyword">bool</phrase> <phrase role="keyword">const</phrase> <phrase role="identifier">y</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">D</phrase><phrase role="special">*,</phrase><phrase role="identifier">A</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase><phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4 and 8.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_abstract">is_abstract</link></computeroutput>,
+ then the template parameter <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">To</phrase></computeroutput>
+ must not be an abstract type.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_convertible</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*,</phrase> <phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the conversion would require a <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const_cast</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&,</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_convertible</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_empty">
+ <title><link linkend="boost_typetraits.reference.is_empty"> is_empty</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_empty</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an empty class type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10p5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_empty</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> In order to correctly
+ detect empty classes this trait relies on either:
+ </para>
+ <itemizedlist>
+ <listitem>
+ the compiler implementing zero sized empty base classes, or
+ </listitem>
+ <listitem>
+ the compiler providing <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to detect empty classes.
+ </listitem>
+ </itemizedlist>
+ <para>
+ Can not be used with incomplete types.
+ </para>
+ <para>
+ Can not be used with union types, until is_union can be made to work.
+ </para>
+ <para>
+ If the compiler does not support partial-specialization of class templates,
+ then this template can not be used with abstract types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">struct</phrase> <phrase role="identifier">empty_class</phrase>
+ <phrase role="special">{};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">empty_class</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_enum">
+ <title><link linkend="boost_typetraits.reference.is_enum"> is_enum</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_enum</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ enum type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_enum</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> Requires a correctly
+ functioning <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ 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.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">enum</phrase> <phrase role="identifier">my_enum</phrase>
+ <phrase role="special">{</phrase> <phrase role="identifier">one</phrase><phrase role="special">,</phrase> <phrase role="identifier">two</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_enum</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_floating_point">
+ <title><link linkend="boost_typetraits.reference.is_floating_point"> is_floating_point</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_floating_point</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ floating point type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p8.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_floating_point</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_floating_point</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_function">
+ <title><link linkend="boost_typetraits.reference.is_function"> is_function</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_function</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ function type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Note that this template does not detect <emphasis>pointers to functions</emphasis>,
+ or <emphasis>references to functions</emphasis>, these are detected by <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link> and <link linkend="boost_typetraits.reference.is_reference">is_reference</link> respectively:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">f1</phrase><phrase role="special">();</phrase> <phrase role="comment">// f1 is of function type.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f2</phrase><phrase role="special">*)();</phrase> <phrase role="comment">// f2 is a pointer to a function.
+</phrase><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">f3</phrase><phrase role="special">&)();</phrase> <phrase role="comment">// f3 is a reference to a function.
+</phrase></programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p1 and 8.3.5.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_function</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">void</phrase><phrase role="special">)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer type, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(&)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a reference to a function, not a function type.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">double</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: the argument in this case
+ is a pointer to a member function.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_function</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <tip>
+ <para>
+ Don't confuse function-types with pointers to functions:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">typedef</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="identifier">f</phrase><phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">);</phrase></computeroutput>
+ </para>
+ <para>
+ defines a function type,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase> <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a prototype for a function of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase></computeroutput>,
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">*</phrase>
+ <phrase role="identifier">pf</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">f</phrase><phrase role="special">&</phrase>
+ <phrase role="identifier">fr</phrase> <phrase role="special">=</phrase>
+ <phrase role="identifier">foo</phrase><phrase role="special">;</phrase></computeroutput>
+ </para>
+ <para>
+ declares a pointer and a reference to the function <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">foo</phrase></computeroutput>.
+ </para>
+ <para>
+ If you want to detect whether some type is a pointer-to-function then use:
+ </para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.is_function">is_function</link><phrase role="special"><</phrase><link linkend="boost_typetraits.reference.remove_pointer">remove_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+ <phrase role="special">&&</phrase> <link linkend="boost_typetraits.reference.is_pointer">is_pointer</link><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ </para>
+ <para>
+ or for pointers to member functions you can just use <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ directly.
+ </para>
+ </tip>
+ </section>
+ <section id="boost_typetraits.reference.is_fundamental">
+ <title><link linkend="boost_typetraits.reference.is_fundamental"> is_fundamental</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_fundamental</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ fundamental type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Fundamental types include integral, floating point and void types (see also
+ <link linkend="boost_typetraits.reference.is_integral">is_integral</link>,
+ <link linkend="boost_typetraits.reference.is_floating_point">is_floating_point</link>
+ and <link linkend="boost_typetraits.reference.is_void">is_void</link>)
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_fundamental</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_fundamental</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_integral">
+ <title><link linkend="boost_typetraits.reference.is_integral"> is_integral</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_integral</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ integral type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p7.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_integral</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_integral</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_function_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_function_pointer">
+ is_member_function_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_function_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member function then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a data member and not a member
+ function, see <link linkend="boost_typetraits.reference.is_member_object_pointer">is_member_object_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_function_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_object_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_object_pointer">
+ is_member_object_pointer</link></title>
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_object_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member object (a data member) then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the argument in this case is a pointer to a member function and not a
+ member object, see <link linkend="boost_typetraits.reference.is_member_function_pointer">is_member_function_pointer</link>
+ and <link linkend="boost_typetraits.reference.is_member_pointer">is_member_pointer</link>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_object_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_member_pointer">
+ <title><link linkend="boost_typetraits.reference.is_member_pointer"> is_member_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_member_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer to a member (either a function or a data member) then inherits from
+ <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_member_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">char</phrase><phrase role="special">)>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_member_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_object">
+ <title><link linkend="boost_typetraits.reference.is_object"> is_object</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_object</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ object type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ All types are object types except references, void, and function types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_object</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">void</phrase><phrase role="special">)</phrase><phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">&>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: reference types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="keyword">double</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>: function types are not
+ objects
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ void is not an object type
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_object</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pod">
+ <title><link linkend="boost_typetraits.reference.is_pod"> is_pod</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pod</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ POD type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ POD stands for "Plain old data". Arithmetic types, and enumeration
+ types, a pointers and pointer to members are all PODs. Classes and unions
+ can also be POD's if they have no non-static data members that are of reference
+ or non-POD type, no user defined constructors, no user defined assignment
+ operators, no private or protected non-static data members, no virtual functions
+ and no base classes. Finally, a cv-qualified POD is still a POD, as is an
+ array of PODs.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10 and 9p4 (Note
+ that POD's are also aggregates, see 8.5.1).
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ Without some (as yet unspecified) help from the compiler, is<emphasis role="underline">pod
+ will never report that a class or struct is a POD; this is always safe, if
+ possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have
+ the necessary compiler-</emphasis>_intrinsics.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pod</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pod</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_pointer">
+ <title><link linkend="boost_typetraits.reference.is_pointer"> is_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_pointer</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ pointer type (includes function pointers, but excludes pointers to members)
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2p2 and 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <important>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput> detects "real"
+ pointer types only, and <emphasis>not</emphasis> smart pointers. Users
+ should not specialise <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_pointer</phrase></computeroutput>
+ 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
+ general to auto-magically detect smart pointer types, so such a trait would
+ have to be partially specialised for each supported smart pointer type.
+ </para>
+ </important>
+ </section>
+ <section id="boost_typetraits.reference.is_polymorphic">
+ <title><link linkend="boost_typetraits.reference.is_polymorphic"> is_polymorphic</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_polymorphic</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ polymorphic type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> must be a complete
+ type.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 10.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> The implementation
+ requires some knowledge of the compilers ABI, it does actually seem to work
+ with the majority of compilers though.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_polymorphic</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ Given: <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">class</phrase> <phrase role="identifier">poly</phrase><phrase role="special">{</phrase> <phrase role="keyword">virtual</phrase> <phrase role="special">~</phrase><phrase role="identifier">poly</phrase><phrase role="special">();</phrase> <phrase role="special">};</phrase></computeroutput>
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">poly</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_polymorphic</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_same">
+ <title><link linkend="boost_typetraits.reference.is_same"> is_same</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">,</phrase> <phrase role="keyword">class</phrase> <phrase role="identifier">U</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_same</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T and U are the same types
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_same</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with abstract, incomplete or function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&,</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_same</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_scalar">
+ <title><link linkend="boost_typetraits.reference.is_scalar"> is_scalar</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_scalar</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ scalar type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Scalar types include integral, floating point, enumeration, pointer, and
+ pointer-to-member types.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_scalar</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(</phrase><phrase role="identifier">MyClass</phrase><phrase role="special">::*)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_scalar</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_signed">
+ <title><link linkend="boost_typetraits.reference.is_signed"> is_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_signed</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an signed integer type
+ or an enumerated type with an underlying signed integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">myclass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_stateless">
+ <title><link linkend="boost_typetraits.reference.is_stateless"> is_stateless</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_stateless</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Ff T is a stateless type then
+ inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ Type T must be a complete type.
+ </para>
+ <para>
+ A stateless type is a type that has no storage and whose constructors and
+ destructors are trivial. That means that <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_stateless</phrase></computeroutput>
+ only inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>
+ if the following expression is <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">true</phrase></computeroutput>:
+ </para>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_constructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_copy</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">has_trivial_destructor</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_class</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+<phrase role="special">&&</phrase> <phrase role="special">::</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">is_empty</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9p10.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_stateless</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial-specialization of class templates, then this template
+ can not be used with function types.
+ </para>
+ <para>
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this template work automatically.
+ </para>
+ </section>
+ <section id="boost_typetraits.reference.is_reference">
+ <title><link linkend="boost_typetraits.reference.is_reference"> is_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_reference</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a reference pointer type
+ then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="special">(&)(</phrase><phrase role="keyword">long</phrase><phrase role="special">)>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis> (the argument in this case
+ is a reference to a function).
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_reference</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_union">
+ <title><link linkend="boost_typetraits.reference.is_union"> is_union</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_union</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ union type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ Currently requires some kind of compiler support, otherwise unions are identified
+ as classes.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.2 and 9.5.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> 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 <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ 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 <link linkend="boost_typetraits.intrinsics">intrinsics</link>
+ to make this trait "just work" without user intervention.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_union</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_union</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_unsigned">
+ <title><link linkend="boost_typetraits.reference.is_unsigned"> is_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_unsigned</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is an unsigned integer type
+ or an enumerated type with an underlying unsigned integer type, then inherits
+ from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1, 7.2.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="identifier">myclass</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">char</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ whose value depends upon the signedness of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">char</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_unsigned</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_void">
+ <title><link linkend="boost_typetraits.reference.is_void"> is_void</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_void</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (possibly cv-qualified)
+ void type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1p9.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_void</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="keyword">void</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>false</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_void</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.is_volatile">
+ <title><link linkend="boost_typetraits.reference.is_volatile"> is_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">is_volatile</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> If T is a (top level) volatile-qualified
+ type then inherits from <link linkend="boost_typetraits.reference.integral_constant">true_type</link>,
+ otherwise inherits from <link linkend="boost_typetraits.reference.integral_constant">false_type</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">is_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">volatile</phrase> <phrase role="keyword">int</phrase><phrase role="special">></phrase></computeroutput> inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">volatile</phrase>
+ <phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">true_type</link></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>true</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>false</emphasis>:
+ the volatile qualifier is not at the top level in this case.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">is_volatile</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">bool</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.make_signed">
+ <title><link linkend="boost_typetraits.reference.make_signed"> make_signed</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_signed</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_signed</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">long</phrase>
+ <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ A signed integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.make_unsigned">
+ <title><link linkend="boost_typetraits.reference.make_unsigned"> make_unsigned</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">make_unsigned</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> 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.
+ </para>
+ <para>
+ If T has any cv-qualifiers then these are also present on the result type.
+ </para>
+ <para>
+ <emphasis role="bold">Requires:</emphasis> T must be an integer or enumerated
+ type, and must not be the type bool.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.1.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">make_unsigned</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase>
+ <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">const</phrase> <phrase role="keyword">unsigned</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="keyword">long</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="identifier">my_enum</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as the enum.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">make_signed</phrase><phrase role="special"><</phrase><phrase role="keyword">wchar_t</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ An unsigned integer type with the same width as wchar_t.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.promote">
+ <title><link linkend="boost_typetraits.reference.promote"> promote</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">promote</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If integral or floating point promotion
+ can be applied to an rvalue of type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ then applies integral and floating point promotions to <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ and keeps cv-qualifiers of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ See also <link linkend="boost_typetraits.reference.integral_promotion">integral_promotion</link>
+ and <link linkend="boost_typetraits.reference.floating_point_promotion">floating_point_promotion</link>.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 4.5 except 4.5/3
+ (integral bit-field) and 4.6.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">promote</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="keyword">float</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">double</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">promote</phrase><phrase role="special"><</phrase><phrase role="keyword">short</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">short</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.rank">
+ <title><link linkend="boost_typetraits.reference.rank"> rank</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">rank</phrase> <phrase role="special">:</phrase> <phrase role="keyword">public</phrase> <link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)></phrase> <phrase role="special">{};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">Inherits:</emphasis> Class template rank inherits from
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)></phrase></computeroutput>,
+ where <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is the
+ number of array dimensions in type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>.
+ </para>
+ <para>
+ If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> is not an array type,
+ then <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">RANK</phrase><phrase role="special">(</phrase><phrase role="identifier">T</phrase><phrase role="special">)</phrase></computeroutput> is zero.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">rank</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <para>
+ <emphasis role="bold">Examples:</emphasis>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[]></phrase></computeroutput>
+ inherits from <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">1</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">double</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="boost_typetraits.reference.integral_constant">integral_constant</link><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase role="special">,</phrase> <phrase role="number">3</phrase><phrase role="special">></phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">1</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput>
+ is an integral constant expression that evaluates to <emphasis>1</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>2</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">value</phrase></computeroutput> is an integral constant expression
+ that evaluates to <emphasis>0</emphasis>.
+ </para>
+ </para>
+ </blockquote>
+ <blockquote>
+ <para>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">rank</phrase><phrase role="special"><</phrase><phrase role="identifier">T</phrase><phrase role="special">>::</phrase><phrase role="identifier">value_type</phrase></computeroutput> is the type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase></computeroutput>.
+ </para>
+ </para>
+ </blockquote>
+ </section>
+ <section id="boost_typetraits.reference.remove_all_extents">
+ <title><link linkend="boost_typetraits.reference.remove_all_extents"> remove_all_extents</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_all_extents</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes all of the array bounds on <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ otherwise leaves <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_all_extents</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">3</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_all_extents</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_const">
+ <title><link linkend="boost_typetraits.reference.remove_const"> remove_const</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_const</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> const-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_const</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_const</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_cv">
+ <title><link linkend="boost_typetraits.reference.remove_cv"> remove_cv</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_cv</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> cv-qualifiers removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_cv</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_cv</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_extent">
+ <title><link linkend="boost_typetraits.reference.remove_extent"> remove_extent</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_extent</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> If <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ is an array type, then removes the topmost array bound, otherwise leaves
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput> unchanged.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.4.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_extent</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">][</phrase><phrase role="number">4</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">4</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">[][</phrase><phrase role="number">2</phrase><phrase role="special">]>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">[</phrase><phrase role="number">2</phrase><phrase role="special">]</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_extent</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_pointer">
+ <title><link linkend="boost_typetraits.reference.remove_pointer"> remove_pointer</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_pointer</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any pointer modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.1.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_pointer</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">**>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_pointer</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_reference">
+ <title><link linkend="boost_typetraits.reference.remove_reference"> remove_reference</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_reference</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any reference modifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 8.3.2.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_reference</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_reference</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">*&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.remove_volatile">
+ <title><link linkend="boost_typetraits.reference.remove_volatile"> remove_volatile</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="keyword">class</phrase> <phrase role="identifier">T</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">remove_volatile</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> The same type as <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>,
+ but with any <emphasis>top level</emphasis> volatile-qualifier removed.
+ </para>
+ <para>
+ <emphasis role="bold">C++ Standard Reference:</emphasis> 3.9.3.
+ </para>
+ <para>
+ <emphasis role="bold">Compiler Compatibility:</emphasis> If the compiler
+ does not support partial specialization of class-templates then this template
+ will compile, but the member <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">type</phrase></computeroutput>
+ will always be the same as type <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">T</phrase></computeroutput>
+ except where <link linkend="boost_typetraits.category.transform.broken_compiler_workarounds_">compiler
+ workarounds</link> have been applied.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">remove_volatile</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ <table frame="all"> <title>Examples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Expression
+ </para>
+ </entry><entry>
+ <para>
+ Result Type
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">volatile</phrase><phrase role="special">>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">&>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">remove_volatile</phrase><phrase role="special"><</phrase><phrase role="keyword">int</phrase> <phrase role="keyword">volatile</phrase><phrase role="special">*>::</phrase><phrase role="identifier">type</phrase></computeroutput>
+ </para>
+ </entry><entry>
+ <para>
+ <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">int</phrase> <phrase role="keyword">const</phrase><phrase role="special">*</phrase></computeroutput>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="boost_typetraits.reference.type_with_alignment">
+ <title><link linkend="boost_typetraits.reference.type_with_alignment"> type_with_alignment</link></title>
+
+<programlisting xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">template</phrase> <phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">Align</phrase><phrase role="special">></phrase>
+<phrase role="keyword">struct</phrase> <phrase role="identifier">type_with_alignment</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">typedef</phrase> <replaceable>see-below</replaceable> <phrase role="identifier">type</phrase><phrase role="special">;</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ <para>
+ <emphasis role="bold">type:</emphasis> a built-in or POD type with an alignment
+ that is a multiple of <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="identifier">Align</phrase></computeroutput>.
+ </para>
+ <para>
+ <emphasis role="bold">Header:</emphasis> <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase>
+ <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">/</phrase><phrase role="identifier">type_with_alignment</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ or <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"> <phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">type_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">></phrase></computeroutput>
+ </para>
+ </section>
+ </section>
+ <section id="boost_typetraits.credits">
+ <title><link linkend="boost_typetraits.credits"> Credits</link></title>
+ <para>
+ This documentation was pulled together by John Maddock, using <ulink url="../../../../doc/html/quickbook.html">Boost.Quickbook</ulink>
+ and <ulink url="../../../../doc/html/boostbook.html">Boost.DocBook</ulink>.
+ </para>
+ <para>
+ The original version of this library was created by Steve Cleary, Beman Dawes,
+ Howard Hinnant, and John Maddock. John Maddock is the current maintainer of
+ the library.
+ </para>
+ <para>
+ This version of type traits library is based on contributions by Adobe Systems
+ Inc, David Abrahams, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
+ Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Thorsten Ottosen, Robert
+ Ramey and Jeremy Siek.
+ </para>
+ <para>
+ Mat Marcus and Jesse Jones invented, and <ulink url="http://opensource.adobe.com/project4/project.shtml">published
+ a paper describing</ulink>, the partial specialization workarounds used in
+ this library.
+ </para>
+ <para>
+ Aleksey Gurtovoy added MPL integration to the library.
+ </para>
+ <para>
+ The <link linkend="boost_typetraits.reference.is_convertible">is_convertible</link>
+ template is based on code originally devised by Andrei Alexandrescu, see "<ulink url="http://www.cuj.com/experts/1810/alexandr.htm?topic=experts">Generic<Programming>:
+ Mappings between Types and Values</ulink>".
+ </para>
+ <para>
+ The latest version of this library and documentation can be found at <ulink url="http://www.boost.org">www.boost.org</ulink>. Bugs, suggestions and discussion
+ should be directed to boost_at_[hidden] (see <ulink url="http://www.boost.org/more/mailing_lists.htm#main">www.boost.org/more/mailing_lists.htm#main</ulink>
+ for subscription details).
+ </para>
+ </section>
+ <para>
+ <index type="class_name">
+ <title>Class Index</title>
+ </index>
+ <index type="typedef_name">
+ <title>Typedef Index</title>
+ </index>
+ <index type="macro_name">
+ <title>Macro Index</title>
+ </index>
+ <index/>
+ </para>
+</chapter>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk