forked from boostorg/type_traits
Merged accumulated bug fixes from Trunk.
Refs #6795. Refs #6394. [SVN r79562]
This commit is contained in:
@ -31,7 +31,7 @@ __header ` #include <boost/type_traits/decay.hpp>` or ` #include <boost/type_tra
|
||||
|
||||
[[`decay<int(&)(double)>::type`] [`int(*)(double)`]]
|
||||
|
||||
[[`int(*)(double`] [`int(*)(double)`]]
|
||||
[[`int(*)(double)`] [`int(*)(double)`]]
|
||||
[[`int(double)`] [`int(*)(double)`]]
|
||||
|
||||
]
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Background and Tutorial</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="intro.html" title="Introduction">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="intro.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="category.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_background">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.background"></a><a class="link" href="background.html" title="Background and Tutorial">Background and Tutorial</a>
|
||||
</h2></div></div></div>
|
||||
@ -55,9 +55,10 @@
|
||||
terminated string, safe in the knowledge that specializations of <code class="computeroutput"><span class="identifier">char_traits</span></code> will use the most appropriate
|
||||
method available to them.
|
||||
</p>
|
||||
<a name="boost_typetraits.background.type_traits"></a><h5>
|
||||
<a name="boost_typetraits.background.type_traits-heading"></a>
|
||||
<a class="link" href="background.html#boost_typetraits.background.type_traits">Type Traits</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.background.h0"></a>
|
||||
<span><a name="boost_typetraits.background.type_traits"></a></span><a class="link" href="background.html#boost_typetraits.background.type_traits">Type
|
||||
Traits</a>
|
||||
</h5>
|
||||
<p>
|
||||
Class <code class="computeroutput"><span class="identifier">char_traits</span></code> is a classic
|
||||
@ -83,9 +84,9 @@
|
||||
for brevity, namespace-qualification is omitted in most of the code samples
|
||||
given.
|
||||
</p>
|
||||
<a name="boost_typetraits.background.implementation"></a><h5>
|
||||
<a name="boost_typetraits.background.implementation-heading"></a>
|
||||
<a class="link" href="background.html#boost_typetraits.background.implementation">Implementation</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.background.h1"></a>
|
||||
<span><a name="boost_typetraits.background.implementation"></a></span><a class="link" href="background.html#boost_typetraits.background.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
There are far too many separate classes contained in the type-traits library
|
||||
@ -97,10 +98,10 @@
|
||||
from <code class="computeroutput"><a class="link" href="reference/integral_constant.html" title="integral_constant">true_type</a></code>
|
||||
only if <code class="computeroutput"><span class="identifier">T</span></code> is <code class="computeroutput"><span class="keyword">void</span></code>.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="reference/is_void.html" title="is_void">is_void</a> <span class="special">:</span> <span class="keyword">public</span> <a class="link" href="reference/integral_constant.html" title="integral_constant">false_type</a><span class="special">{};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><></span>
|
||||
<span class="keyword">template</span> <span class="special"><></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="reference/is_void.html" title="is_void">is_void</a><span class="special"><</span><span class="keyword">void</span><span class="special">></span> <span class="special">:</span> <span class="keyword">public</span> <a class="link" href="reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
@ -115,10 +116,10 @@
|
||||
a pointer, and a partial specialization to handle all the cases where T is
|
||||
a pointer:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="reference/is_pointer.html" title="is_pointer">is_pointer</a> <span class="special">:</span> <span class="keyword">public</span> <a class="link" href="reference/integral_constant.html" title="integral_constant">false_type</a><span class="special">{};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="reference/is_pointer.html" title="is_pointer">is_pointer</a><span class="special"><</span><span class="identifier">T</span><span class="special">*></span> <span class="special">:</span> <span class="keyword">public</span> <a class="link" href="reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
@ -154,11 +155,11 @@
|
||||
that is the same type as T but with any top-level array bounds removed; this
|
||||
is an example of a traits class that performs a transformation on a type:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="reference/remove_extent.html" title="remove_extent">remove_extent</a>
|
||||
<span class="special">{</span> <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span> <span class="special">};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">></span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="reference/remove_extent.html" title="remove_extent">remove_extent</a><span class="special"><</span><span class="identifier">T</span><span class="special">[</span><span class="identifier">N</span><span class="special">]></span>
|
||||
<span class="special">{</span> <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span> <span class="special">};</span>
|
||||
</pre>
|
||||
@ -173,9 +174,10 @@
|
||||
after the class name do have to match the number and type of the parameters
|
||||
in the default template.
|
||||
</p>
|
||||
<a name="boost_typetraits.background.optimized_copy"></a><h5>
|
||||
<a name="boost_typetraits.background.optimized_copy-heading"></a>
|
||||
<a class="link" href="background.html#boost_typetraits.background.optimized_copy">Optimized copy</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.background.h2"></a>
|
||||
<span><a name="boost_typetraits.background.optimized_copy"></a></span><a class="link" href="background.html#boost_typetraits.background.optimized_copy">Optimized
|
||||
copy</a>
|
||||
</h5>
|
||||
<p>
|
||||
As an example of how the type traits classes can be used, consider the standard
|
||||
@ -246,9 +248,10 @@
|
||||
to the optimized version where appropriate, otherwise it will call the "slow
|
||||
but safe version".
|
||||
</p>
|
||||
<a name="boost_typetraits.background.was_it_worth_it_"></a><h5>
|
||||
<a name="boost_typetraits.background.was_it_worth_it_-heading"></a>
|
||||
<a class="link" href="background.html#boost_typetraits.background.was_it_worth_it_">Was it worth it?</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.background.h3"></a>
|
||||
<span><a name="boost_typetraits.background.was_it_worth_it_"></a></span><a class="link" href="background.html#boost_typetraits.background.was_it_worth_it_">Was
|
||||
it worth it?</a>
|
||||
</h5>
|
||||
<p>
|
||||
It has often been repeated in these columns that "premature optimization
|
||||
@ -378,9 +381,10 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><a name="boost_typetraits.background.pair_of_references"></a><h5>
|
||||
<a name="boost_typetraits.background.pair_of_references-heading"></a>
|
||||
<a class="link" href="background.html#boost_typetraits.background.pair_of_references">Pair of References</a>
|
||||
<br class="table-break"><h5>
|
||||
<a name="boost_typetraits.background.h4"></a>
|
||||
<span><a name="boost_typetraits.background.pair_of_references"></a></span><a class="link" href="background.html#boost_typetraits.background.pair_of_references">Pair
|
||||
of References</a>
|
||||
</h5>
|
||||
<p>
|
||||
The optimized copy example shows how type traits may be used to perform optimization
|
||||
@ -395,8 +399,8 @@
|
||||
the comparison operators, default constructor, and template copy constructor
|
||||
for simplicity:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">pair</span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">pair</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">T1</span> <span class="identifier">first_type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">T2</span> <span class="identifier">second_type</span><span class="special">;</span>
|
||||
@ -566,8 +570,8 @@
|
||||
that can contain non-reference types, reference types, and constant reference
|
||||
types:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">pair</span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">pair</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">T1</span> <span class="identifier">first_type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">T2</span> <span class="identifier">second_type</span><span class="special">;</span>
|
||||
@ -596,9 +600,9 @@
|
||||
partial specialization to the type traits classes, resulting in code that is
|
||||
easier to maintain and easier to understand.
|
||||
</p>
|
||||
<a name="boost_typetraits.background.conclusion"></a><h5>
|
||||
<a name="boost_typetraits.background.conclusion-heading"></a>
|
||||
<a class="link" href="background.html#boost_typetraits.background.conclusion">Conclusion</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.background.h5"></a>
|
||||
<span><a name="boost_typetraits.background.conclusion"></a></span><a class="link" href="background.html#boost_typetraits.background.conclusion">Conclusion</a>
|
||||
</h5>
|
||||
<p>
|
||||
We hope that in this article we have been able to give you some idea of what
|
||||
@ -609,17 +613,17 @@
|
||||
does not have to sink to the lowest common denominator, and that templates
|
||||
can be optimal as well as generic.
|
||||
</p>
|
||||
<a name="boost_typetraits.background.acknowledgements"></a><h5>
|
||||
<a name="boost_typetraits.background.acknowledgements-heading"></a>
|
||||
<a class="link" href="background.html#boost_typetraits.background.acknowledgements">Acknowledgements</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.background.h6"></a>
|
||||
<span><a name="boost_typetraits.background.acknowledgements"></a></span><a class="link" href="background.html#boost_typetraits.background.acknowledgements">Acknowledgements</a>
|
||||
</h5>
|
||||
<p>
|
||||
The authors would like to thank Beman Dawes and Howard Hinnant for their helpful
|
||||
comments when preparing this article.
|
||||
</p>
|
||||
<a name="boost_typetraits.background._anchor_id__background_references___references"></a><h5>
|
||||
<a name="boost_typetraits.background._anchor_id__background_references___references-heading"></a>
|
||||
<a class="link" href="background.html#boost_typetraits.background._anchor_id__background_references___references"><a name="background.references"></a>References</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.background.h7"></a>
|
||||
<span><a name="boost_typetraits.background._anchor_id__background_references___references"></a></span><a class="link" href="background.html#boost_typetraits.background._anchor_id__background_references___references"><a name="background.references"></a>References</a>
|
||||
</h5>
|
||||
<div class="orderedlist"><ol class="orderedlist" type="1">
|
||||
<li class="listitem">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Type Traits by Category</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="background.html" title="Background and Tutorial">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="background.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="category/value_traits.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_category">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.category"></a><a class="link" href="category.html" title="Type Traits by Category">Type Traits by Category</a>
|
||||
</h2></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Synthesizing Types with Specific Alignments</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../category.html" title="Type Traits by Category">
|
||||
<link rel="prev" href="transform.html" title="Type Traits that Transform One Type to Another">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="transform.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../category.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="function.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_category_alignment">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.category.alignment"></a><a class="link" href="alignment.html" title="Synthesizing Types with Specific Alignments">Synthesizing Types
|
||||
with Specific Alignments</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Decomposing Function Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../category.html" title="Type Traits by Category">
|
||||
<link rel="prev" href="alignment.html" title="Synthesizing Types with Specific Alignments">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="alignment.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../category.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../user_defined.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_category_function">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.category.function"></a><a class="link" href="function.html" title="Decomposing Function Types">Decomposing Function
|
||||
Types</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Type Traits that Transform One Type to Another</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../category.html" title="Type Traits by Category">
|
||||
<link rel="prev" href="value_traits/operators.html" title="Operator Type Traits">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="value_traits/operators.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../category.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="alignment.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_category_transform">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.category.transform"></a><a class="link" href="transform.html" title="Type Traits that Transform One Type to Another">Type Traits that
|
||||
Transform One Type to Another</a>
|
||||
@ -102,9 +102,9 @@
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../reference/remove_volatile.html" title="remove_volatile">remove_volatile</a><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="boost_typetraits.category.transform.broken_compiler_workarounds_"></a><h5>
|
||||
<a name="boost_typetraits.category.transform.broken_compiler_workarounds_-heading"></a>
|
||||
<a class="link" href="transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
|
||||
<h5>
|
||||
<a name="boost_typetraits.category.transform.h0"></a>
|
||||
<span><a name="boost_typetraits.category.transform.broken_compiler_workarounds_"></a></span><a class="link" href="transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
|
||||
Compiler Workarounds:</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Type Traits that Describe the Properties of a Type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../category.html" title="Type Traits by Category">
|
||||
<link rel="prev" href="../category.html" title="Type Traits by Category">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../category.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../category.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="value_traits/primary.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_category_value_traits">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.category.value_traits"></a><a class="link" href="value_traits.html" title="Type Traits that Describe the Properties of a Type">Type Traits that
|
||||
Describe the Properties of a Type</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Operator Type Traits</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
|
||||
<link rel="prev" href="relate.html" title="Relationships Between Two Types">
|
||||
@ -22,14 +22,14 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="relate.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../transform.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_category_value_traits_operators">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_typetraits.category.value_traits.operators"></a><a class="link" href="operators.html" title="Operator Type Traits">Operator
|
||||
Type Traits</a>
|
||||
</h4></div></div></div>
|
||||
<a name="boost_typetraits.category.value_traits.operators.introduction"></a><h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.introduction-heading"></a>
|
||||
<a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.introduction">Introduction</a>
|
||||
<h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.h0"></a>
|
||||
<span><a name="boost_typetraits.category.value_traits.operators.introduction"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.introduction">Introduction</a>
|
||||
</h6>
|
||||
<p>
|
||||
These traits are all <span class="emphasis"><em>value traits</em></span> inheriting from
|
||||
@ -42,7 +42,7 @@
|
||||
For example, <code class="computeroutput"><span class="identifier">has_plus</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">value</span></code>
|
||||
is a <code class="computeroutput"><span class="keyword">bool</span></code> which value is
|
||||
<code class="computeroutput"><span class="keyword">true</span></code> because it is possible
|
||||
to add a <code class="computeroutput"><span class="keyword">double</span></code> to an <code class="computeroutput"><span class="keyword">int</span></code> like in the following code:
|
||||
to add a <code class="computeroutput"><span class="keyword">double</span></code> to an <code class="computeroutput"><span class="keyword">int</span></code> like in the following code:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span><span class="special">;</span>
|
||||
<span class="keyword">double</span> <span class="identifier">d</span><span class="special">;</span>
|
||||
@ -54,7 +54,7 @@
|
||||
is <code class="computeroutput"><span class="keyword">true</span></code> because it is possible
|
||||
to add a <code class="computeroutput"><span class="keyword">double</span></code> to an <code class="computeroutput"><span class="keyword">int</span></code> and the result (<code class="computeroutput"><span class="keyword">double</span></code>)
|
||||
can be converted to a <code class="computeroutput"><span class="keyword">float</span></code>
|
||||
argument like in the following code:
|
||||
argument like in the following code:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="keyword">float</span><span class="special">)</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">int</span> <span class="identifier">i</span><span class="special">;</span>
|
||||
@ -63,9 +63,9 @@
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<a name="boost_typetraits.category.value_traits.operators.example_of_application"></a><h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.example_of_application-heading"></a>
|
||||
<a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.example_of_application">Example
|
||||
<h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.h1"></a>
|
||||
<span><a name="boost_typetraits.category.value_traits.operators.example_of_application"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.example_of_application">Example
|
||||
of application</a>
|
||||
</h6>
|
||||
<p>
|
||||
@ -75,7 +75,6 @@
|
||||
as follows:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_plus_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
|
||||
@ -117,7 +116,6 @@
|
||||
operation:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
@ -150,12 +148,12 @@
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<a name="boost_typetraits.category.value_traits.operators.description"></a><h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.description-heading"></a>
|
||||
<a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.description">Description</a>
|
||||
<h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.h2"></a>
|
||||
<span><a name="boost_typetraits.category.value_traits.operators.description"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.description">Description</a>
|
||||
</h6>
|
||||
<p>
|
||||
The syntax is the following:
|
||||
The syntax is the following:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <code class="computeroutput"><span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Rhs</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Ret</span><span class="special">=</span><span class="identifier">dont_care</span> <span class="special">></span></code> <span class="identifier">has_op</span><span class="special">;</span> <span class="comment">// prefix operator</span>
|
||||
<span class="keyword">template</span> <code class="computeroutput"><span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Lhs</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Ret</span><span class="special">=</span><span class="identifier">dont_care</span> <span class="special">></span></code> <span class="identifier">has_op</span><span class="special">;</span> <span class="comment">// postfix operator</span>
|
||||
@ -190,7 +188,7 @@
|
||||
to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value can be used as argument to a function expecting
|
||||
<code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
<code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -734,23 +732,23 @@
|
||||
using the same technique: <code class="computeroutput"><span class="keyword">operator</span><span class="special">=</span></code>, <code class="computeroutput"><span class="keyword">operator</span><span class="special">-></span></code>, <code class="computeroutput"><span class="keyword">operator</span><span class="special">&</span></code>, <code class="computeroutput"><span class="keyword">operator</span><span class="special">[]</span></code>, <code class="computeroutput"><span class="keyword">operator</span><span class="special">,</span></code>, <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code>, <code class="computeroutput"><span class="keyword">operator</span>
|
||||
<span class="keyword">new</span></code>.
|
||||
</p>
|
||||
<a name="boost_typetraits.category.value_traits.operators.cv_qualifiers_and_references"></a><h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.cv_qualifiers_and_references-heading"></a>
|
||||
<a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.cv_qualifiers_and_references">cv
|
||||
<h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.h3"></a>
|
||||
<span><a name="boost_typetraits.category.value_traits.operators.cv_qualifiers_and_references"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.cv_qualifiers_and_references">cv
|
||||
qualifiers and references</a>
|
||||
</h6>
|
||||
<p>
|
||||
A reference sign <code class="computeroutput"><span class="special">&</span></code> in
|
||||
the operator argument is ignored so that <code class="computeroutput"><span class="identifier">has_plus</span><span class="special"><</span> <span class="keyword">int</span><span class="special">&,</span> <span class="keyword">double</span><span class="special">&</span> <span class="special">>::</span><span class="identifier">value</span><span class="special">==</span><span class="identifier">has_plus</span><span class="special"><</span>
|
||||
<span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span> <span class="special">>::</span><span class="identifier">value</span></code>. This has been chosen because if
|
||||
the following code works (does not work):
|
||||
the following code works (does not work):
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span><span class="special">;</span>
|
||||
<span class="keyword">double</span> <span class="identifier">d</span><span class="special">;</span>
|
||||
<span class="identifier">i</span><span class="special">+</span><span class="identifier">d</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
the following code also works (does not work):
|
||||
the following code also works (does not work):
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">int</span> <span class="special">&</span><span class="identifier">ir</span><span class="special">=</span><span class="identifier">i</span><span class="special">;</span>
|
||||
<span class="keyword">double</span> <span class="special">&</span><span class="identifier">dr</span><span class="special">=</span><span class="identifier">d</span><span class="special">;</span>
|
||||
@ -1129,17 +1127,17 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><a name="boost_typetraits.category.value_traits.operators.implementation"></a><h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.implementation-heading"></a>
|
||||
<a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.implementation">Implementation</a>
|
||||
<br class="table-break"><h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.h4"></a>
|
||||
<span><a name="boost_typetraits.category.value_traits.operators.implementation"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.implementation">Implementation</a>
|
||||
</h6>
|
||||
<p>
|
||||
The implementation consists in only header files. The following headers
|
||||
should included first:
|
||||
should included first:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></pre>
|
||||
<p>
|
||||
or
|
||||
or
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_op</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></pre>
|
||||
<p>
|
||||
@ -1155,7 +1153,6 @@
|
||||
is presented below:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
|
||||
<span class="keyword">namespace</span> <span class="identifier">detail</span> <span class="special">{</span>
|
||||
@ -1322,16 +1319,16 @@
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<a name="boost_typetraits.category.value_traits.operators.limitation"></a><h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.limitation-heading"></a>
|
||||
<a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.limitation">Limitation</a>
|
||||
<h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.h5"></a>
|
||||
<span><a name="boost_typetraits.category.value_traits.operators.limitation"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.limitation">Limitation</a>
|
||||
</h6>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
|
||||
Requires a compiler with working SFINAE.
|
||||
</li></ul></div>
|
||||
<a name="boost_typetraits.category.value_traits.operators.known_issues"></a><h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.known_issues-heading"></a>
|
||||
<a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.known_issues">Known
|
||||
<h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.h6"></a>
|
||||
<span><a name="boost_typetraits.category.value_traits.operators.known_issues"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.known_issues">Known
|
||||
issues</a>
|
||||
</h6>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
@ -1339,7 +1336,7 @@
|
||||
These traits cannot detect whether the operators are public or not:
|
||||
if an operator is defined as a private member of type <code class="computeroutput"><span class="identifier">T</span></code> then the instantiation of the corresponding
|
||||
trait will produce a compiler error. For this reason these traits cannot
|
||||
be used to determine whether a type has a public operator or not.
|
||||
be used to determine whether a type has a public operator or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="identifier">A</span> <span class="keyword">operator</span><span class="special">-();</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_unary_minus</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator-() is private</span>
|
||||
</pre>
|
||||
@ -1350,7 +1347,7 @@
|
||||
In this case, the compiler will report an ambiguous overload because
|
||||
both the existing operator and the one we provide (with argument of
|
||||
type <code class="computeroutput"><span class="identifier">any</span></code>) need type
|
||||
conversion, so that none is preferred.
|
||||
conversion, so that none is preferred.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -1360,7 +1357,6 @@
|
||||
<span class="comment">// operator-(const A&)</span>
|
||||
<span class="comment">// both need type conversion</span>
|
||||
</pre>
|
||||
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="identifier">A</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">B</span><span class="special">&)</span> <span class="special">{</span> <span class="special">}</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
@ -1378,7 +1374,7 @@
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. This
|
||||
applies in particular to the containers of the standard library and
|
||||
<code class="computeroutput"><span class="keyword">operator</span><span class="special">==</span></code>.
|
||||
Example:
|
||||
Example:
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
@ -1413,9 +1409,9 @@
|
||||
not properly handled and would lead to undefined behavior
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_typetraits.category.value_traits.operators.acknowledgments"></a><h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.acknowledgments-heading"></a>
|
||||
<a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.acknowledgments">Acknowledgments</a>
|
||||
<h6>
|
||||
<a name="boost_typetraits.category.value_traits.operators.h7"></a>
|
||||
<span><a name="boost_typetraits.category.value_traits.operators.acknowledgments"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.acknowledgments">Acknowledgments</a>
|
||||
</h6>
|
||||
<p>
|
||||
Frederic Bron is very thankful to numerous people from the boost mailing
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Categorizing a Type</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
|
||||
<link rel="prev" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../value_traits.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="properties.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_category_value_traits_primary">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_typetraits.category.value_traits.primary"></a><a class="link" href="primary.html" title="Categorizing a Type">Categorizing
|
||||
a Type</a>
|
||||
@ -50,43 +50,43 @@
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_array.html" title="is_array">is_array</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_class.html" title="is_class">is_class</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_complex.html" title="is_complex">is_complex</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_enum.html" title="is_enum">is_enum</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_floating_point.html" title="is_floating_point">is_floating_point</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_function.html" title="is_function">is_function</a><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_integral.html" title="is_integral">is_integral</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_member_function_pointer.html" title="is_member_function_pointer">is_member_function_pointer</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_member_object_pointer.html" title="is_member_object_pointer">is_member_object_pointer</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_pointer.html" title="is_pointer">is_pointer</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_lvalue_reference.html" title="is_lvalue_reference">is_lvalue_reference</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_rvalue_reference.html" title="is_rvalue_reference">is_rvalue_reference</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_union.html" title="is_union">is_union</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_void.html" title="is_void">is_void</a><span class="special">;</span>
|
||||
</pre>
|
||||
@ -112,7 +112,7 @@
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_reference.html" title="is_reference">is_reference</a><span class="special">;</span>
|
||||
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../../reference/is_scalar.html" title="is_scalar">is_scalar</a><span class="special">;</span>
|
||||
</pre>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>General Type Properties</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
|
||||
<link rel="prev" href="primary.html" title="Categorizing a Type">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="primary.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="relate.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_category_value_traits_properties">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_typetraits.category.value_traits.properties"></a><a class="link" href="properties.html" title="General Type Properties">General
|
||||
Type Properties</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Relationships Between Two Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
|
||||
<link rel="prev" href="properties.html" title="General Type Properties">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="properties.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operators.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_category_value_traits_relate">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_typetraits.category.value_traits.relate"></a><a class="link" href="relate.html" title="Relationships Between Two Types">Relationships
|
||||
Between Two Types</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Credits</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="history.html" title="History">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="history.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../index/s11.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_credits">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.credits"></a><a class="link" href="credits.html" title="Credits">Credits</a>
|
||||
</h2></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Examples</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="mpl.html" title="MPL Interoperability">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="mpl.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="examples/copy.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_examples">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.examples"></a><a class="link" href="examples.html" title="Examples">Examples</a>
|
||||
</h2></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>An Optimized Version of std::copy</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../examples.html" title="Examples">
|
||||
<link rel="prev" href="../examples.html" title="Examples">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../examples.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../examples.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fill.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_examples_copy">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.examples.copy"></a><a class="link" href="copy.html" title="An Optimized Version of std::copy">An Optimized Version
|
||||
of std::copy</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>An Example that Omits Destructor Calls For Types with Trivial Destructors</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../examples.html" title="Examples">
|
||||
<link rel="prev" href="fill.html" title="An Optimised Version of std::fill">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="fill.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../examples.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iter.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_examples_destruct">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.examples.destruct"></a><a class="link" href="destruct.html" title="An Example that Omits Destructor Calls For Types with Trivial Destructors">An Example that Omits
|
||||
Destructor Calls For Types with Trivial Destructors</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>An Optimised Version of std::fill</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../examples.html" title="Examples">
|
||||
<link rel="prev" href="copy.html" title="An Optimized Version of std::copy">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="copy.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../examples.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="destruct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_examples_fill">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.examples.fill"></a><a class="link" href="fill.html" title="An Optimised Version of std::fill">An Optimised Version
|
||||
of std::fill</a>
|
||||
@ -64,7 +64,7 @@
|
||||
<span class="comment">// We can do an optimised fill if T has a trivial assignment </span>
|
||||
<span class="comment">// operator and if it's size is one:</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><a class="link" href="../reference/integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><a class="link" href="../reference/integral_constant.html" title="integral_constant">integral_constant</a><span class="special"><</span><span class="keyword">bool</span><span class="special">,</span>
|
||||
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><a class="link" href="../reference/has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span> <span class="special">&&</span> <span class="special">(</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span> <span class="special">==</span> <span class="number">1</span><span class="special">)></span> <span class="identifier">truth_type</span><span class="special">;</span>
|
||||
<span class="identifier">detail</span><span class="special">::</span><span class="identifier">do_fill</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">val</span><span class="special">,</span> <span class="identifier">truth_type</span><span class="special">());</span>
|
||||
<span class="special">}</span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Improving std::min with common_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../examples.html" title="Examples">
|
||||
<link rel="prev" href="to_double.html" title="Convert Numeric Types and Enums to double">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="to_double.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../examples.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_examples_improved_min">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.examples.improved_min"></a><a class="link" href="improved_min.html" title="Improving std::min with common_type">Improving std::min
|
||||
with common_type</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>An improved Version of std::iter_swap</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../examples.html" title="Examples">
|
||||
<link rel="prev" href="destruct.html" title="An Example that Omits Destructor Calls For Types with Trivial Destructors">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="destruct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../examples.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="to_double.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_examples_iter">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.examples.iter"></a><a class="link" href="iter.html" title="An improved Version of std::iter_swap">An improved Version of
|
||||
std::iter_swap</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Convert Numeric Types and Enums to double</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../examples.html" title="Examples">
|
||||
<link rel="prev" href="iter.html" title="An improved Version of std::iter_swap">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="iter.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../examples.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="improved_min.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_examples_to_double">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.examples.to_double"></a><a class="link" href="to_double.html" title="Convert Numeric Types and Enums to double">Convert Numeric
|
||||
Types and Enums to double</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>History</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="reference/type_with_alignment.html" title="type_with_alignment">
|
||||
@ -22,13 +22,14 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="reference/type_with_alignment.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="credits.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_history">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.history"></a><a class="link" href="history.html" title="History">History</a>
|
||||
</h2></div></div></div>
|
||||
<a name="boost_typetraits.history.boost_1_47_0"></a><h5>
|
||||
<a name="boost_typetraits.history.boost_1_47_0-heading"></a>
|
||||
<a class="link" href="history.html#boost_typetraits.history.boost_1_47_0">Boost 1.47.0</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.history.h0"></a>
|
||||
<span><a name="boost_typetraits.history.boost_1_47_0"></a></span><a class="link" href="history.html#boost_typetraits.history.boost_1_47_0">Boost
|
||||
1.47.0</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
@ -40,9 +41,10 @@
|
||||
<a href="https://svn.boost.org/trac/boost/ticket/4530" target="_top">#4530</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_typetraits.history.boost_1_45_0"></a><h5>
|
||||
<a name="boost_typetraits.history.boost_1_45_0-heading"></a>
|
||||
<a class="link" href="history.html#boost_typetraits.history.boost_1_45_0">Boost 1.45.0</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.history.h1"></a>
|
||||
<span><a name="boost_typetraits.history.boost_1_45_0"></a></span><a class="link" href="history.html#boost_typetraits.history.boost_1_45_0">Boost
|
||||
1.45.0</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
@ -56,9 +58,10 @@
|
||||
and <a class="link" href="reference/is_virtual_base_of.html" title="is_virtual_base_of">is_virtual_base_of</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_typetraits.history.boost_1_44_0"></a><h5>
|
||||
<a name="boost_typetraits.history.boost_1_44_0-heading"></a>
|
||||
<a class="link" href="history.html#boost_typetraits.history.boost_1_44_0">Boost 1.44.0</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.history.h2"></a>
|
||||
<span><a name="boost_typetraits.history.boost_1_44_0"></a></span><a class="link" href="history.html#boost_typetraits.history.boost_1_44_0">Boost
|
||||
1.44.0</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||||
<li class="listitem">
|
||||
@ -72,9 +75,10 @@
|
||||
Fixed ticket <a href="https://svn.boost.org/trac/boost/ticket/3621" target="_top">#3621</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_typetraits.history.boost_1_42_0"></a><h5>
|
||||
<a name="boost_typetraits.history.boost_1_42_0-heading"></a>
|
||||
<a class="link" href="history.html#boost_typetraits.history.boost_1_42_0">Boost 1.42.0</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.history.h3"></a>
|
||||
<span><a name="boost_typetraits.history.boost_1_42_0"></a></span><a class="link" href="history.html#boost_typetraits.history.boost_1_42_0">Boost
|
||||
1.42.0</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
|
||||
Fixed issue <a href="https://svn.boost.org/trac/boost/ticket/3704" target="_top">#3704</a>.
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Support for Compiler Intrinsics</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="user_defined.html" title="User Defined Specializations">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="user_defined.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mpl.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_intrinsics">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.intrinsics"></a><a class="link" href="intrinsics.html" title="Support for Compiler Intrinsics">Support for Compiler Intrinsics</a>
|
||||
</h2></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Introduction</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="background.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_intro">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.intro"></a><a class="link" href="intro.html" title="Introduction">Introduction</a>
|
||||
</h2></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>MPL Interoperability</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="intrinsics.html" title="Support for Compiler Intrinsics">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="intrinsics.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_mpl">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.mpl"></a><a class="link" href="mpl.html" title="MPL Interoperability">MPL Interoperability</a>
|
||||
</h2></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Alphabetical Reference</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="prev" href="examples/improved_min.html" title="Improving std::min with common_type">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="examples/improved_min.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reference/add_const.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_typetraits.reference"></a><a class="link" href="reference.html" title="Alphabetical Reference">Alphabetical Reference</a>
|
||||
</h2></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>add_const</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="../reference.html" title="Alphabetical Reference">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../reference.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="add_cv.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_add_const">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_const"></a><a class="link" href="add_const.html" title="add_const">add_const</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>add_cv</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_const.html" title="add_const">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="add_const.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="add_lvalue_reference.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_add_cv">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_cv"></a><a class="link" href="add_cv.html" title="add_cv">add_cv</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>add_lvalue_reference</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_cv.html" title="add_cv">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="add_cv.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="add_pointer.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_add_lvalue_reference">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_lvalue_reference"></a><a class="link" href="add_lvalue_reference.html" title="add_lvalue_reference">add_lvalue_reference</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>add_pointer</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_lvalue_reference.html" title="add_lvalue_reference">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="add_lvalue_reference.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="add_reference.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_add_pointer">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_pointer"></a><a class="link" href="add_pointer.html" title="add_pointer">add_pointer</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>add_reference</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_pointer.html" title="add_pointer">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="add_pointer.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="add_rvalue_reference.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_add_reference">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_reference"></a><a class="link" href="add_reference.html" title="add_reference">add_reference</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>add_rvalue_reference</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_reference.html" title="add_reference">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="add_reference.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="add_volatile.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_add_rvalue_reference">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_rvalue_reference"></a><a class="link" href="add_rvalue_reference.html" title="add_rvalue_reference">add_rvalue_reference</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>add_volatile</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_rvalue_reference.html" title="add_rvalue_reference">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="add_rvalue_reference.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="aligned_storage.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_add_volatile">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.add_volatile"></a><a class="link" href="add_volatile.html" title="add_volatile">add_volatile</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>aligned_storage</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="add_volatile.html" title="add_volatile">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="add_volatile.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="alignment_of.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_aligned_storage">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.aligned_storage"></a><a class="link" href="aligned_storage.html" title="aligned_storage">aligned_storage</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>alignment_of</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="aligned_storage.html" title="aligned_storage">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="aligned_storage.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="conditional.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_alignment_of">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.alignment_of"></a><a class="link" href="alignment_of.html" title="alignment_of">alignment_of</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>common_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="conditional.html" title="conditional">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="conditional.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="decay.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_common_type">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.common_type"></a><a class="link" href="common_type.html" title="common_type">common_type</a>
|
||||
</h3></div></div></div>
|
||||
@ -74,9 +74,9 @@
|
||||
macro BOOST_NO_VARIADIC_TEMPLATES is defined) then the maximum number of
|
||||
template arguments is 3.
|
||||
</p>
|
||||
<a name="boost_typetraits.reference.common_type.configuration_macros"></a><h5>
|
||||
<a name="boost_typetraits.reference.common_type.configuration_macros-heading"></a>
|
||||
<a class="link" href="common_type.html#boost_typetraits.reference.common_type.configuration_macros">Configuration
|
||||
<h5>
|
||||
<a name="boost_typetraits.reference.common_type.h0"></a>
|
||||
<span><a name="boost_typetraits.reference.common_type.configuration_macros"></a></span><a class="link" href="common_type.html#boost_typetraits.reference.common_type.configuration_macros">Configuration
|
||||
macros</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -104,9 +104,9 @@
|
||||
When possible common_type is implemented using <code class="computeroutput"><span class="identifier">decltype</span></code>.
|
||||
Otherwise when BOOST_COMMON_TYPE_DONT_USE_TYPEOF is not defined it uses Boost.TypeOf.
|
||||
</p>
|
||||
<a name="boost_typetraits.reference.common_type.tutorial"></a><h5>
|
||||
<a name="boost_typetraits.reference.common_type.tutorial-heading"></a>
|
||||
<a class="link" href="common_type.html#boost_typetraits.reference.common_type.tutorial">Tutorial</a>
|
||||
<h5>
|
||||
<a name="boost_typetraits.reference.common_type.h1"></a>
|
||||
<span><a name="boost_typetraits.reference.common_type.tutorial"></a></span><a class="link" href="common_type.html#boost_typetraits.reference.common_type.tutorial">Tutorial</a>
|
||||
</h5>
|
||||
<p>
|
||||
In a nutshell, <a class="link" href="common_type.html" title="common_type">common_type</a>
|
||||
@ -139,9 +139,9 @@
|
||||
<p>
|
||||
This is a very useful and broadly applicable utility.
|
||||
</p>
|
||||
<a name="boost_typetraits.reference.common_type.how_to_get_the_common_type_of_types_with_explicit_conversions_"></a><h5>
|
||||
<a name="boost_typetraits.reference.common_type.how_to_get_the_common_type_of_types_with_explicit_conversions_-heading"></a>
|
||||
<a class="link" href="common_type.html#boost_typetraits.reference.common_type.how_to_get_the_common_type_of_types_with_explicit_conversions_">How
|
||||
<h5>
|
||||
<a name="boost_typetraits.reference.common_type.h2"></a>
|
||||
<span><a name="boost_typetraits.reference.common_type.how_to_get_the_common_type_of_types_with_explicit_conversions_"></a></span><a class="link" href="common_type.html#boost_typetraits.reference.common_type.how_to_get_the_common_type_of_types_with_explicit_conversions_">How
|
||||
to get the common type of types with explicit conversions?</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -161,9 +161,9 @@
|
||||
<span class="keyword">typedef</span> <span class="identifier">complex</span><span class="special"><</span> <a class="link" href="common_type.html" title="common_type">common_type</a><span class="special"><</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">U</span><span class="special">></span> <span class="special">></span> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<a name="boost_typetraits.reference.common_type.how_important_is_the_order_of_the_common_type_lt__gt__template_arguments_"></a><h5>
|
||||
<a name="boost_typetraits.reference.common_type.how_important_is_the_order_of_the_common_type_lt__gt__template_arguments_-heading"></a>
|
||||
<a class="link" href="common_type.html#boost_typetraits.reference.common_type.how_important_is_the_order_of_the_common_type_lt__gt__template_arguments_">How
|
||||
<h5>
|
||||
<a name="boost_typetraits.reference.common_type.h3"></a>
|
||||
<span><a name="boost_typetraits.reference.common_type.how_important_is_the_order_of_the_common_type_lt__gt__template_arguments_"></a></span><a class="link" href="common_type.html#boost_typetraits.reference.common_type.how_important_is_the_order_of_the_common_type_lt__gt__template_arguments_">How
|
||||
important is the order of the common_type<> template arguments?</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -215,7 +215,7 @@
|
||||
<span class="keyword">template</span> <span class="special"><></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span> <span class="special">{</span><span class="keyword">typedef</span> <span class="identifier">C</span> <span class="identifier">type</span><span class="special">;};</span>
|
||||
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
Now this client can ask for <code class="computeroutput"><span class="identifier">common_type</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span>
|
||||
@ -233,7 +233,7 @@
|
||||
<span class="keyword">template</span> <span class="special"><></span> <span class="keyword">struct</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">B</span><span class="special">,</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="special">:</span> <span class="keyword">public</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span> <span class="special">{};</span>
|
||||
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
This is needed as the specialization of <code class="computeroutput"><span class="identifier">common_type</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span>
|
||||
@ -241,9 +241,9 @@
|
||||
is not be used implicitly for <code class="computeroutput"><span class="identifier">common_type</span><span class="special"><</span><span class="identifier">B</span><span class="special">,</span>
|
||||
<span class="identifier">A</span><span class="special">></span></code>.
|
||||
</p>
|
||||
<a name="boost_typetraits.reference.common_type.can_the_common_type_of_two_types_be_a_third_type_"></a><h5>
|
||||
<a name="boost_typetraits.reference.common_type.can_the_common_type_of_two_types_be_a_third_type_-heading"></a>
|
||||
<a class="link" href="common_type.html#boost_typetraits.reference.common_type.can_the_common_type_of_two_types_be_a_third_type_">Can
|
||||
<h5>
|
||||
<a name="boost_typetraits.reference.common_type.h4"></a>
|
||||
<span><a name="boost_typetraits.reference.common_type.can_the_common_type_of_two_types_be_a_third_type_"></a></span><a class="link" href="common_type.html#boost_typetraits.reference.common_type.can_the_common_type_of_two_types_be_a_third_type_">Can
|
||||
the common_type of two types be a third type?</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -262,15 +262,15 @@
|
||||
<span class="keyword">template</span> <span class="special"><></span> <span class="keyword">struct</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">B</span><span class="special">,</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="special">:</span> <span class="keyword">public</span> <span class="identifier">common_type</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span> <span class="special">{};</span>
|
||||
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
Now this client can ask for <code class="computeroutput"><span class="identifier">common_type</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span>
|
||||
<span class="identifier">B</span><span class="special">></span></code>.
|
||||
</p>
|
||||
<a name="boost_typetraits.reference.common_type.how_common_type_behaves_with_pointers_"></a><h5>
|
||||
<a name="boost_typetraits.reference.common_type.how_common_type_behaves_with_pointers_-heading"></a>
|
||||
<a class="link" href="common_type.html#boost_typetraits.reference.common_type.how_common_type_behaves_with_pointers_">How
|
||||
<h5>
|
||||
<a name="boost_typetraits.reference.common_type.h5"></a>
|
||||
<span><a name="boost_typetraits.reference.common_type.how_common_type_behaves_with_pointers_"></a></span><a class="link" href="common_type.html#boost_typetraits.reference.common_type.how_common_type_behaves_with_pointers_">How
|
||||
common_type behaves with pointers?</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -304,9 +304,9 @@
|
||||
<p>
|
||||
Of course the user can always make this specialization.
|
||||
</p>
|
||||
<a name="boost_typetraits.reference.common_type.can_you_explain_the_pros_cons_of_common_type_against_boost_typeof_"></a><h5>
|
||||
<a name="boost_typetraits.reference.common_type.can_you_explain_the_pros_cons_of_common_type_against_boost_typeof_-heading"></a>
|
||||
<a class="link" href="common_type.html#boost_typetraits.reference.common_type.can_you_explain_the_pros_cons_of_common_type_against_boost_typeof_">Can
|
||||
<h5>
|
||||
<a name="boost_typetraits.reference.common_type.h6"></a>
|
||||
<span><a name="boost_typetraits.reference.common_type.can_you_explain_the_pros_cons_of_common_type_against_boost_typeof_"></a></span><a class="link" href="common_type.html#boost_typetraits.reference.common_type.can_you_explain_the_pros_cons_of_common_type_against_boost_typeof_">Can
|
||||
you explain the pros/cons of common_type against Boost.Typeof?</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>conditional</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="alignment_of.html" title="alignment_of">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="alignment_of.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="common_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_conditional">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.conditional"></a><a class="link" href="conditional.html" title="conditional">conditional</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>decay</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="common_type.html" title="common_type">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="common_type.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="extent.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_decay">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.decay"></a><a class="link" href="decay.html" title="decay">decay</a>
|
||||
</h3></div></div></div>
|
||||
@ -106,7 +106,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">(*)(</span><span class="keyword">double</span></code>
|
||||
<code class="computeroutput"><span class="keyword">int</span><span class="special">(*)(</span><span class="keyword">double</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>extent</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="decay.html" title="decay">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="decay.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="floating_point_promotion.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_extent">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.extent"></a><a class="link" href="extent.html" title="extent">extent</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>floating_point_promotion</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="extent.html" title="extent">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="extent.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="function_traits.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_floating_point_promotion">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.floating_point_promotion"></a><a class="link" href="floating_point_promotion.html" title="floating_point_promotion">floating_point_promotion</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>function_traits</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="floating_point_promotion.html" title="floating_point_promotion">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="floating_point_promotion.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_bit_and.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_function_traits">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.function_traits"></a><a class="link" href="function_traits.html" title="function_traits">function_traits</a>
|
||||
</h3></div></div></div>
|
||||
@ -31,7 +31,7 @@
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">arity</span> <span class="special">=</span> <em class="replaceable"><code>see-below</code></em><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">result_type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> arg<em class="replaceable"><code>N</code></em>_type<span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> arg<em class="replaceable"><code>N</code></em>_type<span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_bit_and</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="function_traits.html" title="function_traits">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="function_traits.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_bit_and_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_bit_and">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_bit_and"></a><a class="link" href="has_bit_and.html" title="has_bit_and">has_bit_and</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -115,7 +115,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_bit_and</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_bit_and</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">&</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">&(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_bit_and</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator&(const A&) is private</span>
|
||||
</pre>
|
||||
@ -123,7 +123,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">&(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -136,7 +136,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_bit_and</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_bit_and_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_bit_and.html" title="has_bit_and">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_bit_and.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_bit_or.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_bit_and_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_bit_and_assign"></a><a class="link" href="has_bit_and_assign.html" title="has_bit_and_assign">has_bit_and_assign</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -115,7 +115,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_bit_and_assign</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_bit_and_assign</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">&=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">&=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_bit_and_assign</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator&=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -123,7 +123,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">&=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -136,7 +136,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_bit_and_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_bit_or</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_bit_and_assign.html" title="has_bit_and_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_bit_and_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_bit_or_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_bit_or">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_bit_or"></a><a class="link" href="has_bit_or.html" title="has_bit_or">has_bit_or</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -113,7 +113,7 @@
|
||||
This trait cannot detect whether binary <code class="computeroutput"><span class="keyword">operator</span><span class="special">|</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">|</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Lhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_bit_or</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_bit_or</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">|</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">|(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_bit_or</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator|(const A&) is private</span>
|
||||
</pre>
|
||||
@ -121,7 +121,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">|(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -134,7 +134,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_bit_or</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_bit_or_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_bit_or.html" title="has_bit_or">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_bit_or.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_bit_xor.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_bit_or_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_bit_or_assign"></a><a class="link" href="has_bit_or_assign.html" title="has_bit_or_assign">has_bit_or_assign</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -115,7 +115,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_bit_or_assign</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_bit_or_assign</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">|=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">|=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_bit_or_assign</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator|=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -123,7 +123,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">|=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -136,7 +136,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_bit_or_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_bit_xor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_bit_or_assign.html" title="has_bit_or_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_bit_or_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_bit_xor_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_bit_xor">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_bit_xor"></a><a class="link" href="has_bit_xor.html" title="has_bit_xor">has_bit_xor</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -113,7 +113,7 @@
|
||||
This trait cannot detect whether binary <code class="computeroutput"><span class="keyword">operator</span><span class="special">^</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">^</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Lhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_bit_xor</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_bit_xor</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">^</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">^(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_bit_xor</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator^(const A&) is private</span>
|
||||
</pre>
|
||||
@ -121,7 +121,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">^(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -134,7 +134,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_bit_xor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_bit_xor_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_bit_xor.html" title="has_bit_xor">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_bit_xor.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_complement.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_bit_xor_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_bit_xor_assign"></a><a class="link" href="has_bit_xor_assign.html" title="has_bit_xor_assign">has_bit_xor_assign</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -115,7 +115,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_bit_xor_assign</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_bit_xor_assign</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">^=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">^=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_bit_xor_assign</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator^=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -123,7 +123,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">^=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -136,7 +136,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_bit_xor_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_complement</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_bit_xor_assign.html" title="has_bit_xor_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_bit_xor_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_dereference.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_complement">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_complement"></a><a class="link" href="has_complement.html" title="has_complement">has_complement</a>
|
||||
</h3></div></div></div>
|
||||
@ -46,7 +46,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Rhs</span> <span class="identifier">rhs</span><span class="special">;</span>
|
||||
@ -122,7 +122,7 @@
|
||||
This trait cannot detect whether prefix <code class="computeroutput"><span class="keyword">operator</span><span class="special">~</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">~</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Rhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_complement</span><span class="special"><</span><span class="identifier">Rhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_complement</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">~</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">~();</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_complement</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator~() is private</span>
|
||||
</pre>
|
||||
@ -130,7 +130,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">~(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -143,7 +143,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_complement</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_dereference</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_complement.html" title="has_complement">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_complement.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_divides.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_dereference">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_dereference"></a><a class="link" href="has_dereference.html" title="has_dereference">has_dereference</a>
|
||||
</h3></div></div></div>
|
||||
@ -46,7 +46,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Rhs</span> <span class="identifier">rhs</span><span class="special">;</span>
|
||||
@ -131,7 +131,7 @@
|
||||
This trait cannot detect whether prefix <code class="computeroutput"><span class="keyword">operator</span><span class="special">*</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">*</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Rhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_dereference</span><span class="special"><</span><span class="identifier">Rhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_dereference</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">*</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">*();</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_dereference</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator*() is private</span>
|
||||
</pre>
|
||||
@ -139,7 +139,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -152,7 +152,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_dereference</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_divides</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_dereference.html" title="has_dereference">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_dereference.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_divides_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_divides">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_divides"></a><a class="link" href="has_divides.html" title="has_divides">has_divides</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -119,7 +119,7 @@
|
||||
This trait cannot detect whether binary <code class="computeroutput"><span class="keyword">operator</span><span class="special">/</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">/</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Lhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_divides</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_divides</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">/</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_divides</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator/(const A&) is private</span>
|
||||
</pre>
|
||||
@ -127,7 +127,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -140,7 +140,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_divides</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_divides_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_divides.html" title="has_divides">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_divides.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_equal_to.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_divides_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_divides_assign"></a><a class="link" href="has_divides_assign.html" title="has_divides_assign">has_divides_assign</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -121,7 +121,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_divides_assign</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_divides_assign</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">/=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">/=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_divides_assign</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator/=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -129,7 +129,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">/=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -142,7 +142,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_divides_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_equal_to</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_divides_assign.html" title="has_divides_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_divides_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_greater.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_equal_to">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_equal_to"></a><a class="link" href="has_equal_to.html" title="has_equal_to">has_equal_to</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -120,7 +120,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_equal_to</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_equal_to</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">==</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_equal_to</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator==(const A&) is private</span>
|
||||
</pre>
|
||||
@ -128,7 +128,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -141,7 +141,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_greater</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_equal_to.html" title="has_equal_to">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_equal_to.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_greater_equal.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_greater">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_greater"></a><a class="link" href="has_greater.html" title="has_greater">has_greater</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -120,7 +120,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_greater</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_greater</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">></span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">>(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_greater</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator>(const A&) is private</span>
|
||||
</pre>
|
||||
@ -128,7 +128,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">>(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -141,7 +141,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_greater</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_greater_equal</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_greater.html" title="has_greater">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_greater.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_left_shift.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_greater_equal">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_greater_equal"></a><a class="link" href="has_greater_equal.html" title="has_greater_equal">has_greater_equal</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -120,7 +120,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_greater_equal</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_greater_equal</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">>=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">>=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_greater_equal</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator>=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -128,7 +128,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">>=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -141,7 +141,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_greater_equal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_left_shift</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_greater_equal.html" title="has_greater_equal">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_greater_equal.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_left_shift_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_left_shift">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_left_shift"></a><a class="link" href="has_left_shift.html" title="has_left_shift">has_left_shift</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -127,7 +127,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_left_shift</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_left_shift</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special"><<</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special"><<(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_left_shift</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator<<(const A&) is private</span>
|
||||
</pre>
|
||||
@ -135,7 +135,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special"><<(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -148,7 +148,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_left_shift</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_left_shift_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_left_shift.html" title="has_left_shift">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_left_shift.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_less.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_left_shift_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_left_shift_assign"></a><a class="link" href="has_left_shift_assign.html" title="has_left_shift_assign">has_left_shift_assign</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -115,7 +115,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_left_shift_assign</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_left_shift_assign</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special"><<=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special"><<=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_left_shift_assign</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator<<=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -123,7 +123,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special"><<=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -136,7 +136,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_left_shift_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_less</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_left_shift_assign.html" title="has_left_shift_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_left_shift_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_less_equal.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_less">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_less"></a><a class="link" href="has_less.html" title="has_less">has_less</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -120,7 +120,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_less</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_less</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special"><</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special"><(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_less</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator<(const A&) is private</span>
|
||||
</pre>
|
||||
@ -128,7 +128,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special"><(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -141,7 +141,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_less</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_less_equal</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_less.html" title="has_less">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_less.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_logical_and.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_less_equal">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_less_equal"></a><a class="link" href="has_less_equal.html" title="has_less_equal">has_less_equal</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -120,7 +120,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_less_equal</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_less_equal</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special"><=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special"><=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_less_equal</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator<=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -128,7 +128,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special"><=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -141,7 +141,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_less_equal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_logical_and</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_less_equal.html" title="has_less_equal">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_less_equal.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_logical_not.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_logical_and">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_logical_and"></a><a class="link" href="has_logical_and.html" title="has_logical_and">has_logical_and</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -118,7 +118,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_logical_and</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_logical_and</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">&&</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">&&(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_logical_and</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator&&(const A&) is private</span>
|
||||
</pre>
|
||||
@ -126,7 +126,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">&&(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -139,7 +139,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_logical_and</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_logical_not</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_logical_and.html" title="has_logical_and">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_logical_and.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_logical_or.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_logical_not">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_logical_not"></a><a class="link" href="has_logical_not.html" title="has_logical_not">has_logical_not</a>
|
||||
</h3></div></div></div>
|
||||
@ -46,7 +46,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Rhs</span> <span class="identifier">rhs</span><span class="special">;</span>
|
||||
@ -118,7 +118,7 @@
|
||||
This trait cannot detect whether prefix <code class="computeroutput"><span class="keyword">operator</span><span class="special">!</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">!</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Rhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_logical_not</span><span class="special"><</span><span class="identifier">Rhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_logical_not</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">!</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">!();</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_logical_not</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator!() is private</span>
|
||||
</pre>
|
||||
@ -126,7 +126,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">!(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -139,7 +139,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_logical_not</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_logical_or</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_logical_not.html" title="has_logical_not">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_logical_not.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_minus.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_logical_or">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_logical_or"></a><a class="link" href="has_logical_or.html" title="has_logical_or">has_logical_or</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -118,7 +118,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_logical_or</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_logical_or</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">||</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">||(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_logical_or</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator||(const A&) is private</span>
|
||||
</pre>
|
||||
@ -126,7 +126,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">||(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -139,7 +139,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_logical_or</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_minus</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_logical_or.html" title="has_logical_or">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_logical_or.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_minus_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_minus">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_minus"></a><a class="link" href="has_minus.html" title="has_minus">has_minus</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -119,7 +119,7 @@
|
||||
This trait cannot detect whether binary <code class="computeroutput"><span class="keyword">operator</span><span class="special">-</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">-</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Lhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_minus</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_minus</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">-</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_minus</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator-(const A&) is private</span>
|
||||
</pre>
|
||||
@ -127,7 +127,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -140,7 +140,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_minus</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_minus_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_minus.html" title="has_minus">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_minus.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_modulus.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_minus_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_minus_assign"></a><a class="link" href="has_minus_assign.html" title="has_minus_assign">has_minus_assign</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -121,7 +121,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_minus_assign</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_minus_assign</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">-=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">-=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_minus_assign</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator-=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -129,7 +129,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">-=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -142,7 +142,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_minus_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_modulus</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_minus_assign.html" title="has_minus_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_minus_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_modulus_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_modulus">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_modulus"></a><a class="link" href="has_modulus.html" title="has_modulus">has_modulus</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -112,7 +112,7 @@
|
||||
This trait cannot detect whether binary <code class="computeroutput"><span class="keyword">operator</span><span class="special">%</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">%</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Lhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_modulus</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_modulus</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">%</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">%(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_modulus</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator%(const A&) is private</span>
|
||||
</pre>
|
||||
@ -120,7 +120,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">%(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -133,7 +133,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_modulus</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_modulus_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_modulus.html" title="has_modulus">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_modulus.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_multiplies.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_modulus_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_modulus_assign"></a><a class="link" href="has_modulus_assign.html" title="has_modulus_assign">has_modulus_assign</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -114,7 +114,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_modulus_assign</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_modulus_assign</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">%=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">%=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_modulus_assign</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator%=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -122,7 +122,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">%=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -135,7 +135,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_modulus_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_multiplies</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_modulus_assign.html" title="has_modulus_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_modulus_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_multiplies_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_multiplies">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_multiplies"></a><a class="link" href="has_multiplies.html" title="has_multiplies">has_multiplies</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -119,7 +119,7 @@
|
||||
This trait cannot detect whether binary <code class="computeroutput"><span class="keyword">operator</span><span class="special">*</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">*</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Lhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_multiplies</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_multiplies</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">*</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_multiplies</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator*(const A&) is private</span>
|
||||
</pre>
|
||||
@ -127,7 +127,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -140,7 +140,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_multiplies</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_multiplies_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_multiplies.html" title="has_multiplies">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_multiplies.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_negate.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_multiplies_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_multiplies_assign"></a><a class="link" href="has_multiplies_assign.html" title="has_multiplies_assign">has_multiplies_assign</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -121,7 +121,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_multiplies_assign</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_multiplies_assign</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">*=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">*=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_multiplies_assign</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator*=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -129,7 +129,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">*=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -142,7 +142,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_multiplies_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_negate</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_multiplies_assign.html" title="has_multiplies_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_multiplies_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_new_operator.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_negate">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_negate"></a><a class="link" href="has_negate.html" title="has_negate">has_negate</a>
|
||||
</h3></div></div></div>
|
||||
@ -46,7 +46,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Rhs</span> <span class="identifier">rhs</span><span class="special">;</span>
|
||||
@ -118,7 +118,7 @@
|
||||
This trait cannot detect whether prefix <code class="computeroutput"><span class="keyword">operator</span><span class="special">-</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">-</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Rhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_negate</span><span class="special"><</span><span class="identifier">Rhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_negate</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">-</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">-();</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_negate</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator-() is private</span>
|
||||
</pre>
|
||||
@ -126,7 +126,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -139,7 +139,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_negate</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_new_operator</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_negate.html" title="has_negate">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_negate.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_not_equal_to.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_new_operator">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_new_operator"></a><a class="link" href="has_new_operator.html" title="has_new_operator">has_new_operator</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_nothrow_default_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_cp_cons.html" title="has_nothrow_copy_constructor">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_nothrow_cp_cons.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_plus.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_no_throw_def_cons">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_no_throw_def_cons"></a><a class="link" href="has_no_throw_def_cons.html" title="has_nothrow_default_constructor">has_nothrow_default_constructor</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_not_equal_to</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_new_operator.html" title="has_new_operator">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_new_operator.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_not_equal_to">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_not_equal_to"></a><a class="link" href="has_not_equal_to.html" title="has_not_equal_to">has_not_equal_to</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -120,7 +120,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_not_equal_to</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_not_equal_to</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">!=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_not_equal_to</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator!=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -128,7 +128,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -141,7 +141,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_not_equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_nothrow_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_not_equal_to.html" title="has_not_equal_to">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_not_equal_to.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_constructor.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_nothrow_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_nothrow_assign"></a><a class="link" href="has_nothrow_assign.html" title="has_nothrow_assign">has_nothrow_assign</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_nothrow_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_assign.html" title="has_nothrow_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_nothrow_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_copy.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_nothrow_constructor">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_nothrow_constructor"></a><a class="link" href="has_nothrow_constructor.html" title="has_nothrow_constructor">has_nothrow_constructor</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_nothrow_copy</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_constructor.html" title="has_nothrow_constructor">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_nothrow_constructor.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_cp_cons.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_nothrow_copy">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_nothrow_copy"></a><a class="link" href="has_nothrow_copy.html" title="has_nothrow_copy">has_nothrow_copy</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_nothrow_copy_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_nothrow_copy.html" title="has_nothrow_copy">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_nothrow_copy.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_no_throw_def_cons.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_nothrow_cp_cons">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_nothrow_cp_cons"></a><a class="link" href="has_nothrow_cp_cons.html" title="has_nothrow_copy_constructor">has_nothrow_copy_constructor</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_plus</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_no_throw_def_cons.html" title="has_nothrow_default_constructor">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_no_throw_def_cons.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_plus_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_plus">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_plus"></a><a class="link" href="has_plus.html" title="has_plus">has_plus</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -119,7 +119,7 @@
|
||||
This trait cannot detect whether binary <code class="computeroutput"><span class="keyword">operator</span><span class="special">+</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">+</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Lhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_plus</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_plus</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">+</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_plus</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator+(const A&) is private</span>
|
||||
</pre>
|
||||
@ -127,7 +127,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -140,7 +140,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_plus</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_plus_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_plus.html" title="has_plus">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_plus.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_post_decrement.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_plus_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_plus_assign"></a><a class="link" href="has_plus_assign.html" title="has_plus_assign">has_plus_assign</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -121,7 +121,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_plus_assign</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_plus_assign</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">+=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">+=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_plus_assign</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator+=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -129,7 +129,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">+=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -142,7 +142,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_plus_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_post_decrement</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_plus_assign.html" title="has_plus_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_plus_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_post_increment.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_post_decrement">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_post_decrement"></a><a class="link" href="has_post_decrement.html" title="has_post_decrement">has_post_decrement</a>
|
||||
</h3></div></div></div>
|
||||
@ -46,7 +46,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -128,7 +128,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_post_decrement</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_post_decrement</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">--</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">--(</span><span class="keyword">int</span><span class="special">);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_post_decrement</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator--(int) is private</span>
|
||||
</pre>
|
||||
@ -136,7 +136,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">--(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">int</span><span class="special">);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -149,7 +149,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_post_decrement</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_post_increment</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_post_decrement.html" title="has_post_decrement">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_post_decrement.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_pre_decrement.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_post_increment">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_post_increment"></a><a class="link" href="has_post_increment.html" title="has_post_increment">has_post_increment</a>
|
||||
</h3></div></div></div>
|
||||
@ -46,7 +46,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -128,7 +128,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_post_increment</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_post_increment</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">++</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_post_increment</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator++(int) is private</span>
|
||||
</pre>
|
||||
@ -136,7 +136,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">int</span><span class="special">);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -149,7 +149,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_post_increment</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_pre_decrement</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_post_increment.html" title="has_post_increment">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_post_increment.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_pre_increment.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_pre_decrement">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_pre_decrement"></a><a class="link" href="has_pre_decrement.html" title="has_pre_decrement">has_pre_decrement</a>
|
||||
</h3></div></div></div>
|
||||
@ -46,7 +46,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Rhs</span> <span class="identifier">rhs</span><span class="special">;</span>
|
||||
@ -128,7 +128,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_pre_decrement</span><span class="special"><</span><span class="identifier">Rhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_pre_decrement</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">--</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">--();</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_pre_decrement</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator--() is private</span>
|
||||
</pre>
|
||||
@ -136,7 +136,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">--(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -149,7 +149,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_pre_decrement</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_pre_increment</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_pre_decrement.html" title="has_pre_decrement">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_pre_decrement.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_right_shift.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_pre_increment">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_pre_increment"></a><a class="link" href="has_pre_increment.html" title="has_pre_increment">has_pre_increment</a>
|
||||
</h3></div></div></div>
|
||||
@ -46,7 +46,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Rhs</span> <span class="identifier">rhs</span><span class="special">;</span>
|
||||
@ -128,7 +128,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_pre_increment</span><span class="special"><</span><span class="identifier">Rhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_pre_increment</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">++</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">++();</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_pre_increment</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator++() is private</span>
|
||||
</pre>
|
||||
@ -136,7 +136,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -149,7 +149,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_pre_increment</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_right_shift</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_pre_increment.html" title="has_pre_increment">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_pre_increment.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_right_shift_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_right_shift">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_right_shift"></a><a class="link" href="has_right_shift.html" title="has_right_shift">has_right_shift</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -127,7 +127,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_right_shift</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_right_shift</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">>></span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">>>(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_right_shift</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator>>(const A&) is private</span>
|
||||
</pre>
|
||||
@ -135,7 +135,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">>>(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -148,7 +148,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_right_shift</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_right_shift_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_right_shift.html" title="has_right_shift">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_right_shift.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_trivial_assign.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_right_shift_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_right_shift_assign"></a><a class="link" href="has_right_shift_assign.html" title="has_right_shift_assign">has_right_shift_assign</a>
|
||||
</h3></div></div></div>
|
||||
@ -45,7 +45,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Lhs</span> <span class="identifier">lhs</span><span class="special">;</span>
|
||||
@ -119,7 +119,7 @@
|
||||
then instantiating <code class="computeroutput"><span class="identifier">has_right_shift_assign</span><span class="special"><</span><span class="identifier">Lhs</span><span class="special">></span></code> will produce a compiler error. For
|
||||
this reason <code class="computeroutput"><span class="identifier">has_right_shift_assign</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">>>=</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">>>=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_right_shift_assign</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator>>=(const A&) is private</span>
|
||||
</pre>
|
||||
@ -127,7 +127,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">>>=(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -140,7 +140,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_right_shift_assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_trivial_assign</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_right_shift_assign.html" title="has_right_shift_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_right_shift_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_trivial_constructor.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_trivial_assign">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_assign"></a><a class="link" href="has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_trivial_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_assign.html" title="has_trivial_assign">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_trivial_assign.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_trivial_copy.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_trivial_constructor">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_constructor"></a><a class="link" href="has_trivial_constructor.html" title="has_trivial_constructor">has_trivial_constructor</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_trivial_copy</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_constructor.html" title="has_trivial_constructor">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_trivial_constructor.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_trivial_cp_cons.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_trivial_copy">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_copy"></a><a class="link" href="has_trivial_copy.html" title="has_trivial_copy">has_trivial_copy</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_trivial_copy_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_copy.html" title="has_trivial_copy">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_trivial_copy.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_trivial_def_cons.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_trivial_cp_cons">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_cp_cons"></a><a class="link" href="has_trivial_cp_cons.html" title="has_trivial_copy_constructor">has_trivial_copy_constructor</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_trivial_default_constructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_cp_cons.html" title="has_trivial_copy_constructor">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_trivial_cp_cons.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_trivial_destructor.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_trivial_def_cons">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_def_cons"></a><a class="link" href="has_trivial_def_cons.html" title="has_trivial_default_constructor">has_trivial_default_constructor</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_trivial_destructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_def_cons.html" title="has_trivial_default_constructor">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_trivial_def_cons.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_unary_minus.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_trivial_destructor">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_trivial_destructor"></a><a class="link" href="has_trivial_destructor.html" title="has_trivial_destructor">has_trivial_destructor</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_unary_minus</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_trivial_destructor.html" title="has_trivial_destructor">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_trivial_destructor.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_unary_plus.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_unary_minus">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_unary_minus"></a><a class="link" href="has_unary_minus.html" title="has_unary_minus">has_unary_minus</a>
|
||||
</h3></div></div></div>
|
||||
@ -46,7 +46,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Rhs</span> <span class="identifier">rhs</span><span class="special">;</span>
|
||||
@ -118,7 +118,7 @@
|
||||
This trait cannot detect whether prefix <code class="computeroutput"><span class="keyword">operator</span><span class="special">-</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">-</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Rhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_unary_minus</span><span class="special"><</span><span class="identifier">Rhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_unary_minus</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">-</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">-();</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_unary_minus</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator-() is private</span>
|
||||
</pre>
|
||||
@ -126,7 +126,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -139,7 +139,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_unary_minus</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_unary_plus</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_unary_minus.html" title="has_unary_minus">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_unary_minus.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_virtual_destructor.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_unary_plus">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_unary_plus"></a><a class="link" href="has_unary_plus.html" title="has_unary_plus">has_unary_plus</a>
|
||||
</h3></div></div></div>
|
||||
@ -46,7 +46,7 @@
|
||||
type, the return value is checked to be convertible to <code class="computeroutput"><span class="identifier">Ret</span></code>.
|
||||
Convertible to <code class="computeroutput"><span class="identifier">Ret</span></code> means
|
||||
that the return value of the operator can be used as argument to a function
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
expecting <code class="computeroutput"><span class="identifier">Ret</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Ret</span><span class="special">);</span>
|
||||
<span class="identifier">Rhs</span> <span class="identifier">rhs</span><span class="special">;</span>
|
||||
@ -118,7 +118,7 @@
|
||||
This trait cannot detect whether prefix <code class="computeroutput"><span class="keyword">operator</span><span class="special">+</span></code> is public or not: if <code class="computeroutput"><span class="keyword">operator</span><span class="special">+</span></code> is defined as a private member of <code class="computeroutput"><span class="identifier">Rhs</span></code> then instantiating <code class="computeroutput"><span class="identifier">has_unary_plus</span><span class="special"><</span><span class="identifier">Rhs</span><span class="special">></span></code>
|
||||
will produce a compiler error. For this reason <code class="computeroutput"><span class="identifier">has_unary_plus</span></code>
|
||||
cannot be used to determine whether a type has a public <code class="computeroutput"><span class="keyword">operator</span><span class="special">+</span></code>
|
||||
or not.
|
||||
or not.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">private</span><span class="special">:</span> <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">+();</span> <span class="special">};</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_unary_plus</span><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// error: A::operator+() is private</span>
|
||||
</pre>
|
||||
@ -126,7 +126,7 @@
|
||||
<li class="listitem">
|
||||
There is an issue if the operator exists only for type <code class="computeroutput"><span class="identifier">A</span></code> and <code class="computeroutput"><span class="identifier">B</span></code>
|
||||
is convertible to <code class="computeroutput"><span class="identifier">A</span></code>.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
In this case, the compiler will report an ambiguous overload.
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span> <span class="special">{</span> <span class="special">};</span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">+(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&);</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">operator</span> <span class="identifier">A</span><span class="special">();</span> <span class="special">};</span>
|
||||
@ -139,7 +139,6 @@
|
||||
is defined but does not bind for a given template type, it is still detected
|
||||
by the trait which returns <code class="computeroutput"><span class="keyword">true</span></code>
|
||||
instead of <code class="computeroutput"><span class="keyword">false</span></code>. Example:
|
||||
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_unary_plus</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>has_virtual_destructor</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_unary_plus.html" title="has_unary_plus">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_unary_plus.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="integral_constant.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_has_virtual_destructor">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.has_virtual_destructor"></a><a class="link" href="has_virtual_destructor.html" title="has_virtual_destructor">has_virtual_destructor</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>integral_constant</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="has_virtual_destructor.html" title="has_virtual_destructor">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="has_virtual_destructor.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="integral_promotion.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_integral_constant">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.integral_constant"></a><a class="link" href="integral_constant.html" title="integral_constant">integral_constant</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>integral_promotion</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="integral_constant.html" title="integral_constant">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="integral_constant.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_abstract.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_integral_promotion">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.integral_promotion"></a><a class="link" href="integral_promotion.html" title="integral_promotion">integral_promotion</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>is_abstract</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="integral_promotion.html" title="integral_promotion">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="integral_promotion.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_arithmetic.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_is_abstract">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_abstract"></a><a class="link" href="is_abstract.html" title="is_abstract">is_abstract</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>is_arithmetic</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_abstract.html" title="is_abstract">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="is_abstract.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_array.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_is_arithmetic">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_arithmetic"></a><a class="link" href="is_arithmetic.html" title="is_arithmetic">is_arithmetic</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>is_array</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_arithmetic.html" title="is_arithmetic">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="is_arithmetic.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_base_of.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_is_array">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_array"></a><a class="link" href="is_array.html" title="is_array">is_array</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>is_base_of</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_array.html" title="is_array">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="is_array.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_class.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_is_base_of">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_base_of"></a><a class="link" href="is_base_of.html" title="is_base_of">is_base_of</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>is_class</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_base_of.html" title="is_base_of">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="is_base_of.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_complex.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_is_class">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_class"></a><a class="link" href="is_class.html" title="is_class">is_class</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>is_complex</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_class.html" title="is_class">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="is_class.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_compound.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_is_complex">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_complex"></a><a class="link" href="is_complex.html" title="is_complex">is_complex</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>is_compound</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_complex.html" title="is_complex">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="is_complex.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_const.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_is_compound">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_compound"></a><a class="link" href="is_compound.html" title="is_compound">is_compound</a>
|
||||
</h3></div></div></div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>is_const</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
|
||||
<link rel="up" href="../reference.html" title="Alphabetical Reference">
|
||||
<link rel="prev" href="is_compound.html" title="is_compound">
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="is_compound.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_convertible.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="section boost_typetraits_reference_is_const">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_typetraits.reference.is_const"></a><a class="link" href="is_const.html" title="is_const">is_const</a>
|
||||
</h3></div></div></div>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user