]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <?xml version="1.0" encoding="utf-8" ?> |
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
4 | <!-- Copyright Aleksey Gurtovoy 2006. Distributed under the Boost --> | |
5 | <!-- Software License, Version 1.0. (See accompanying --> | |
6 | <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> | |
7 | <head> | |
8 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | <meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" /> | |
10 | <title>THE BOOST MPL LIBRARY: Tag Dispatching Protocol</title> | |
11 | <link rel="stylesheet" href="../style.css" type="text/css" /> | |
12 | </head> | |
13 | <body class="docframe"> | |
14 | <table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iterator-protocol.html" class="navigation-link">Prev</a> <a href="./numeric-metafunction.html" class="navigation-link">Next</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./iterator-protocol.html" class="navigation-link">Back</a> <a href="./numeric-metafunction.html" class="navigation-link">Along</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./changes-in-boost-1-32-0.html" class="navigation-link">Up</a> <a href="../index.html" class="navigation-link">Home</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./tutorial_toc.html" class="navigation-link">Full TOC</a></span></td> | |
15 | <td class="header-group page-location"><a href="../index.html" class="navigation-link">Front Page</a> / <a href="./changelog-history.html" class="navigation-link">Changelog & History</a> / <a href="./changes-in-boost-1-32-0.html" class="navigation-link">Changes in Boost 1.32.0 Release</a> / <a href="./tag-dispatching-protocol.html" class="navigation-link">Tag Dispatching Protocol</a></td> | |
16 | </tr></table><div class="header-separator"></div> | |
17 | <div class="section" id="tag-dispatching-protocol"> | |
18 | <h1><a class="toc-backref" href="./changes-in-boost-1-32-0.html#id66" name="tag-dispatching-protocol">Tag Dispatching Protocol</a></h1> | |
19 | <p>The mechanism used to select algorithm implementations based on | |
20 | sequence family has been changed to use metafunction classes:</p> | |
21 | <table border="1" class="table"> | |
22 | <colgroup> | |
23 | <col width="53%" /> | |
24 | <col width="47%" /> | |
25 | </colgroup> | |
26 | <thead valign="bottom"> | |
27 | <tr><th>Before</th> | |
28 | <th>Now</th> | |
29 | </tr> | |
30 | </thead> | |
31 | <tbody valign="top"> | |
32 | <tr><td><em>name</em><tt class="literal"><span class="pre">_traits<Tag>::algorithm<...>::type</span></tt></td> | |
33 | <td><em>name</em><tt class="literal"><span class="pre">_impl<Tag>::apply<...>::type</span></tt></td> | |
34 | </tr> | |
35 | </tbody> | |
36 | </table> | |
37 | <p>If your code implemented a custom sequence, it needs to be adjusted | |
38 | according to the above table; for example:</p> | |
39 | <table border="1" class="table"> | |
40 | <colgroup> | |
41 | <col width="50%" /> | |
42 | <col width="50%" /> | |
43 | </colgroup> | |
44 | <thead valign="bottom"> | |
45 | <tr><th>Before</th> | |
46 | <th>Now</th> | |
47 | </tr> | |
48 | </thead> | |
49 | <tbody valign="top"> | |
50 | <tr><td><pre class="first last literal-block"> | |
51 | template<> struct begin_traits<my_tag> | |
52 | { | |
53 | template< typename S > struct algorithm | |
54 | { | |
55 | typedef ... type; | |
56 | }; | |
57 | }; | |
58 | </pre> | |
59 | </td> | |
60 | <td><pre class="first last literal-block"> | |
61 | template<> struct begin_<strong>impl</strong><my_tag> | |
62 | { | |
63 | template< typename S > struct <strong>apply</strong> | |
64 | { | |
65 | typedef ... type; | |
66 | }; | |
67 | }; | |
68 | </pre> | |
69 | </td> | |
70 | </tr> | |
71 | </tbody> | |
72 | </table> | |
73 | </div> | |
74 | ||
75 | <div class="footer-separator"></div> | |
76 | <table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iterator-protocol.html" class="navigation-link">Prev</a> <a href="./numeric-metafunction.html" class="navigation-link">Next</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./iterator-protocol.html" class="navigation-link">Back</a> <a href="./numeric-metafunction.html" class="navigation-link">Along</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./changes-in-boost-1-32-0.html" class="navigation-link">Up</a> <a href="../index.html" class="navigation-link">Home</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./tutorial_toc.html" class="navigation-link">Full TOC</a></span></td> | |
77 | </tr></table></body> | |
78 | </html> |