Imported Upstream version 1.57.0
[platform/upstream/boost.git] / doc / html / BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Macro BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT</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="proto/reference.html#header.boost.proto.extends_hpp" title="Header &lt;boost/proto/extends.hpp&gt;">
9 <link rel="prev" href="BOOST_PROTO_EXTENDS_USING_ASSIGN.html" title="Macro BOOST_PROTO_EXTENDS_USING_ASSIGN">
10 <link rel="next" href="boost/proto/functional/at.html" title="Struct at">
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="BOOST_PROTO_EXTENDS_USING_ASSIGN.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="proto/reference.html#header.boost.proto.extends_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/proto/functional/at.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Macro BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT</span></h2>
29 <p>BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT &#8212; For exposing in classes that inherit from
30       <code class="computeroutput"><a class="link" href="boost/proto/extends.html" title="Struct template extends">proto::extends&lt;&gt;</a></code>
31       the overloaded assignment operators defined therein. Unlike the
32       <code class="computeroutput"><a class="link" href="BOOST_PROTO_EXTENDS_USING_ASSIGN.html" title="Macro BOOST_PROTO_EXTENDS_USING_ASSIGN">BOOST_PROTO_EXTENDS_USING_ASSIGN</a>()</code> macro,
33       <code class="computeroutput">BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT()</code> is for use in non-dependent
34       contexts.
35       </p>
36 </div>
37 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
38 <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="proto/reference.html#header.boost.proto.extends_hpp" title="Header &lt;boost/proto/extends.hpp&gt;">boost/proto/extends.hpp</a>&gt;
39
40 </span>BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT(Derived)</pre></div>
41 <div class="refsect1">
42 <a name="idp371044176"></a><h2>Description</h2>
43 <p>
44         The standard usage of
45         <code class="computeroutput"><a class="link" href="boost/proto/extends.html" title="Struct template extends">proto::extends&lt;&gt;</a></code>
46         is to define a class template that inherits from it. The derived class template automatically gets a
47         compiler-generated assignment operator that hides the ones defined in
48         <code class="computeroutput"><a class="link" href="boost/proto/extends.html" title="Struct template extends">proto::extends&lt;&gt;</a></code>.
49         Using <code class="computeroutput">BOOST_PROTO_EXTENDS_USING_ASSIGN()</code> in the derived class solves this problem.
50       </p>
51 <p>
52         However, if the expression extension is an ordinary class and not a class template, the usage of
53         <code class="computeroutput">BOOST_PROTO_EXTENDS_USING_ASSIGN()</code> is in a so-called non-dependent context. In plain English,
54         it means it is illegal to use <code class="computeroutput">typename</code> in some places where it is required in a class template. 
55         In those cases, you should use <code class="computeroutput">BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT()</code> instead.
56       </p>
57 <p>
58                 See also:
59                 </p>
60 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
61 <li class="listitem"><code class="computeroutput"><a class="link" href="boost/proto/extends.html" title="Struct template extends">proto::extends&lt;&gt;</a></code></li>
62 <li class="listitem"><code class="computeroutput"><a class="link" href="BOOST_PROTO_EXTENDS_USING_ASSIGN.html" title="Macro BOOST_PROTO_EXTENDS_USING_ASSIGN">BOOST_PROTO_EXTENDS_USING_ASSIGN</a>()</code></li>
63 </ul></div>
64 <p>
65       </p>
66 </div>
67 </div>
68 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
69 <td align="left"></td>
70 <td align="right"><div class="copyright-footer">Copyright &#169; 2008 Eric Niebler<p>
71         Distributed under the Boost Software License, Version 1.0. (See accompanying
72         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>)
73       </p>
74 </div></td>
75 </tr></table>
76 <hr>
77 <div class="spirit-nav">
78 <a accesskey="p" href="BOOST_PROTO_EXTENDS_USING_ASSIGN.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="proto/reference.html#header.boost.proto.extends_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/proto/functional/at.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
79 </div>
80 </body>
81 </html>