Added docs for the new has_new_operator and is_virtual_base_of traits.

[SVN r52060]
This commit is contained in:
John Maddock
2009-03-30 17:02:46 +00:00
parent da752aaaa9
commit 8ecf616c39
35 changed files with 431 additions and 46 deletions

49
doc/has_new_operator.qbk Normal file
View File

@@ -0,0 +1,49 @@
[/
Copyright 2009 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_new_operator has_new_operator]
template <class T>
struct has_new_operator : public __tof {};
__inherit If T is a (possibly cv-qualified) type with an overloaded new-operator
then inherits from __true_type, otherwise inherits from __false_type.
__compat Not usable with compilers that do not support "substitution failure is not an error"
(in which case BOOST_NO_SFINAE will be defined), also known to be broken with
the Borland/Codegear compiler.
__std_ref 12.5.
__header ` #include <boost/type_traits/has_new_operator.hpp>` or ` #include <boost/type_traits.hpp>`
__examples
Given:
class A { void* operator new(std::size_t); };
class B { void* operator new(std::size_t, const std::nothrow&); };
class C { void* operator new(std::size_t, void*); };
class D { void* operator new[](std::size_t); };
class E { void* operator new[](std::size_t, const std::nothrow&); };
class F { void* operator new[](std::size_t, void*); };
Then:
[:`has_new_operator<A>` inherits from `__true_type`.]
[:`has_new_operator<B>` inherits from `__true_type`.]
[:`has_new_operator<C>` inherits from `__true_type`.]
[:`has_new_operator<D>` inherits from `__true_type`.]
[:`has_new_operator<E>` inherits from `__true_type`.]
[:`has_new_operator<F>` inherits from `__true_type`.]
[endsect]

View File

@@ -56,7 +56,7 @@
method available to them.
</p>
<a name="boost_typetraits.background.type_traits"></a><h5>
<a name="id765668"></a>
<a name="id777348"></a>
<a class="link" href="background.html#boost_typetraits.background.type_traits">Type Traits</a>
</h5>
<p>
@@ -84,7 +84,7 @@
given.
</p>
<a name="boost_typetraits.background.implementation"></a><h5>
<a name="id765732"></a>
<a name="id777412"></a>
<a class="link" href="background.html#boost_typetraits.background.implementation">Implementation</a>
</h5>
<p>
@@ -174,7 +174,7 @@
in the default template.
</p>
<a name="boost_typetraits.background.optimized_copy"></a><h5>
<a name="id774766"></a>
<a name="id786717"></a>
<a class="link" href="background.html#boost_typetraits.background.optimized_copy">Optimized copy</a>
</h5>
<p>
@@ -247,7 +247,7 @@
otherwise it will call the "slow but safe version".
</p>
<a name="boost_typetraits.background.was_it_worth_it_"></a><h5>
<a name="id775113"></a>
<a name="id787064"></a>
<a class="link" href="background.html#boost_typetraits.background.was_it_worth_it_">Was it worth it?</a>
</h5>
<p>
@@ -280,7 +280,7 @@
</li>
</ul></div>
<div class="table">
<a name="id775150"></a><p class="title"><b>Table<EFBFBD>1.1.<2E>Time taken to copy 1000 elements using `copy&lt;const
<a name="id787101"></a><p class="title"><b>Table<EFBFBD>1.1.<2E>Time taken to copy 1000 elements using `copy&lt;const
T*, T*&gt;` (times in micro-seconds)</b></p>
<div class="table-contents"><table class="table" summary="Time taken to copy 1000 elements using `copy&lt;const
T*, T*&gt;` (times in micro-seconds)">
@@ -379,7 +379,7 @@
</table></div>
</div>
<br class="table-break"><a name="boost_typetraits.background.pair_of_references"></a><h5>
<a name="id775288"></a>
<a name="id787239"></a>
<a class="link" href="background.html#boost_typetraits.background.pair_of_references">Pair of References</a>
</h5>
<p>
@@ -416,7 +416,7 @@
to hold non-reference types, references, and constant references:
</p>
<div class="table">
<a name="id775550"></a><p class="title"><b>Table<EFBFBD>1.2.<2E>Required Constructor Argument Types</b></p>
<a name="id787500"></a><p class="title"><b>Table<EFBFBD>1.2.<2E>Required Constructor Argument Types</b></p>
<div class="table-contents"><table class="table" summary="Required Constructor Argument Types">
<colgroup>
<col>
@@ -481,7 +481,7 @@
adds a reference to its type, unless it is already a reference.
</p>
<div class="table">
<a name="id775653"></a><p class="title"><b>Table<EFBFBD>1.3.<2E>Using add_reference to synthesize the correct constructor
<a name="id787604"></a><p class="title"><b>Table<EFBFBD>1.3.<2E>Using add_reference to synthesize the correct constructor
type</b></p>
<div class="table-contents"><table class="table" summary="Using add_reference to synthesize the correct constructor
type">
@@ -598,7 +598,7 @@
easier to maintain and easier to understand.
</p>
<a name="boost_typetraits.background.conclusion"></a><h5>
<a name="id776111"></a>
<a name="id788062"></a>
<a class="link" href="background.html#boost_typetraits.background.conclusion">Conclusion</a>
</h5>
<p>
@@ -611,7 +611,7 @@
can be optimal as well as generic.
</p>
<a name="boost_typetraits.background.acknowledgements"></a><h5>
<a name="id776128"></a>
<a name="id788079"></a>
<a class="link" href="background.html#boost_typetraits.background.acknowledgements">Acknowledgements</a>
</h5>
<p>
@@ -619,7 +619,7 @@
comments when preparing this article.
</p>
<a name="background.references"></a><a name="boost_typetraits.background.references"></a><h5>
<a name="id776148"></a>
<a name="id788099"></a>
<a class="link" href="background.html#boost_typetraits.background.references">References</a>
</h5>
<div class="orderedlist"><ol type="1">

View File

@@ -91,7 +91,7 @@
<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="id780131"></a>
<a name="id792437"></a>
<a class="link" href="transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
Compiler Workarounds:</a>
</h5>

View File

@@ -36,6 +36,9 @@
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/alignment_of.html" title="alignment_of">alignment_of</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/has_new_operator.html" title="has_new_operator">has_new_operator</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/has_nothrow_assign.html" title="has_nothrow_assign">has_nothrow_assign</a><span class="special">;</span>

View File

@@ -37,6 +37,9 @@
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Base</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_base_of.html" title="is_base_of">is_base_of</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Base</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_virtual_base_of.html" title="is_virtual_base_of">is_virtual_base_of</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">From</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">To</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_convertible.html" title="is_convertible">is_convertible</a><span class="special">;</span>

View File

@@ -71,7 +71,7 @@
of the following macros:
</p>
<div class="table">
<a name="id781681"></a><p class="title"><b>Table<EFBFBD>1.4.<2E>Macros for Compiler Intrinsics</b></p>
<a name="id793988"></a><p class="title"><b>Table<EFBFBD>1.4.<2E>Macros for Compiler Intrinsics</b></p>
<div class="table-contents"><table class="table" summary="Macros for Compiler Intrinsics">
<colgroup>
<col>

View File

@@ -39,6 +39,7 @@
<dt><span class="section"><a href="reference/floating_point_promotion.html">
floating_point_promotion</a></span></dt>
<dt><span class="section"><a href="reference/function_traits.html"> function_traits</a></span></dt>
<dt><span class="section"><a href="reference/has_new_operator.html"> has_new_operator</a></span></dt>
<dt><span class="section"><a href="reference/has_nothrow_assign.html"> has_nothrow_assign</a></span></dt>
<dt><span class="section"><a href="reference/has_nothrow_constructor.html">
has_nothrow_constructor</a></span></dt>
@@ -86,6 +87,7 @@
<dt><span class="section"><a href="reference/is_reference.html"> is_reference</a></span></dt>
<dt><span class="section"><a href="reference/is_union.html"> is_union</a></span></dt>
<dt><span class="section"><a href="reference/is_unsigned.html"> is_unsigned</a></span></dt>
<dt><span class="section"><a href="reference/is_virtual_base_of.html"> is_virtual_base_of</a></span></dt>
<dt><span class="section"><a href="reference/is_void.html"> is_void</a></span></dt>
<dt><span class="section"><a href="reference/is_volatile.html"> is_volatile</a></span></dt>
<dt><span class="section"><a href="reference/make_signed.html"> make_signed</a></span></dt>

View File

@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id787509"></a><p class="title"><b>Table<EFBFBD>1.5.<2E>Examples</b></p>
<a name="id799679"></a><p class="title"><b>Table<EFBFBD>1.5.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id787981"></a><p class="title"><b>Table<EFBFBD>1.6.<2E>Examples</b></p>
<a name="id800151"></a><p class="title"><b>Table<EFBFBD>1.6.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -56,7 +56,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id788504"></a><p class="title"><b>Table<EFBFBD>1.7.<2E>Examples</b></p>
<a name="id800674"></a><p class="title"><b>Table<EFBFBD>1.7.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id789043"></a><p class="title"><b>Table<EFBFBD>1.8.<2E>Examples</b></p>
<a name="id801691"></a><p class="title"><b>Table<EFBFBD>1.8.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id789508"></a><p class="title"><b>Table<EFBFBD>1.9.<2E>Examples</b></p>
<a name="id802156"></a><p class="title"><b>Table<EFBFBD>1.9.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -48,7 +48,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id790753"></a><p class="title"><b>Table<EFBFBD>1.10.<2E>Examples</b></p>
<a name="id803401"></a><p class="title"><b>Table<EFBFBD>1.10.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -49,7 +49,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id792332"></a><p class="title"><b>Table<EFBFBD>1.11.<2E>Examples</b></p>
<a name="id804980"></a><p class="title"><b>Table<EFBFBD>1.11.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -7,7 +7,7 @@
<link rel="home" href="../../index.html" title="Chapter<65>1.<2E>Boost.TypeTraits">
<link rel="up" href="../reference.html" title="Alphabetical Reference">
<link rel="prev" href="floating_point_promotion.html" title="floating_point_promotion">
<link rel="next" href="has_nothrow_assign.html" title="has_nothrow_assign">
<link rel="next" href="has_new_operator.html" title="has_new_operator">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="floating_point_promotion.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_assign.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
<a accesskey="p" href="floating_point_promotion.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_new_operator.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
@@ -59,7 +59,7 @@
</p></td></tr>
</table></div>
<div class="table">
<a name="id792694"></a><p class="title"><b>Table<EFBFBD>1.12.<2E>Function Traits Members</b></p>
<a name="id805342"></a><p class="title"><b>Table<EFBFBD>1.12.<2E>Function Traits Members</b></p>
<div class="table-contents"><table class="table" summary="Function Traits Members">
<colgroup>
<col>
@@ -122,7 +122,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="id792906"></a><p class="title"><b>Table<EFBFBD>1.13.<2E>Examples</b></p>
<a name="id805554"></a><p class="title"><b>Table<EFBFBD>1.13.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
@@ -269,7 +269,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="floating_point_promotion.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_assign.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
<a accesskey="p" href="floating_point_promotion.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_new_operator.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,144 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>has_new_operator</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="../../index.html" title="Chapter<65>1.<2E>Boost.TypeTraits">
<link rel="up" href="../reference.html" title="Alphabetical Reference">
<link rel="prev" href="function_traits.html" title="function_traits">
<link rel="next" href="has_nothrow_assign.html" title="has_nothrow_assign">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="function_traits.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_assign.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<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>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">has_new_operator</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a class="link" href="integral_constant.html" title="integral_constant">true_type</a>-or-<a class="link" href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
</pre>
<p>
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
type with an overloaded new-operator then inherits from <a class="link" href="integral_constant.html" title="integral_constant">true_type</a>,
otherwise inherits from <a class="link" href="integral_constant.html" title="integral_constant">false_type</a>.
</p>
<p>
<span class="bold"><strong>Compiler Compatibility:</strong></span> Not usable with
compilers that do not support "substitution failure is not an error"
(in which case BOOST_NO_SFINAE will be defined), also known to be broken
with the Borland/Codegear compiler.
</p>
<p>
<span class="bold"><strong>C++ Standard Reference:</strong></span> 12.5.
</p>
<p>
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <span class="preprocessor">#include</span>
<span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_new_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<p>
<span class="bold"><strong>Examples:</strong></span>
</p>
<p>
Given:
</p>
<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">A</span> <span class="special">{</span> <span class="keyword">void</span><span class="special">*</span> <span class="keyword">operator</span> <span class="keyword">new</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">);</span> <span class="special">};</span>
<span class="keyword">class</span> <span class="identifier">B</span> <span class="special">{</span> <span class="keyword">void</span><span class="special">*</span> <span class="keyword">operator</span> <span class="keyword">new</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">nothrow</span><span class="special">&amp;);</span> <span class="special">};</span>
<span class="keyword">class</span> <span class="identifier">C</span> <span class="special">{</span> <span class="keyword">void</span><span class="special">*</span> <span class="keyword">operator</span> <span class="keyword">new</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="keyword">void</span><span class="special">*);</span> <span class="special">};</span>
<span class="keyword">class</span> <span class="identifier">D</span> <span class="special">{</span> <span class="keyword">void</span><span class="special">*</span> <span class="keyword">operator</span> <span class="keyword">new</span><span class="special">[](</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">);</span> <span class="special">};</span>
<span class="keyword">class</span> <span class="identifier">E</span> <span class="special">{</span> <span class="keyword">void</span><span class="special">*</span> <span class="keyword">operator</span> <span class="keyword">new</span><span class="special">[](</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">nothrow</span><span class="special">&amp;);</span> <span class="special">};</span>
<span class="keyword">class</span> <span class="identifier">F</span> <span class="special">{</span> <span class="keyword">void</span><span class="special">*</span> <span class="keyword">operator</span> <span class="keyword">new</span><span class="special">[](</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="keyword">void</span><span class="special">*);</span> <span class="special">};</span>
</pre>
<p>
Then:
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
<code class="computeroutput"><span class="identifier">has_new_operator</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span></code>
inherits from <code class="computeroutput"><a class="link" href="integral_constant.html" title="integral_constant">true_type</a></code>.
</p>
<p>
</p>
</blockquote></div>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
<code class="computeroutput"><span class="identifier">has_new_operator</span><span class="special">&lt;</span><span class="identifier">B</span><span class="special">&gt;</span></code>
inherits from <code class="computeroutput"><a class="link" href="integral_constant.html" title="integral_constant">true_type</a></code>.
</p>
<p>
</p>
</blockquote></div>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
<code class="computeroutput"><span class="identifier">has_new_operator</span><span class="special">&lt;</span><span class="identifier">C</span><span class="special">&gt;</span></code>
inherits from <code class="computeroutput"><a class="link" href="integral_constant.html" title="integral_constant">true_type</a></code>.
</p>
<p>
</p>
</blockquote></div>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
<code class="computeroutput"><span class="identifier">has_new_operator</span><span class="special">&lt;</span><span class="identifier">D</span><span class="special">&gt;</span></code>
inherits from <code class="computeroutput"><a class="link" href="integral_constant.html" title="integral_constant">true_type</a></code>.
</p>
<p>
</p>
</blockquote></div>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
<code class="computeroutput"><span class="identifier">has_new_operator</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">&gt;</span></code>
inherits from <code class="computeroutput"><a class="link" href="integral_constant.html" title="integral_constant">true_type</a></code>.
</p>
<p>
</p>
</blockquote></div>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
<code class="computeroutput"><span class="identifier">has_new_operator</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">&gt;</span></code>
inherits from <code class="computeroutput"><a class="link" href="integral_constant.html" title="integral_constant">true_type</a></code>.
</p>
<p>
</p>
</blockquote></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2000, 2006 Adobe Systems Inc, David Abrahams,
Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
Ramey and Jeremy Siek<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="function_traits.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_assign.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="../../index.html" title="Chapter<65>1.<2E>Boost.TypeTraits">
<link rel="up" href="../reference.html" title="Alphabetical Reference">
<link rel="prev" href="function_traits.html" title="function_traits">
<link rel="prev" href="has_new_operator.html" title="has_new_operator">
<link rel="next" href="has_nothrow_constructor.html" title="has_nothrow_constructor">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="function_traits.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_constructor.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
<a accesskey="p" href="has_new_operator.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_constructor.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
@@ -67,7 +67,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="function_traits.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_constructor.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
<a accesskey="p" href="has_new_operator.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="has_nothrow_constructor.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -49,7 +49,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id798651"></a><p class="title"><b>Table<EFBFBD>1.14.<2E>Examples</b></p>
<a name="id811485"></a><p class="title"><b>Table<EFBFBD>1.14.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -7,7 +7,7 @@
<link rel="home" href="../../index.html" title="Chapter<65>1.<2E>Boost.TypeTraits">
<link rel="up" href="../reference.html" title="Alphabetical Reference">
<link rel="prev" href="is_union.html" title="is_union">
<link rel="next" href="is_void.html" title="is_void">
<link rel="next" href="is_virtual_base_of.html" title="is_virtual_base_of">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_union.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_void.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
<a accesskey="p" href="is_union.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_virtual_base_of.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
@@ -130,7 +130,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_union.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_void.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
<a accesskey="p" href="is_union.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_virtual_base_of.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,132 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>is_virtual_base_of</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="../../index.html" title="Chapter<65>1.<2E>Boost.TypeTraits">
<link rel="up" href="../reference.html" title="Alphabetical Reference">
<link rel="prev" href="is_unsigned.html" title="is_unsigned">
<link rel="next" href="is_void.html" title="is_void">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_unsigned.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_void.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_typetraits.reference.is_virtual_base_of"></a><a class="link" href="is_virtual_base_of.html" title="is_virtual_base_of"> is_virtual_base_of</a>
</h3></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Base</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">is_virtual_base_of</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a class="link" href="integral_constant.html" title="integral_constant">true_type</a>-or-<a class="link" href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
</pre>
<p>
<span class="bold"><strong>Inherits:</strong></span> If Base is a virtual base class
of type Derived then inherits from <a class="link" href="integral_constant.html" title="integral_constant">true_type</a>,
otherwise inherits from <a class="link" href="integral_constant.html" title="integral_constant">false_type</a>.
</p>
<p>
Types <code class="computeroutput"><span class="identifier">Base</span></code> and <code class="computeroutput"><span class="identifier">Derived</span></code> must not be incomplete types.
</p>
<p>
<span class="bold"><strong>C++ Standard Reference:</strong></span> 10.
</p>
<p>
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <span class="preprocessor">#include</span>
<span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">is_virtual_base_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<p>
<span class="bold"><strong>Compiler Compatibility:</strong></span> this trait also
requires a working <a class="link" href="is_base_of.html" title="is_base_of">is_base_of</a>
trait.
</p>
<p>
<span class="bold"><strong>Examples:</strong></span>
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
Given: <code class="computeroutput"> <span class="keyword">class</span> <span class="identifier">Base</span><span class="special">{};</span> <span class="keyword">class</span> <span class="identifier">Derived</span> <span class="special">:</span>
<span class="keyword">public</span> <span class="keyword">virtual</span>
<span class="identifier">Base</span><span class="special">{};</span></code>
</p>
<p>
</p>
</blockquote></div>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
<code class="computeroutput"><span class="identifier">is_virtual_base_of</span><span class="special">&lt;</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">&gt;</span></code>
inherits from <code class="computeroutput"><a class="link" href="integral_constant.html" title="integral_constant">true_type</a></code>.
</p>
<p>
</p>
</blockquote></div>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
<code class="computeroutput"><span class="identifier">is_virtual_base_of</span><span class="special">&lt;</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is the type <code class="computeroutput"><a class="link" href="integral_constant.html" title="integral_constant">true_type</a></code>.
</p>
<p>
</p>
</blockquote></div>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
<code class="computeroutput"><span class="identifier">is_virtual_base_of</span><span class="special">&lt;</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">&gt;::</span><span class="identifier">value</span></code> is an integral constant expression
that evaluates to <span class="emphasis"><em>true</em></span>.
</p>
<p>
</p>
</blockquote></div>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
<code class="computeroutput"><span class="identifier">is_virtual_base_of</span><span class="special">&lt;</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Derived</span><span class="special">&gt;::</span><span class="identifier">value</span></code> is an integral constant expression
that evaluates to <span class="emphasis"><em>true</em></span>.
</p>
<p>
</p>
</blockquote></div>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<p>
<code class="computeroutput"><span class="identifier">is_virtual_base_of</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">U</span><span class="special">&gt;::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
</p>
<p>
</p>
</blockquote></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2000, 2006 Adobe Systems Inc, David Abrahams,
Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
Ramey and Jeremy Siek<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_unsigned.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_void.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="../../index.html" title="Chapter<65>1.<2E>Boost.TypeTraits">
<link rel="up" href="../reference.html" title="Alphabetical Reference">
<link rel="prev" href="is_unsigned.html" title="is_unsigned">
<link rel="prev" href="is_virtual_base_of.html" title="is_virtual_base_of">
<link rel="next" href="is_volatile.html" title="is_volatile">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_unsigned.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_volatile.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
<a accesskey="p" href="is_virtual_base_of.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_volatile.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
@@ -108,7 +108,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_unsigned.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_volatile.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
<a accesskey="p" href="is_virtual_base_of.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_volatile.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id818151"></a><p class="title"><b>Table<EFBFBD>1.15.<2E>Examples</b></p>
<a name="id832332"></a><p class="title"><b>Table<EFBFBD>1.15.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id818626"></a><p class="title"><b>Table<EFBFBD>1.16.<2E>Examples</b></p>
<a name="id832807"></a><p class="title"><b>Table<EFBFBD>1.16.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -51,7 +51,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id819143"></a><p class="title"><b>Table<EFBFBD>1.17.<2E>Examples</b></p>
<a name="id834495"></a><p class="title"><b>Table<EFBFBD>1.17.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id821894"></a><p class="title"><b>Table<EFBFBD>1.18.<2E>Examples</b></p>
<a name="id835530"></a><p class="title"><b>Table<EFBFBD>1.18.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id822431"></a><p class="title"><b>Table<EFBFBD>1.19.<2E>Examples</b></p>
<a name="id836066"></a><p class="title"><b>Table<EFBFBD>1.19.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id822954"></a><p class="title"><b>Table<EFBFBD>1.20.<2E>Examples</b></p>
<a name="id837136"></a><p class="title"><b>Table<EFBFBD>1.20.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id823476"></a><p class="title"><b>Table<EFBFBD>1.21.<2E>Examples</b></p>
<a name="id837658"></a><p class="title"><b>Table<EFBFBD>1.21.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id824024"></a><p class="title"><b>Table<EFBFBD>1.22.<2E>Examples</b></p>
<a name="id838205"></a><p class="title"><b>Table<EFBFBD>1.22.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id824529"></a><p class="title"><b>Table<EFBFBD>1.23.<2E>Examples</b></p>
<a name="id838710"></a><p class="title"><b>Table<EFBFBD>1.23.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id824978"></a><p class="title"><b>Table<EFBFBD>1.24.<2E>Examples</b></p>
<a name="id840525"></a><p class="title"><b>Table<EFBFBD>1.24.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@@ -30,7 +30,7 @@
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
Ramey and Jeremy Siek</p></div>
<div><div class="legalnotice">
<a name="id765520"></a><p>
<a name="id777199"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
@@ -90,6 +90,7 @@
<dt><span class="section"><a href="boost_typetraits/reference/floating_point_promotion.html">
floating_point_promotion</a></span></dt>
<dt><span class="section"><a href="boost_typetraits/reference/function_traits.html"> function_traits</a></span></dt>
<dt><span class="section"><a href="boost_typetraits/reference/has_new_operator.html"> has_new_operator</a></span></dt>
<dt><span class="section"><a href="boost_typetraits/reference/has_nothrow_assign.html"> has_nothrow_assign</a></span></dt>
<dt><span class="section"><a href="boost_typetraits/reference/has_nothrow_constructor.html">
has_nothrow_constructor</a></span></dt>
@@ -137,6 +138,7 @@
<dt><span class="section"><a href="boost_typetraits/reference/is_reference.html"> is_reference</a></span></dt>
<dt><span class="section"><a href="boost_typetraits/reference/is_union.html"> is_union</a></span></dt>
<dt><span class="section"><a href="boost_typetraits/reference/is_unsigned.html"> is_unsigned</a></span></dt>
<dt><span class="section"><a href="boost_typetraits/reference/is_virtual_base_of.html"> is_virtual_base_of</a></span></dt>
<dt><span class="section"><a href="boost_typetraits/reference/is_void.html"> is_void</a></span></dt>
<dt><span class="section"><a href="boost_typetraits/reference/is_volatile.html"> is_volatile</a></span></dt>
<dt><span class="section"><a href="boost_typetraits/reference/make_signed.html"> make_signed</a></span></dt>

View File

@@ -0,0 +1,40 @@
[/
Copyright 2009 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:is_virtual_base_of is_virtual_base_of]
template <class Base, class Derived>
struct is_virtual_base_of : public __tof {};
__inherit If Base is a virtual base class of type Derived then inherits from __true_type,
otherwise inherits from __false_type.
Types `Base` and `Derived` must not be incomplete types.
__std_ref 10.
__header ` #include <boost/type_traits/is_virtual_base_of.hpp>` or ` #include <boost/type_traits.hpp>`
__compat this trait also requires a working __is_base_of trait.
__examples
[:Given: ` class Base{}; class Derived : public virtual Base{};` ]
[:`is_virtual_base_of<Base, Derived>` inherits from `__true_type`.]
[:`is_virtual_base_of<Base, Derived>::type` is the type `__true_type`.]
[:`is_virtual_base_of<Base, Derived>::value` is an integral constant
expression that evaluates to /true/.]
[:`is_virtual_base_of<Base, Derived>::value` is an integral constant
expression that evaluates to /true/.]
[:`is_virtual_base_of<T, U>::value_type` is the type `bool`.]
[endsect]

View File

@@ -73,6 +73,7 @@
[def __has_virtual_destructor [link boost_typetraits.reference.has_virtual_destructor has_virtual_destructor]]
[def __is_pod [link boost_typetraits.reference.is_pod is_pod]]
[def __has_trivial_constructor [link boost_typetraits.reference.has_trivial_constructor has_trivial_constructor]]
[def __has_new_operator [link boost_typetraits.reference.has_new_operator has_new_operator]]
[def __has_trivial_copy [link boost_typetraits.reference.has_trivial_copy has_trivial_copy]]
[def __has_trivial_default_constructor [link boost_typetraits.reference.has_trivial_constructor has_trivial_default_constructor]]
[def __has_trivial_copy_constructor [link boost_typetraits.reference.has_trivial_copy has_trivial_copy_constructor]]
@@ -86,6 +87,7 @@
[def __has_nothrow_assign [link boost_typetraits.reference.has_nothrow_assign has_nothrow_assign]]
[def __is_base_of [link boost_typetraits.reference.is_base_of is_base_of]]
[def __is_virtual_base_of [link boost_typetraits.reference.is_virtual_base_of is_virtual_base_of]]
[def __is_convertible [link boost_typetraits.reference.is_convertible is_convertible]]
[def __is_same [link boost_typetraits.reference.is_same is_same]]
@@ -168,6 +170,7 @@ that is the result of the transformation.
[include floating_point_promotion.qbk]
[include function_traits.qbk]
[include has_new_operator.qbk]
[include has_nothrow_assign.qbk]
[include has_nothrow_constructor.qbk]
[include has_nothrow_copy.qbk]
@@ -221,6 +224,7 @@ See __has_trivial_constructor.
[include is_reference.qbk]
[include is_union.qbk]
[include is_unsigned.qbk]
[include is_virtual_base_of.qbk]
[include is_void.qbk]
[include is_volatile.qbk]

View File

@@ -102,6 +102,9 @@ The following templates describe the general properties of a type.
template <class T>
struct __alignment_of;
template <class T>
struct __has_new_operator;
template <class T>
struct __has_nothrow_assign;
@@ -183,6 +186,9 @@ between two types:
template <class Base, class Derived>
struct __is_base_of;
template <class Base, class Derived>
struct __is_virtual_base_of;
template <class From, class To>
struct __is_convertible;