• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Boost.Convert C++ Reference</title>
5<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="index.html" title="Chapter 1. Boost.Convert 2.0">
8<link rel="up" href="index.html" title="Chapter 1. Boost.Convert 2.0">
9<link rel="prev" href="boost_convert/acknowledgements.html" title="Acknowledgements">
10<link rel="next" href="boost/cnv/reference.html" title="Struct template reference">
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_convert/acknowledgements.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><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/cnv/reference.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h2 class="title" style="clear: both">
27<a name="boost_convert_c___reference"></a>Boost.Convert C++ Reference</h2></div></div></div>
28<div class="toc"><dl class="toc">
29<dt><span class="section"><a href="boost_convert_c___reference.html#header.boost.convert_hpp">Header &lt;boost/convert.hpp&gt;</a></span></dt>
30<dd><dl></dl></dd>
31<dt><span class="section"><a href="header/boost/convert/base_hpp.html">Header &lt;boost/convert/base.hpp&gt;</a></span></dt>
32<dd><dl></dl></dd>
33<dt><span class="section"><a href="header/boost/convert/lexical_cast_hpp.html">Header &lt;boost/convert/lexical_cast.hpp&gt;</a></span></dt>
34<dd><dl></dl></dd>
35<dt><span class="section"><a href="header/boost/convert/parameters_hpp.html">Header &lt;boost/convert/parameters.hpp&gt;</a></span></dt>
36<dt><span class="section"><a href="header/boost/convert/printf_hpp.html">Header &lt;boost/convert/printf.hpp&gt;</a></span></dt>
37<dd><dl></dl></dd>
38<dt><span class="section"><a href="header/boost/convert/spirit_hpp.html">Header &lt;boost/convert/spirit.hpp&gt;</a></span></dt>
39<dd><dl></dl></dd>
40<dt><span class="section"><a href="header/boost/convert/stream_hpp.html">Header &lt;boost/convert/stream.hpp&gt;</a></span></dt>
41<dd><dl></dl></dd>
42<dt><span class="section"><a href="header/boost/convert/strtol_hpp.html">Header &lt;boost/convert/strtol.hpp&gt;</a></span></dt>
43<dd><dl></dl></dd>
44<dt><span class="section"><a href="header/boost/make_default_hpp.html">Header &lt;boost/make_default.hpp&gt;</a></span></dt>
45<dd><dl></dl></dd>
46</dl></div>
47<div class="section">
48<div class="titlepage"><div><div><h3 class="title">
49<a name="header.boost.convert_hpp"></a>Header &lt;<a href="../../../../boost/convert.hpp" target="_top">boost/convert.hpp</a>&gt;</h3></div></div></div>
50<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
51  <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="boost/throw_on_failure.html" title="Global throw_on_failure">throw_on_failure</a><span class="special">;</span>
52  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> TypeOut<span class="special">,</span> <span class="keyword">typename</span> TypeIn<span class="special">,</span> <span class="keyword">typename</span> Converter<span class="special">&gt;</span>
53    <span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">TypeOut</span> <span class="special">&gt;</span> <a class="link" href="boost/convert_idm45934319980144.html" title="Function template convert"><span class="identifier">convert</span></a><span class="special">(</span><span class="identifier">TypeIn</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">Converter</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
54  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> TypeOut<span class="special">,</span> <span class="keyword">typename</span> TypeIn<span class="special">&gt;</span>
55    <span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">TypeOut</span> <span class="special">&gt;</span> <a class="link" href="boost/convert_idm45934319972896.html" title="Function template convert"><span class="identifier">convert</span></a><span class="special">(</span><span class="identifier">TypeIn</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
56
57  <span class="comment">// Boost.Convert non-optional deployment interface. </span>
58  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> TypeOut<span class="special">,</span> <span class="keyword">typename</span> TypeIn<span class="special">,</span> <span class="keyword">typename</span> Converter<span class="special">&gt;</span>
59    <span class="identifier">TypeOut</span> <a name="boost.convert_idm45934308128288"></a><span class="identifier">convert</span><span class="special">(</span><span class="identifier">TypeIn</span> <span class="keyword">const</span> <span class="special">&amp;</span> value_in<span class="special">,</span> <span class="identifier">Converter</span> <span class="keyword">const</span> <span class="special">&amp;</span> converter<span class="special">,</span>
60                    <span class="emphasis"><em><span class="identifier">unspecified</span></em></span><span class="special">)</span><span class="special">;</span>
61  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> TypeOut<span class="special">,</span> <span class="keyword">typename</span> TypeIn<span class="special">,</span> <span class="keyword">typename</span> Converter<span class="special">,</span>
62           <span class="keyword">typename</span> Fallback<span class="special">&gt;</span>
63    <span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="identifier">is_convertible</span><span class="special">&lt;</span> <span class="identifier">Fallback</span><span class="special">,</span> <span class="identifier">TypeOut</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">TypeOut</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span>
64    <a name="boost.convert_idm45934308123088"></a><span class="identifier">convert</span><span class="special">(</span><span class="identifier">TypeIn</span> <span class="keyword">const</span> <span class="special">&amp;</span> value_in<span class="special">,</span> <span class="identifier">Converter</span> <span class="keyword">const</span> <span class="special">&amp;</span> converter<span class="special">,</span>
65            <span class="identifier">Fallback</span> <span class="keyword">const</span> <span class="special">&amp;</span> fallback<span class="special">)</span><span class="special">;</span>
66  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> TypeOut<span class="special">,</span> <span class="keyword">typename</span> TypeIn<span class="special">,</span> <span class="keyword">typename</span> Converter<span class="special">,</span>
67           <span class="keyword">typename</span> Fallback<span class="special">&gt;</span>
68    <span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">is_fun</span><span class="special">&lt;</span> <span class="identifier">Fallback</span><span class="special">,</span> <span class="identifier">TypeOut</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">TypeOut</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span>
69    <a name="boost.convert_idm45934308117600"></a><span class="identifier">convert</span><span class="special">(</span><span class="identifier">TypeIn</span> <span class="keyword">const</span> <span class="special">&amp;</span> value_in<span class="special">,</span> <span class="identifier">Converter</span> <span class="keyword">const</span> <span class="special">&amp;</span> converter<span class="special">,</span>
70            <span class="identifier">Fallback</span> fallback<span class="special">)</span><span class="special">;</span>
71  <span class="keyword">namespace</span> <span class="identifier">cnv</span> <span class="special">{</span>
72    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Converter<span class="special">,</span> <span class="keyword">typename</span> TypeOut<span class="special">,</span> <span class="keyword">typename</span> TypeIn<span class="special">&gt;</span>
73      <span class="keyword">struct</span> <a class="link" href="boost/cnv/reference.html" title="Struct template reference">reference</a><span class="special">;</span>
74
75    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Converter<span class="special">,</span> <span class="keyword">typename</span> TypeOut<span class="special">&gt;</span>
76      <span class="keyword">struct</span> <a class="link" href="boost/cnv/referenc_idm45934320000144.html" title="Struct template reference&lt;Converter, TypeOut, void&gt;">reference</a><span class="special">&lt;</span><span class="identifier">Converter</span><span class="special">,</span> <span class="identifier">TypeOut</span><span class="special">,</span> <span class="keyword">void</span><span class="special">&gt;</span><span class="special">;</span>
77    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> TypeOut<span class="special">,</span> <span class="keyword">typename</span> TypeIn<span class="special">,</span> <span class="keyword">typename</span> Converter<span class="special">&gt;</span>
78      <a class="link" href="boost/cnv/reference.html" title="Struct template reference">reference</a><span class="special">&lt;</span> <span class="identifier">Converter</span><span class="special">,</span> <span class="identifier">TypeOut</span><span class="special">,</span> <span class="identifier">TypeIn</span> <span class="special">&gt;</span> <a class="link" href="boost/cnv/apply_idm45934319990464.html" title="Function template apply"><span class="identifier">apply</span></a><span class="special">(</span><span class="identifier">Converter</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
79    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> TypeOut<span class="special">,</span> <span class="keyword">typename</span> Converter<span class="special">&gt;</span>
80      <a class="link" href="boost/cnv/reference.html" title="Struct template reference">reference</a><span class="special">&lt;</span> <span class="identifier">Converter</span><span class="special">,</span> <span class="identifier">TypeOut</span><span class="special">,</span> <span class="keyword">void</span> <span class="special">&gt;</span> <a name="boost.cnv.apply_idm45934319985024"></a><span class="identifier">apply</span><span class="special">(</span><span class="identifier">Converter</span> <span class="keyword">const</span> <span class="special">&amp;</span> cnv<span class="special">)</span><span class="special">;</span>
81  <span class="special">}</span>
82<span class="special">}</span></pre>
83</div>
84</div>
85<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
86<td align="left"></td>
87<td align="right"><div class="copyright-footer">Copyright © 2009-2016 Vladimir Batov<p>
88        Distributed under the Boost Software License, Version 1.0. See copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>.
89      </p>
90</div></td>
91</tr></table>
92<hr>
93<div class="spirit-nav">
94<a accesskey="p" href="boost_convert/acknowledgements.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><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/cnv/reference.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
95</div>
96</body>
97</html>
98