1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5 <title>Boost.Geometry (aka GGL, Generic Geometry Library)</title>
6 <link href="doxygen.css" rel="stylesheet" type="text/css">
7 <link href="tabs.css" rel="stylesheet" type="text/css">
9 <table cellpadding="2" width="100%">
13 <img alt="Boost.Geometry" src="images/ggl-logo-big.png" height="80" width="200">
16 <td valign="top" align="right">
17 <a href="http://www.boost.org">
18 <img alt="Boost C++ Libraries" src="images/accepted_by_boost.png" height="80" width="230" border="0">
24 <!-- Generated by Doxygen 1.8.6 -->
25 <div id="navrow1" class="tabs">
27 <li><a href="index.html"><span>Main Page</span></a></li>
28 <li><a href="pages.html"><span>Related Pages</span></a></li>
29 <li><a href="modules.html"><span>Modules</span></a></li>
30 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
31 <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
32 <li><a href="files.html"><span>Files</span></a></li>
33 <li><a href="examples.html"><span>Examples</span></a></li>
36 <div id="navrow2" class="tabs2">
38 <li><a href="annotated.html"><span>Class List</span></a></li>
39 <li><a href="classes.html"><span>Class Index</span></a></li>
40 <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
41 <li><a href="functions.html"><span>Class Members</span></a></li>
44 <div id="nav-path" class="navpath">
46 <li class="navelem"><a class="el" href="namespaceboost.html">boost</a></li><li class="navelem"><a class="el" href="namespaceboost_1_1geometry.html">geometry</a></li><li class="navelem"><a class="el" href="structboost_1_1geometry_1_1add__const__if__c.html">add_const_if_c</a></li> </ul>
51 <a href="#pub-types">Public Types</a> |
52 <a href="structboost_1_1geometry_1_1add__const__if__c-members.html">List of all members</a> </div>
53 <div class="headertitle">
54 <div class="title">boost::geometry::add_const_if_c< IsConst, Type > Struct Template Reference</div> </div>
56 <div class="contents">
58 <p>Meta-function to define a const or non const type.
59 <a href="structboost_1_1geometry_1_1add__const__if__c.html#details">More...</a></p>
60 <table class="memberdecls">
61 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
62 Public Types</h2></td></tr>
63 <tr class="memitem:a7adfc69ab7628a0884a19166a3c681a9"><td class="memItemLeft" align="right" valign="top">typedef boost::mpl::if_c<br class="typebreak"/>
64 < IsConst, Type const, Type ><br class="typebreak"/>
65 ::<a class="el" href="structboost_1_1geometry_1_1add__const__if__c.html#a7adfc69ab7628a0884a19166a3c681a9">type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1geometry_1_1add__const__if__c.html#a7adfc69ab7628a0884a19166a3c681a9">type</a></td></tr>
66 <tr class="separator:a7adfc69ab7628a0884a19166a3c681a9"><td class="memSeparator" colspan="2"> </td></tr>
68 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
69 <div class="textblock"><h3>template<bool IsConst, typename Type><br/>
70 struct boost::geometry::add_const_if_c< IsConst, Type ></h3>
72 <p>Meta-function to define a const or non const type. </p>
73 <p>If the boolean template parameter is true, the type parameter will be defined as const, otherwise it will be defined as it was. This meta-function is used to have one implementation for both const and non const references </p>
74 <dl class="section note"><dt>Note</dt><dd>This traits class is completely independant from Boost.Geometry and might be a separate addition to Boost </dd>
76 Used in a.o. for_each, interior_rings, exterior_ring </dd></dl>
77 <dl class="section user"><dt>Example</dt><dd><div class="fragment"><div class="line"><span class="keywordtype">void</span> foo(<span class="keyword">typename</span> add_const_if_c<IsConst, Point>::type& point)</div>
78 </div><!-- fragment --> </dd></dl>
79 </div><h2 class="groupheader">Member Typedef Documentation</h2>
80 <a class="anchor" id="a7adfc69ab7628a0884a19166a3c681a9"></a>
82 <div class="memproto">
83 <div class="memtemplate">
84 template<bool IsConst, typename Type > </div>
85 <table class="memname">
87 <td class="memname">typedef boost::mpl::if_c< IsConst, Type const, Type >::<a class="el" href="structboost_1_1geometry_1_1add__const__if__c.html#a7adfc69ab7628a0884a19166a3c681a9">type</a> <a class="el" href="structboost_1_1geometry_1_1add__const__if__c.html">boost::geometry::add_const_if_c</a>< IsConst, Type >::<a class="el" href="structboost_1_1geometry_1_1add__const__if__c.html#a7adfc69ab7628a0884a19166a3c681a9">type</a></td>
90 </div><div class="memdoc">
94 </div><!-- contents -->
99 <td align="left"><small>
104 Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands<br>
105 Copyright © 2008-2011 Bruno Lalande, Paris, France<br>
106 Copyright © 2009-2010 Mateusz Loskot, London, UK<br>
112 <address style="text-align: right;"><small>
113 Documentation is generated by <a href="http://www.doxygen.org/index.html">Doxygen</a>