Imported Upstream version 1.57.0
[platform/upstream/boost.git] / doc / html / boost / type_erasure / typeid_of.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Function typeid_of</title>
5 <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
8 <link rel="up" href="../../boost_typeerasure/reference.html#header.boost.type_erasure.typeid_of_hpp" title="Header &lt;boost/type_erasure/typeid_of.hpp&gt;">
9 <link rel="prev" href="get_idp219744944.html" title="Function get">
10 <link rel="next" href="../../boost_typeerasure/rationale.html" title="Rationale">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
15 <td align="center"><a href="../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="get_idp219744944.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_typeerasure/reference.html#header.boost.type_erasure.typeid_of_hpp"><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="../../boost_typeerasure/rationale.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="boost.type_erasure.typeid_of"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Function typeid_of</span></h2>
29 <p>boost::type_erasure::typeid_of</p>
30 </div>
31 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_typeerasure/reference.html#header.boost.type_erasure.typeid_of_hpp" title="Header &lt;boost/type_erasure/typeid_of.hpp&gt;">boost/type_erasure/typeid_of.hpp</a>&gt;
33
34 </span>
35 <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Concept<span class="special">,</span> <span class="keyword">typename</span> T<span class="special">&gt;</span> 
36   <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">type_info</span> <span class="special">&amp;</span> <span class="identifier">typeid_of</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../any.html" title="Class any">any</a><span class="special">&lt;</span> <span class="identifier">Concept</span><span class="special">,</span> <span class="identifier">T</span> <span class="special">&gt;</span> <span class="special">&amp;</span> arg<span class="special">)</span><span class="special">;</span>
37 <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> Concept<span class="special">&gt;</span> 
38   <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">type_info</span> <span class="special">&amp;</span> <span class="identifier">typeid_of</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="binding.html" title="Class template binding">binding</a><span class="special">&lt;</span> <span class="identifier">Concept</span> <span class="special">&gt;</span> <span class="special">&amp;</span> binding<span class="special">)</span><span class="special">;</span></pre></div>
39 <div class="refsect1">
40 <a name="idp481407056"></a><h2>Description</h2>
41 <p>The first form returns the type currently stored in an <code class="computeroutput"><a class="link" href="any.html" title="Class template any">any</a></code>.</p>
42 <p>The second form returns the type corresponding to a placeholder in <code class="computeroutput">binding</code>.</p>
43 <p>
44 </p>
45 <div class="variablelist"><table border="0" class="variablelist compact">
46 <colgroup>
47 <col align="left" valign="top">
48 <col>
49 </colgroup>
50 <tbody><tr>
51 <td><p><span class="term">Requires:</span></p></td>
52 <td>
53 <p><code class="computeroutput">Concept</code> includes <a class="link" href="typeid_.html" title="Struct template typeid_">typeid_&lt;T&gt;</a>. </p>
54 <p><code class="computeroutput">T</code> is a non-reference, CV-unqualified <a class="link" href="placeholder.html" title="Struct placeholder">placeholder</a>. </p>
55 </td>
56 </tr></tbody>
57 </table></div>
58 </div>
59 </div>
60 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
61 <td align="left"></td>
62 <td align="right"><div class="copyright-footer">Copyright &#169; 2011-2013 Steven Watanabe<p>
63         Distributed under the Boost Software License, Version 1.0. (See accompanying
64         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>)
65       </p>
66 </div></td>
67 </tr></table>
68 <hr>
69 <div class="spirit-nav">
70 <a accesskey="p" href="get_idp219744944.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_typeerasure/reference.html#header.boost.type_erasure.typeid_of_hpp"><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="../../boost_typeerasure/rationale.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
71 </div>
72 </body>
73 </html>