|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68412 - in sandbox/conversion/libs/conversion_ext: doc doc/html test
From: vicente.botet_at_[hidden]
Date: 2011-01-24 07:14:13
Author: viboes
Date: 2011-01-24 07:14:12 EST (Mon, 24 Jan 2011)
New Revision: 68412
URL: http://svn.boost.org/trac/boost/changeset/68412
Log:
Boost.Conversion: Cleanup + updated doc
Binary files modified:
sandbox/conversion/libs/conversion_ext/doc/conversion.pdf
Text files modified:
sandbox/conversion/libs/conversion_ext/doc/Jamfile.v2 | 24
sandbox/conversion/libs/conversion_ext/doc/conversion.qbk | 125 +
sandbox/conversion/libs/conversion_ext/doc/html/index.html | 2240 +++++++++++++++++++++------------------
sandbox/conversion/libs/conversion_ext/test/helper.hpp | 4
sandbox/conversion/libs/conversion_ext/test/vector.cpp | 17
5 files changed, 1300 insertions(+), 1110 deletions(-)
Modified: sandbox/conversion/libs/conversion_ext/doc/Jamfile.v2
==============================================================================
--- sandbox/conversion/libs/conversion_ext/doc/Jamfile.v2 (original)
+++ sandbox/conversion/libs/conversion_ext/doc/Jamfile.v2 2011-01-24 07:14:12 EST (Mon, 24 Jan 2011)
@@ -7,21 +7,8 @@
#
# See http://www.boost.org for updates, documentation, and revision history.
-#import doxygen ;
import quickbook ;
-#doxygen autodoc
-# :
-# [ glob ../../../boost/interprocess/*.hpp ]
-# [ glob ../../../boost/interprocess/allocators/*.hpp ]
-# :
-# <doxygen:param>EXTRACT_ALL=NO
-# <doxygen:param>HIDE_UNDOC_MEMBERS=YES
-# <doxygen:param>EXTRACT_PRIVATE=NO
-# <doxygen:param>EXPAND_ONLY_PREDEF=YES
-# <doxygen:param>PREDEFINED=BOOST_INTERPROCESS_DOXYGEN_INVOKED
-# <xsl:param>"boost.doxygen.reftitle=Boost.Interprocess Reference"
-# ;
xml conversion : conversion.qbk ;
@@ -47,15 +34,15 @@
# Path for libraries index:
<xsl:param>boost.libraries=../../../../libs/libraries.htm
# Use the main Boost stylesheet:
- <xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
+ <xsl:param>html.stylesheet=../../../../doc/src/boostbook.css
# PDF Options:
# TOC Generation: this is needed for FOP-0.9 and later:
- #<xsl:param>fop1.extensions=1
+ <format>pdf:<xsl:param>fop1.extensions=0
# Or enable this if you're using XEP:
- <xsl:param>xep.extensions=1
+ <format>pdf:<xsl:param>xep.extensions=1
# TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
- <xsl:param>fop.extensions=0
+ <format>pdf:<xsl:param>fop.extensions=0
# No indent on body text:
<xsl:param>body.start.indent=0pt
# Margin size:
@@ -69,4 +56,7 @@
# better use SVG's instead:
<format>pdf:<xsl:param>admon.graphics.extension=".svg"
<format>pdf:<xsl:param>admon.graphics.path=$(boost-images)/
+ <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/conversion_ext/doc/html
;
+
+install pdf-install : standalone : <location>. <install-type>PDF ;
Modified: sandbox/conversion/libs/conversion_ext/doc/conversion.pdf
==============================================================================
Binary files. No diff available.
Modified: sandbox/conversion/libs/conversion_ext/doc/conversion.qbk
==============================================================================
--- sandbox/conversion/libs/conversion_ext/doc/conversion.qbk (original)
+++ sandbox/conversion/libs/conversion_ext/doc/conversion.qbk 2011-01-24 07:14:12 EST (Mon, 24 Jan 2011)
@@ -7,8 +7,8 @@
/]
[article Toward Boost.Conversion
- [quickbook 1.4]
- [version 0.5.0]
+ [quickbook 1.5]
+ [version 0.6.0]
[authors [Botet Escriba, Vicente J.]]
[copyright 2009-2010 Vicente J. Botet Escriba]
[id boost.conversion]
@@ -47,36 +47,6 @@
[section Overview]
[/========================]
-[/==================]
-[heading Description]
-[/==================]
-
-Generic explicit conversion between unrelated types.
-
-The template function __convert_to__ allows to convert a source type to a target type, using argument dependent lookup to select a specialized `convert_to` function if available. If no specialized `convert_to` function is available, `boost::conversion::convert_to` is used.
-
-The generic __convert_to__ function requires that the elements to be converted are assignable and copy constructible. It is implemented using the Target copy construction from a Source or the Source conversion operator Target - this is sometimes unavailable.
-
-For standard types, we can not add a specialized `convert_to` function on the namespace std. The alternative to using argument dependent lookup in this situation is to provide a template specialization of boost::conversion::convert_to for every pair of standard types that requires a specialized __convert_to__.
-
-[*Boost.Conversion] provides:
-
-* a generic __convert_to__ function which can be specialized by the user to make explicit conversion between unrelated types.
-* a generic __assign_to__ function which can be specialized by the user to make explicit assignation between unrelated types.
-* a generic `mca` function returning a wrapper which replace assignments by a call to __assign_to__ and conversion operators by a call __convert_to__.
-* a generic `convert_to_via` function which convert a type `From` to another `To` using a temporary one `Via`.
-* a generic `pack` function used to pack Source and target constructor arguments.
-* conversion between `std::complex` of explicitly convertible types.
-* conversion between `std::pair` of explicitly convertible types.
-* conversion between `boost::optional` of explicitly convertible types.
-* conversion between `boost::rational` of explicitly convertible types.
-* conversion between `boost::interval` of explicitly convertible types.
-* conversion between `boost::chrono::time_point` and `boost::ptime`.
-* conversion between `boost::chrono::duration` and `boost::time_duration`.
-* conversion between `boost::array` of explicitly convertible types.
-* conversion between Boost.Fusion sequences of explicitly convertible types.
-* conversion between `std::vector` of explicitly convertible types.
-
[/====================================]
[heading How to Use This Documentation]
[/====================================]
@@ -254,6 +224,39 @@
[endsect]
+
+[/==================]
+[section Description]
+[/==================]
+
+Generic explicit conversion between unrelated types.
+
+The template function __convert_to__ allows to convert a source type to a target type, using argument dependent lookup to select a specialized `convert_to` function if available. If no specialized `convert_to` function is available, `boost::conversion::convert_to` is used.
+
+The generic __convert_to__ function requires that the elements to be converted are assignable and copy constructible. It is implemented using the Target copy construction from a Source or the Source conversion operator Target - this is sometimes unavailable.
+
+For standard types, we can not add a specialized `convert_to` function on the namespace std. The alternative to using argument dependent lookup in this situation is to provide a template specialization of boost::conversion::convert_to for every pair of standard types that requires a specialized __convert_to__.
+
+[*Boost.Conversion] provides:
+
+* a generic __convert_to__ function which can be specialized by the user to make explicit conversion between unrelated types.
+* a generic __assign_to__ function which can be specialized by the user to make explicit assignation between unrelated types.
+* a generic `mca` function returning a wrapper which replace assignments by a call to __assign_to__ and conversion operators by a call __convert_to__.
+* a generic `convert_to_via` function which convert a type `From` to another `To` using a temporary one `Via`.
+* a generic `pack` function used to pack Source and target constructor arguments.
+* conversion between `std::complex` of explicitly convertible types.
+* conversion between `std::pair` of explicitly convertible types.
+* conversion between `boost::optional` of explicitly convertible types.
+* conversion between `boost::rational` of explicitly convertible types.
+* conversion between `boost::interval` of explicitly convertible types.
+* conversion between `boost::chrono::time_point` and `boost::ptime`.
+* conversion between `boost::chrono::duration` and `boost::time_duration`.
+* conversion between `boost::array` of explicitly convertible types.
+* conversion between Boost.Fusion sequences of explicitly convertible types.
+* conversion between `std::vector` of explicitly convertible types.
+
+[endsect]
+
[endsect]
[/==============================]
@@ -291,7 +294,6 @@
The genric part of [*Boost.Conversion] depends only on Boost.Config. Of course it depends on the specific libraries when specific conversion are used.
-
[/========================]
[heading Exceptions safety]
[/========================]
@@ -308,12 +310,30 @@
[/=======================]
[heading Tested compilers]
[/=======================]
+
Currently, [*Boost.Conversion] has been tested in the following compilers/platforms:
-* GCC 3.4.4 Cygwin
-* GCC 3.4.6 Linux
-[/* GCC 4.3.2 Cygwin]
-* GCC 4.1.2 Linux
+Windows with
+
+* MSVC 10.0
+
+Cygwin 1.5 with
+
+* GCC 3.4.4
+
+Cygwin 1.7 with
+
+* GCC 4.3.4
+
+MinGW with
+
+* GCC 4.4.0
+* GCC 4.5.0
+* GCC 4.5.0 -std=c++0x
+* GCC 4.6.0
+* GCC 4.6.0 -std=c++0x
+
+[note Please let us know how this works on other platforms/compilers.]
[note Please send any questions, comments and bug reports to boost <at> lists <dot> boost <dot> org.]
@@ -417,7 +437,6 @@
return partial_specialization_workaround::assign_to<Target,Source>::apply(to, from);
}
-
[endsect]
[section How to convert to types needing some constructors arguments?]
@@ -428,7 +447,6 @@
[endsect]
-
[section:ext_references External Resources]
[variablelist
[
@@ -480,12 +498,23 @@
[section Reference]
+[section Core]
+
[/==========================================================================================]
[section:conversion_hpp Header `<boost/conversion.hpp>`]
[/==========================================================================================]
Include all the core conversion public header files. Note that you will need to include explicitly the C++ standard or Boost specific files when using specific classes.
+ #include <boost/conversion/include.hpp>
+
+[endsect]
+[/==========================================================================================]
+[section:conversion_include_hpp Header `<boost/conversion/include.hpp>`]
+[/==========================================================================================]
+
+Include all the core conversion public header files. Note that you will need to include explicitly the C++ standard or Boost specific files when using specific classes.
+
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/assign_to.hpp>
#include <boost/conversion/convert_to_via.hpp>
@@ -494,8 +523,6 @@
[endsect]
-[section Core]
-
[/==========================================================================================]
[section:convert_to_hpp Header `<boost/conversion/convert_to.hpp>`]
@@ -639,7 +666,7 @@
[variablelist
-[[Effects:] [Returns a implementation dependent class able to transform conversion by convert_to call and assignments by assign_to calls.]]
+[[Effects:] [Returns a implementation dependent class able to transform conversion by __convert_to__ calls and assignments by __assign_to__ calls.]]
[[Throws:] [Nothing.]]
@@ -900,7 +927,7 @@
template < class Clock, class Duration>
chrono::time_point<Clock, Duration>& assign_to(chrono::time_point<Clock, Duration>& to, const posix_time::ptime& from
- , boost::dummy::type_tag<chrono::time_point<Clock, Duration> > const&);;
+ , boost::dummy::type_tag<chrono::time_point<Clock, Duration> > const&);
}
namespace posix_time {
@@ -981,7 +1008,7 @@
namespace boost {
template < typename T1, typename T2, std::size_t N>
array<T1,N> convert_to(array<T2,N> const & from
- , boost::dummy::type_tag<array<T1,N> > const&);;
+ , boost::dummy::type_tag<array<T1,N> > const&);
template < typename T1, typename T2, std::size_t N>
array<T1,N>& assign_to(array<T1,N>& to, array<T2,N> const & from
@@ -1009,11 +1036,11 @@
template < class T1, class T2, class T3, class U1, class U2, class U3>
tuple<T1,T2,T3> convert_to(tuple<U1,U2,U3> const & from
- , boost::dummy::type_tag<tuple<T1,T2,T3> > const&);;
+ , boost::dummy::type_tag<tuple<T1,T2,T3> > const&);
template < class T1, class T2, class T3, class U1, class U2, class U3>
tuple<T1,T2,T3> assign_to(tuple<T1,T2,T3>& to, boost::fusion::tuple<U1,U2,U3> const & from
- , boost::dummy::type_tag<tuple<T1,T2,T3> > const&);;
+ , boost::dummy::type_tag<tuple<T1,T2,T3> > const&);
}
}
@@ -1024,15 +1051,15 @@
[section Examples]
[section chrono::time_point and posix_time::ptime]
-[CHRONO_TIME_POINT_TO_POSIX_TIME_PTIME__HPP]
+[CHRONO_TIME_POINT_TO_POSIX_TIME_PTIME_HPP]
[endsect]
[section boost::optional]
-[OPTIONAL__HPP]
+[OPTIONAL_HPP]
[endsect]
[section std::pair]
-[PAIR__HPP]
+[PAIR_HPP]
[endsect]
[endsect]
Modified: sandbox/conversion/libs/conversion_ext/doc/html/index.html
==============================================================================
--- sandbox/conversion/libs/conversion_ext/doc/html/index.html (original)
+++ sandbox/conversion/libs/conversion_ext/doc/html/index.html 2011-01-24 07:14:12 EST (Mon, 24 Jan 2011)
@@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Toward Boost.Conversion 0.5.0</title>
-<link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
+<title>Toward Boost.Conversion 0.6.0</title>
+<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
-<link rel="start" href="index.html" title="Toward Boost.Conversion 0.5.0">
+<link rel="start" href="index.html" title="Toward Boost.Conversion 0.6.0">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -21,13 +21,13 @@
<div class="titlepage">
<div>
<div><h2 class="title">
-<a name="boost.conversion"></a>Toward Boost.Conversion 0.5.0</h2></div>
+<a name="boost.conversion"></a>Toward Boost.Conversion 0.6.0</h2></div>
<div><div class="authorgroup"><div class="author"><h3 class="author">
<span class="firstname">Vicente J.</span> <span class="surname">Botet Escriba</span>
</h3></div></div></div>
<div><p class="copyright">Copyright © 2009 -2010 Vicente J. Botet Escriba</p></div>
<div><div class="legalnotice">
-<a name="id4987067"></a><p>
+<a name="id4987096"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
@@ -39,7 +39,10 @@
<p><b>Table of Contents</b></p>
<dl>
<dt><span class="section">Overview</span></dt>
-<dd><dl><dt><span class="section">Motivation</span></dt></dl></dd>
+<dd><dl>
+<dt><span class="section">Motivation</span></dt>
+<dt><span class="section">Description</span></dt>
+</dl></dd>
<dt><span class="section"> Users' Guide</span></dt>
<dd><dl>
<dt><span class="section"><a href="index.html#boost.conversion.users_guide.getting_started"> Getting
@@ -50,7 +53,6 @@
</dl></dd>
<dt><span class="section">Reference</span></dt>
<dd><dl>
-<dt><span class="section"> Header <boost/conversion.hpp>
</span></dt>
<dt><span class="section">Core</span></dt>
<dt><span class="section"><a href="index.html#boost.conversion.reference.c___standard_classes_specializations">C++
Standard classes specializations</a></span></dt>
@@ -94,105 +96,12 @@
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost.conversion.overview"></a>Overview
</h2></div></div></div>
-<div class="toc"><dl><dt><span class="section">Motivation</span></dt></dl></div>
-<a name="boost.conversion.overview.description"></a><h3>
-<a name="id4986977"></a>
- Description
- </h3>
-<p>
- Generic explicit conversion between unrelated types.
- </p>
-<p>
- The template function <code class="computeroutput"><span class="identifier">convert_to</span></code>
- allows to convert a source type to a target type, using argument dependent
- lookup to select a specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>
- function if available. If no specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>
- function is available, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">::</span><span class="identifier">convert_to</span></code>
- is used.
- </p>
-<p>
- The generic <code class="computeroutput"><span class="identifier">convert_to</span></code> function
- requires that the elements to be converted are assignable and copy constructible.
- It is implemented using the Target copy construction from a Source or the Source
- conversion operator Target - this is sometimes unavailable.
- </p>
-<p>
- For standard types, we can not add a specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>
- function on the namespace std. The alternative to using argument dependent
- lookup in this situation is to provide a template specialization of boost::conversion::convert_to
- for every pair of standard types that requires a specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>.
- </p>
-<p>
- <span class="bold"><strong>Boost.Conversion</strong></span> provides:
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- a generic <code class="computeroutput"><span class="identifier">convert_to</span></code> function
- which can be specialized by the user to make explicit conversion between
- unrelated types.
- </li>
-<li>
- a generic <code class="computeroutput"><span class="identifier">assign_to</span></code> function
- which can be specialized by the user to make explicit assignation between
- unrelated types.
- </li>
-<li>
- a generic <code class="computeroutput"><span class="identifier">mca</span></code> function
- returning a wrapper which replace assignments by a call to <code class="computeroutput"><span class="identifier">assign_to</span></code> and conversion operators by
- a call <code class="computeroutput"><span class="identifier">convert_to</span></code>.
- </li>
-<li>
- a generic <code class="computeroutput"><span class="identifier">convert_to_via</span></code>
- function which convert a type <code class="computeroutput"><span class="identifier">From</span></code>
- to another <code class="computeroutput"><span class="identifier">To</span></code> using a temporary
- one <code class="computeroutput"><span class="identifier">Via</span></code>.
- </li>
-<li>
- a generic <code class="computeroutput"><span class="identifier">pack</span></code> function
- used to pack Source and target constructor arguments.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rational</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interval</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span></code>
- and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ptime</span></code>.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span></code>
- and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">time_duration</span></code>.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between Boost.Fusion sequences of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span></code>
- of explicitly convertible types.
- </li>
-</ul></div>
+<div class="toc"><dl>
+<dt><span class="section">Motivation</span></dt>
+<dt><span class="section">Description</span></dt>
+</dl></div>
<a name="boost.conversion.overview.how_to_use_this_documentation"></a><h3>
-<a name="id4949128"></a>
+<a name="id4987010"></a>
<a href="index.html#boost.conversion.overview.how_to_use_this_documentation">How
to Use This Documentation</a>
</h3>
@@ -201,32 +110,35 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- Code is in <code class="computeroutput"><span class="identifier">fixed</span> <span class="identifier">width</span>
- <span class="identifier">font</span></code> and is syntax-highlighted.
- </li>
-<li>
- Replaceable text that you will need to supply is in <em class="replaceable"><code>italics</code></em>.
- </li>
-<li>
- If a name refers to a free function, it is specified like this: <code class="computeroutput"><span class="identifier">free_function</span><span class="special">()</span></code>;
- that is, it is in code font and its name is followed by <code class="computeroutput"><span class="special">()</span></code>
- to indicate that it is a free function.
- </li>
-<li>
- If a name refers to a class template, it is specified like this: <code class="computeroutput"><span class="identifier">class_template</span><span class="special"><></span></code>;
- that is, it is in code font and its name is followed by <code class="computeroutput"><span class="special"><></span></code>
- to indicate that it is a class template.
- </li>
-<li>
- If a name refers to a function-like macro, it is specified like this:
- <code class="computeroutput"><span class="identifier">MACRO</span><span class="special">()</span></code>;
- that is, it is uppercase in code font and its name is followed by <code class="computeroutput"><span class="special">()</span></code> to indicate that it is a function-like
- macro. Object-like macros appear without the trailing <code class="computeroutput"><span class="special">()</span></code>.
- </li>
-<li>
- Names that refer to <span class="emphasis"><em>concepts</em></span> in the generic programming
- sense are specified in CamelCase.
- </li>
+ Code is in <code class="computeroutput"><span class="identifier">fixed</span> <span class="identifier">width</span>
+ <span class="identifier">font</span></code> and is syntax-highlighted.
+ </li>
+<li>
+ Replaceable text that you will need to supply is in
+ <em class="replaceable"><code>
+ italics
+ </code></em>
+ .
+ </li>
+<li>
+ If a name refers to a free function, it is specified like this: <code class="computeroutput"><span class="identifier">free_function</span><span class="special">()</span></code>;
+ that is, it is in code font and its name is followed by <code class="computeroutput"><span class="special">()</span></code>
+ to indicate that it is a free function.
+ </li>
+<li>
+ If a name refers to a class template, it is specified like this: <code class="computeroutput"><span class="identifier">class_template</span><span class="special"><></span></code>;
+ that is, it is in code font and its name is followed by <code class="computeroutput"><span class="special"><></span></code>
+ to indicate that it is a class template.
+ </li>
+<li>
+ If a name refers to a function-like macro, it is specified like this: <code class="computeroutput"><span class="identifier">MACRO</span><span class="special">()</span></code>;
+ that is, it is uppercase in code font and its name is followed by <code class="computeroutput"><span class="special">()</span></code> to indicate that it is a function-like
+ macro. Object-like macros appear without the trailing <code class="computeroutput"><span class="special">()</span></code>.
+ </li>
+<li>
+ Names that refer to <span class="emphasis"><em>concepts</em></span> in the generic programming
+ sense are specified in CamelCase.
+ </li>
</ul></div>
<div class="note"><table border="0" summary="Note">
<tr>
@@ -241,7 +153,8 @@
<p>
Finally, you can mentally add the following to any code fragments in this document:
</p>
-<pre class="programlisting"><span class="comment">// Include all of the core Conversion files
+<pre class="programlisting">
+<span class="comment">// Include all of the core Conversion files
</span><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">;</span>
@@ -265,12 +178,14 @@
are unrelated, neither of them offers conversion operators to the other.
Usually we get it by defining a specific function such as
</p>
-<pre class="programlisting"><span class="identifier">Target</span> <span class="identifier">ConvertToTarget</span><span class="special">(</span><span class="identifier">Source</span><span class="special">&</span> <span class="identifier">v</span><span class="special">);</span>
+<pre class="programlisting">
+<span class="identifier">Target</span> <span class="identifier">ConvertToTarget</span><span class="special">(</span><span class="identifier">Source</span><span class="special">&</span> <span class="identifier">v</span><span class="special">);</span>
</pre>
<p>
In my case I started by defining
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Period</span><span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Period</span><span class="special">></span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span> <span class="identifier">convert_to_posix_time_time_duration</span><span class="special">(</span>
<span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">from</span><span class="special">);</span>
@@ -281,7 +196,8 @@
Imagine now that you need to convert a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Source</span><span class="special">,</span> <span class="identifier">Source</span><span class="special">></span></code> to a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Target</span><span class="special">,</span> <span class="identifier">Target</span><span class="special">></span></code>. The standard defines conversions of
pairs if the related types are C++ convertible:
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">pair</span> <span class="special">{</span>
<span class="special">...</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">U</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">V</span><span class="special">></span>
@@ -302,7 +218,8 @@
<p>
Well we can again define a specific function
</p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Target</span><span class="special">></span> <span class="identifier">ConvertToPairOfTarget</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Source</span><span class="special">,</span><span class="identifier">Source</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Target</span><span class="special">></span> <span class="identifier">ConvertToPairOfTarget</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Source</span><span class="special">,</span><span class="identifier">Source</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">ConvertToTarget</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">fisrt</span><span class="special">),</span> <span class="identifier">ConvertToTarget</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
<span class="special">}</span>
</pre>
@@ -311,21 +228,24 @@
could be specific, the <code class="computeroutput"><span class="identifier">ConvertToPairOfTarget</span></code>
should be generic
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Target1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Target2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source2</span><span class="special">)</span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Target1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Target2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source2</span><span class="special">)</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">></span> <span class="identifier">ConvertToPair</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">);</span>
</pre>
<p>
In order to do that we need that the pair template parameters define a common
function, let it call <code class="computeroutput"><span class="identifier">convert_to</span></code>,
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">)</span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">)</span>
<span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">Source</span><span class="special">&</span> <span class="identifier">v</span><span class="special">);</span>
</pre>
<p>
so <code class="computeroutput"><span class="identifier">ConvertToPair</span></code> can be defined
as
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Target1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Target2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source2</span><span class="special">)</span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Target1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Target2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source2</span><span class="special">)</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">></span> <span class="identifier">ConvertToPair</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">Target1</span><span class="special">>(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">fisrt</span><span class="special">),</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">Target2</span><span class="special">>(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
<span class="special">}</span>
@@ -336,12 +256,14 @@
and <code class="computeroutput"><span class="identifier">Target</span></code>. We can do it
as follows
</p>
-<pre class="programlisting"><span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">Source</span><span class="special">&</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">ConvertToTarget</span><span class="special">(</span><span class="identifier">v</span><span class="special">);}</span>
+<pre class="programlisting">
+<span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">Source</span><span class="special">&</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">ConvertToTarget</span><span class="special">(</span><span class="identifier">v</span><span class="special">);}</span>
</pre>
<p>
In my case I needed
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Period</span><span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Period</span><span class="special">></span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">from</span><span class="special">)</span>
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">convert_to_posix_time_time_duration</span><span class="special">(</span><span class="identifier">from</span><span class="special">);</span>
@@ -356,12 +278,14 @@
<p>
So now I can convert
</p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span> <span class="special">></span>
+<pre class="programlisting">
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span> <span class="special">></span>
</pre>
<p>
to
</p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span><span class="special">></span>
+<pre class="programlisting">
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span><span class="special">></span>
</pre>
<p>
using the <code class="computeroutput"><span class="identifier">ConvertToPair</span></code> function.
@@ -373,7 +297,8 @@
we need to specialize the function <code class="computeroutput"><span class="identifier">convert_to</span></code>
for pairs.
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">S1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">S2</span><span class="special">)</span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">S1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">S2</span><span class="special">)</span>
<span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">></span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">>&</span> <span class="identifier">from</span><span class="special">)</span> <span class="special">{</span>
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">>(</span><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">T1</span><span class="special">>(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">first</span><span class="special">),</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">T2</span><span class="special">>(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
@@ -386,7 +311,8 @@
for these conversion? The answer is no. We need just to define the default
implementation of convert_to function to just return the explicit conversion.
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">></span>
<span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&</span> <span class="identifier">from</span><span class="special">)</span>
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">Target</span><span class="special">(</span><span class="identifier">from</span><span class="special">);</span>
@@ -397,29 +323,34 @@
or by the conversion operator can be made more generic by relaying in a function
that explicitly states this conversion. Thus, instead of requiring
</p>
-<pre class="programlisting"><span class="identifier">Target</span><span class="special">(</span><span class="identifier">from</span><span class="special">)</span>
+<pre class="programlisting">
+<span class="identifier">Target</span><span class="special">(</span><span class="identifier">from</span><span class="special">)</span>
</pre>
<p>
requires
</p>
-<pre class="programlisting"><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">Target</span><span class="special">>(</span><span class="identifier">from</span><span class="special">)</span>
+<pre class="programlisting">
+<span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">Target</span><span class="special">>(</span><span class="identifier">from</span><span class="special">)</span>
</pre>
<p>
The same applies to classes or algorithms relying on the assignment operator.
So instead of requiring
</p>
-<pre class="programlisting"><span class="identifier">to</span> <span class="special">=</span> <span class="identifier">from</span>
+<pre class="programlisting">
+<span class="identifier">to</span> <span class="special">=</span> <span class="identifier">from</span>
</pre>
<p>
requires
</p>
-<pre class="programlisting"><span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">to</span><span class="special">,</span> <span class="identifier">from</span><span class="special">);</span>
+<pre class="programlisting">
+<span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">to</span><span class="special">,</span> <span class="identifier">from</span><span class="special">);</span>
</pre>
<p>
The default implementation of <code class="computeroutput"><span class="identifier">assign_to</span></code>
relies on the assignment operator
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">></span>
<span class="identifier">To</span><span class="special">&</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">Target</span><span class="special">&</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&</span> <span class="identifier">from</span><span class="special">)</span>
<span class="special">{</span>
<span class="identifier">to</span> <span class="special">=</span> <span class="identifier">from</span><span class="special">;</span>
@@ -431,7 +362,8 @@
operator it is easy to make a specialization of <code class="computeroutput"><span class="identifier">assign_to</span></code>
as follows.
</p>
-<pre class="programlisting"><span class="identifier">to</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">Target</span><span class="special">>(</span><span class="identifier">from</span><span class="special">);</span>
+<pre class="programlisting">
+<span class="identifier">to</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">Target</span><span class="special">>(</span><span class="identifier">from</span><span class="special">);</span>
</pre>
<p>
The rationale is that if there was not a copy constructor from a Source seems
@@ -443,17 +375,20 @@
<p>
When doing multiple assignments we use to do
</p>
-<pre class="programlisting"><span class="identifier">a</span> <span class="special">=</span> <span class="identifier">b</span> <span class="special">=</span> <span class="identifier">c</span><span class="special">;</span>
+<pre class="programlisting">
+<span class="identifier">a</span> <span class="special">=</span> <span class="identifier">b</span> <span class="special">=</span> <span class="identifier">c</span><span class="special">;</span>
</pre>
<p>
With <code class="computeroutput"><span class="identifier">assign_to</span></code> we could do
</p>
-<pre class="programlisting"><span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">));</span>
+<pre class="programlisting">
+<span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">));</span>
</pre>
<p>
and if we find this not really readable we can try with
</p>
-<pre class="programlisting"><span class="identifier">mca</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">mca</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">c</span><span class="special">;</span>
+<pre class="programlisting">
+<span class="identifier">mca</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">mca</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">c</span><span class="special">;</span>
</pre>
<p>
The behavior of mca recall the tie function of Boost.Tuple, but instead of
@@ -471,6 +406,103 @@
type, as we can do with explicit casts.
</p>
</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost.conversion.overview.description"></a>Description
+</h3></div></div></div>
+<p>
+ Generic explicit conversion between unrelated types.
+ </p>
+<p>
+ The template function <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ allows to convert a source type to a target type, using argument dependent
+ lookup to select a specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ function if available. If no specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ function is available, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">::</span><span class="identifier">convert_to</span></code>
+ is used.
+ </p>
+<p>
+ The generic <code class="computeroutput"><span class="identifier">convert_to</span></code> function
+ requires that the elements to be converted are assignable and copy constructible.
+ It is implemented using the Target copy construction from a Source or the
+ Source conversion operator Target - this is sometimes unavailable.
+ </p>
+<p>
+ For standard types, we can not add a specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ function on the namespace std. The alternative to using argument dependent
+ lookup in this situation is to provide a template specialization of boost::conversion::convert_to
+ for every pair of standard types that requires a specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>Boost.Conversion</strong></span> provides:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ a generic <code class="computeroutput"><span class="identifier">convert_to</span></code> function
+ which can be specialized by the user to make explicit conversion between
+ unrelated types.
+ </li>
+<li>
+ a generic <code class="computeroutput"><span class="identifier">assign_to</span></code> function
+ which can be specialized by the user to make explicit assignation between
+ unrelated types.
+ </li>
+<li>
+ a generic <code class="computeroutput"><span class="identifier">mca</span></code> function
+ returning a wrapper which replace assignments by a call to <code class="computeroutput"><span class="identifier">assign_to</span></code> and conversion operators by
+ a call <code class="computeroutput"><span class="identifier">convert_to</span></code>.
+ </li>
+<li>
+ a generic <code class="computeroutput"><span class="identifier">convert_to_via</span></code>
+ function which convert a type <code class="computeroutput"><span class="identifier">From</span></code>
+ to another <code class="computeroutput"><span class="identifier">To</span></code> using a temporary
+ one <code class="computeroutput"><span class="identifier">Via</span></code>.
+ </li>
+<li>
+ a generic <code class="computeroutput"><span class="identifier">pack</span></code> function
+ used to pack Source and target constructor arguments.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rational</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interval</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span></code>
+ and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ptime</span></code>.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span></code>
+ and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">time_duration</span></code>.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between Boost.Fusion sequences of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span></code>
+ of explicitly convertible types.
+ </li>
+</ul></div>
+</div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -520,7 +552,7 @@
Installing Conversion</a>
</h4></div></div></div>
<a name="boost.conversion.users_guide.getting_started.install.getting_boost_conversion"></a><h5>
-<a name="id4998214"></a>
+<a name="id4998196"></a>
<a href="index.html#boost.conversion.users_guide.getting_started.install.getting_boost_conversion">Getting
Boost.Conversion</a>
</h5>
@@ -534,7 +566,7 @@
Sandbox</a>.
</p>
<a name="boost.conversion.users_guide.getting_started.install.building_boost_conversion"></a><h5>
-<a name="id4998265"></a>
+<a name="id4998247"></a>
<a href="index.html#boost.conversion.users_guide.getting_started.install.building_boost_conversion">Building
Boost.Conversion</a>
</h5>
@@ -544,7 +576,7 @@
in your compiler include path.
</p>
<a name="boost.conversion.users_guide.getting_started.install.requirements"></a><h5>
-<a name="id4998297"></a>
+<a name="id4998280"></a>
<a href="index.html#boost.conversion.users_guide.getting_started.install.requirements">Requirements</a>
</h5>
<p>
@@ -553,7 +585,7 @@
specific conversion are used.
</p>
<a name="boost.conversion.users_guide.getting_started.install.exceptions_safety"></a><h5>
-<a name="id4998329"></a>
+<a name="id4998312"></a>
<a href="index.html#boost.conversion.users_guide.getting_started.install.exceptions_safety">Exceptions
safety</a>
</h5>
@@ -562,7 +594,7 @@
of exception safety as long as the underlying parameters provide it.
</p>
<a name="boost.conversion.users_guide.getting_started.install.thread_safety"></a><h5>
-<a name="id4998355"></a>
+<a name="id4998338"></a>
<a href="index.html#boost.conversion.users_guide.getting_started.install.thread_safety">Thread
safety</a>
</h5>
@@ -570,7 +602,7 @@
All functions in the library are thread-unsafe except when noted explicitly.
</p>
<a name="boost.conversion.users_guide.getting_started.install.tested_compilers"></a><h5>
-<a name="id4998380"></a>
+<a name="id4998363"></a>
<a href="index.html#boost.conversion.users_guide.getting_started.install.tested_compilers">Tested
compilers</a>
</h5>
@@ -578,16 +610,43 @@
Currently, <span class="bold"><strong>Boost.Conversion</strong></span> has been tested
in the following compilers/platforms:
</p>
+<p>
+ Windows with
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ MSVC 10.0
+ </li></ul></div>
+<p>
+ Cygwin 1.5 with
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ GCC 3.4.4
+ </li></ul></div>
+<p>
+ Cygwin 1.7 with
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ GCC 4.3.4
+ </li></ul></div>
+<p>
+ MinGW with
+ </p>
<div class="itemizedlist"><ul type="disc">
<li>
- GCC 3.4.4 Cygwin
- </li>
+ GCC 4.4.0
+ </li>
+<li>
+ GCC 4.5.0
+ </li>
<li>
- GCC 3.4.6 Linux
- </li>
+ GCC 4.5.0 -std=c++0x
+ </li>
<li>
- GCC 4.1.2 Linux
- </li>
+ GCC 4.6.0
+ </li>
+<li>
+ GCC 4.6.0 -std=c++0x
+ </li>
</ul></div>
<div class="note"><table border="0" summary="Note">
<tr>
@@ -595,6 +654,15 @@
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
+ Please let us know how this works on other platforms/compilers.
+ </p></td></tr>
+</table></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
Please send any questions, comments and bug reports to boost <at>
lists <dot> boost <dot> org.
</p></td></tr>
@@ -634,7 +702,8 @@
or <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">assign_to</span><span class="special">.</span><span class="identifier">hpp</span></code> and just use the boost conversion
function.
</p>
-<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting">
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="comment">// ...
</span>
@@ -651,7 +720,8 @@
When you need to make a specific conversion you will need to include the
specific conversion file. E.g.
</p>
-<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">std</span><span class="special">/</span><span class="identifier">pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting">
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">std</span><span class="special">/</span><span class="identifier">pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">pint</span><span class="special">(</span><span class="number">0</span><span class="special">,</span><span class="number">1</span><span class="special">);</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">pdouble</span><span class="special">=</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">double</span><span class="special">></span> <span class="special">>(</span><span class="identifier">pint</span><span class="special">);</span>
@@ -682,7 +752,8 @@
if you want to add an explicit conversion from a type <code class="computeroutput"><span class="identifier">A</span></code>
to a type <code class="computeroutput"><span class="identifier">B</span></code> do the following:
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">my_own_namespace</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">my_own_namespace</span> <span class="special">{</span>
<span class="identifier">B</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">B</span><span class="special">></span> <span class="keyword">const</span><span class="special">&);</span>
<span class="special">}</span>
</pre>
@@ -698,7 +769,8 @@
types, as we can not add new functions on the standad std namespace. For
these types we need to specialize the boost::conversion::convert_to function.
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">></span>
<span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&</span> <span class="identifier">val</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">Target</span><span class="special">></span> <span class="keyword">const</span><span class="special">&)</span>
</pre>
<p>
@@ -707,7 +779,8 @@
allows partial specialization of classes we can define <code class="computeroutput"><span class="identifier">convert_to</span></code>
by as relying to a specific function of a class, as follows:
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">convert_to</span> <span class="special">{</span>
@@ -725,7 +798,8 @@
So now we can specialize <code class="computeroutput"><span class="identifier">partial_specialization_workaround</span><span class="special">::</span><span class="identifier">convert_to</span></code>
for pairs as follows:
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Target1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Target2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source2</span><span class="special">)</span>
<span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special"><</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">>,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">></span> <span class="special">></span> <span class="special">{</span>
<span class="keyword">inline</span> <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">></span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
@@ -740,7 +814,8 @@
The same applies to the generic <code class="computeroutput"><span class="identifier">assign_to</span></code>
function.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">assign_to</span> <span class="special">{</span>
<span class="keyword">inline</span> <span class="keyword">static</span> <span class="identifier">To</span><span class="special">&</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">Target</span><span class="special">&</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&</span> <span class="identifier">from</span><span class="special">)</span>
@@ -784,38 +859,38 @@
<dl>
<dt><span class="term">Boost.Convert</span></dt>
<dd><p>
- Vladimir Batov. Not yet scheduled
- </p></dd>
+ Vladimir Batov. Not yet scheduled
+ </p></dd>
<dt><span class="term">Boost.Conversion.LexicalCast</span></dt>
<dd><p>
- general literal text conversions, such as an int represented as a string,
- or vice-versa from Kevlin Henney
- </p></dd>
+ general literal text conversions, such as an int represented as a string,
+ or vice-versa from Kevlin Henney
+ </p></dd>
<dt><span class="term">Boost.NumericConversion</span></dt>
<dd><p>
- Optimized Policy-based Numeric Conversions from Fernando Cacciola.
- </p></dd>
+ Optimized Policy-based Numeric Conversions from Fernando Cacciola.
+ </p></dd>
<dt><span class="term"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2380.pdf" target="_top"><span class="bold"><strong>N2380 - Explicit Conversion Operator Draft Working Paper (revision
- 2)</strong></span></a></span></dt>
+ 2)</strong></span></a></span></dt>
<dd><p>
- Lois Goldthwaite, Michael Wong, Jens Mauer, Alisdair Meredith.
- </p></dd>
+ Lois Goldthwaite, Michael Wong, Jens Mauer, Alisdair Meredith.
+ </p></dd>
<dt><span class="term">N2200 - Operator Overloading</span></dt>
<dd><p>
- Gary Powell, Doug Gregor, Jaakko Jarvi.
- </p></dd>
+ Gary Powell, Doug Gregor, Jaakko Jarvi.
+ </p></dd>
<dt><span class="term">N1671 - Overloading operator.() & operator.*()</span></dt>
<dd><p>
- Gary Powell, Doug Gregor, Jaakko Jarvi.
- </p></dd>
+ Gary Powell, Doug Gregor, Jaakko Jarvi.
+ </p></dd>
<dt><span class="term">N1676 - Non-member overloaded copy assignment operator</span></dt>
<dd><p>
- Bronek Kozicki.
- </p></dd>
+ Bronek Kozicki.
+ </p></dd>
<dt><span class="term">N1694 - A Proposal to Extend the Function Call Operator</span></dt>
<dd><p>
- Bronek Kozicki.
- </p></dd>
+ Bronek Kozicki.
+ </p></dd>
</dl>
</div>
</div>
@@ -825,9 +900,12 @@
<a name="boost.conversion.reference"></a>Reference
</h2></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"> Header <boost/conversion.hpp>
</span></dt>
<dt><span class="section">Core</span></dt>
<dd><dl>
+<dt><span class="section"><a href="index.html#boost.conversion.reference.core.conversion_hpp"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="index.html#boost.conversion.reference.core.conversion_include_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">include</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
<dt><span class="section"><a href="index.html#boost.conversion.reference.core.convert_to_hpp"> Header
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
<dt><span class="section"><a href="index.html#boost.conversion.reference.core.assign_to_hpp"> Header
@@ -870,25 +948,13 @@
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="boost.conversion.reference.conversion_hpp"></a> Header <boost/conversion.hpp>
-</h3></div></div></div>
-<p>
- Include all the core conversion public header files. Note that you will need
- to include explicitly the C++ standard or Boost specific files when using
- specific classes.
- </p>
-<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">assign_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to_via</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">ca_wrapper</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">pack</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
-</pre>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h3 class="title">
<a name="boost.conversion.reference.core"></a>Core
</h3></div></div></div>
<div class="toc"><dl>
+<dt><span class="section"><a href="index.html#boost.conversion.reference.core.conversion_hpp"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="index.html#boost.conversion.reference.core.conversion_include_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">include</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
<dt><span class="section"><a href="index.html#boost.conversion.reference.core.convert_to_hpp"> Header
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
<dd><dl><dt><span class="section"><a href="index.html#boost.conversion.reference.core.convert_to_hpp.function__convert_to___">Function
@@ -912,13 +978,48 @@
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
+<a name="boost.conversion.reference.core.conversion_hpp"></a><a href="index.html#boost.conversion.reference.core.conversion_hpp" title=" Header
+ <boost/conversion.hpp>"> Header
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<p>
+ Include all the core conversion public header files. Note that you will
+ need to include explicitly the C++ standard or Boost specific files when
+ using specific classes.
+ </p>
+<pre class="programlisting">
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">include</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost.conversion.reference.core.conversion_include_hpp"></a><a href="index.html#boost.conversion.reference.core.conversion_include_hpp" title="
+ Header <boost/conversion/include.hpp>">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">include</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<p>
+ Include all the core conversion public header files. Note that you will
+ need to include explicitly the C++ standard or Boost specific files when
+ using specific classes.
+ </p>
+<pre class="programlisting">
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">assign_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to_via</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">ca_wrapper</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">pack</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
<a name="boost.conversion.reference.core.convert_to_hpp"></a><a href="index.html#boost.conversion.reference.core.convert_to_hpp" title=" Header
<boost/conversion/convert_to.hpp>"> Header
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
</h4></div></div></div>
<div class="toc"><dl><dt><span class="section"><a href="index.html#boost.conversion.reference.core.convert_to_hpp.function__convert_to___">Function
<code class="computeroutput"><span class="identifier">convert_to</span><span class="special">()</span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">dummy</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">base_tag</span> <span class="special">{};</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">type_tag</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">base_tag</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">{};</span>
@@ -973,7 +1074,8 @@
convert_to()">Function
<code class="computeroutput"><span class="identifier">convert_to</span><span class="special">()</span></code></a>
</h5></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">></span>
<span class="identifier">To</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">To</span><span class="special">></span> <span class="keyword">const</span><span class="special">&);</span>
</pre>
<div class="variablelist">
@@ -981,16 +1083,16 @@
<dl>
<dt><span class="term">Effects:</span></dt>
<dd><p>
- Converts the from parameter to an instance of the To type, using
- by default the conversion operator or copy constructor.
- </p></dd>
+ Converts the from parameter to an instance of the To type, using
+ by default the conversion operator or copy constructor.
+ </p></dd>
<dt><span class="term">Throws:</span></dt>
<dd><p>
- Whatever the underlying conversion <code class="computeroutput"><span class="identifier">To</span></code>
- operator of the <code class="computeroutput"><span class="identifier">From</span></code>
- class or the copy constructor of the <code class="computeroutput"><span class="identifier">To</span></code>
- class throws.
- </p></dd>
+ Whatever the underlying conversion <code class="computeroutput"><span class="identifier">To</span></code>
+ operator of the <code class="computeroutput"><span class="identifier">From</span></code>
+ class or the copy constructor of the <code class="computeroutput"><span class="identifier">To</span></code>
+ class throws.
+ </p></dd>
</dl>
</div>
</div>
@@ -1003,7 +1105,8 @@
</h4></div></div></div>
<div class="toc"><dl><dt><span class="section"><a href="index.html#boost.conversion.reference.core.assign_to_hpp.function__assign_to___">Function
<code class="computeroutput"><span class="identifier">assign_to</span><span class="special">()</span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">></span>
@@ -1057,7 +1160,8 @@
assign_to()">Function
<code class="computeroutput"><span class="identifier">assign_to</span><span class="special">()</span></code></a>
</h5></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">></span>
<span class="keyword">void</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">To</span><span class="special">&</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">From</span><span class="special">&</span> <span class="identifier">from</span><span class="special">);</span>
</pre>
<div class="variablelist">
@@ -1065,14 +1169,14 @@
<dl>
<dt><span class="term">Effects:</span></dt>
<dd><p>
- Assigns the <code class="computeroutput"><span class="identifier">from</span></code>
- parameter to the <code class="computeroutput"><span class="identifier">to</span></code>
- parameter, using by default the assignment operator of the <code class="computeroutput"><span class="identifier">To</span></code> class.
- </p></dd>
+ Assigns the <code class="computeroutput"><span class="identifier">from</span></code>
+ parameter to the <code class="computeroutput"><span class="identifier">to</span></code>
+ parameter, using by default the assignment operator of the <code class="computeroutput"><span class="identifier">To</span></code> class.
+ </p></dd>
<dt><span class="term">Throws:</span></dt>
<dd><p>
- Whatever the underlying the assignment operator of the <code class="computeroutput"><span class="identifier">To</span></code> class throws.
- </p></dd>
+ Whatever the underlying the assignment operator of the <code class="computeroutput"><span class="identifier">To</span></code> class throws.
+ </p></dd>
</dl>
</div>
</div>
@@ -1085,7 +1189,8 @@
</h4></div></div></div>
<div class="toc"><dl><dt><span class="section"><a href="index.html#boost.conversion.reference.core.convert_to_via_hpp.function__convert_to_via_____">Function
<code class="computeroutput"><span class="identifier">convert_to_via</span><span class="special"><>()</span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Via</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">></span>
<span class="identifier">To</span> <span class="identifier">convert_to_via</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&</span> <span class="identifier">val</span><span class="special">)</span> <span class="special">{</span>
@@ -1104,13 +1209,13 @@
<dl>
<dt><span class="term">Effects:</span></dt>
<dd><p>
- Converts the from parameter to an instance of the To type using
- a intermediary Via type.
- </p></dd>
+ Converts the from parameter to an instance of the To type using a
+ intermediary Via type.
+ </p></dd>
<dt><span class="term">Throws:</span></dt>
<dd><p>
- Whatever the underlying conversions functions throw.
- </p></dd>
+ Whatever the underlying conversions functions throw.
+ </p></dd>
</dl>
</div>
</div>
@@ -1123,7 +1228,8 @@
</h4></div></div></div>
<div class="toc"><dl><dt><span class="section"><a href="index.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____">Function
<code class="computeroutput"><span class="identifier">mca</span><span class="special"><>()</span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="char">'implementation_dependent<T>'</span> <span class="identifier">mca</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
<span class="special">}</span>
</pre>
@@ -1135,20 +1241,23 @@
</h5></div></div></div>
<div class="toc"><dl><dt><span class="section"><a href="index.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_">Template
Class <code class="computeroutput"><span class="identifier">implementation_dependent</span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="char">'implementation_dependent<T>'</span> <span class="identifier">mca</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="char">'implementation_dependent<T>'</span> <span class="identifier">mca</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
</pre>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">Effects:</span></dt>
<dd><p>
- Returns a implementation dependent class able to transform conversion
- by convert_to call and assignments by assign_to calls.
- </p></dd>
+ Returns a implementation dependent class able to transform conversion
+ by <code class="computeroutput"><span class="identifier">convert_to</span></code> calls
+ and assignments by <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ calls.
+ </p></dd>
<dt><span class="term">Throws:</span></dt>
<dd><p>
- Nothing.
- </p></dd>
+ Nothing.
+ </p></dd>
</dl>
</div>
<div class="section" lang="en">
@@ -1164,7 +1273,8 @@
<dt><span class="section"><a href="index.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_.assignment_operator">Assignment
operator</a></span></dt>
</dl></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
<span class="keyword">class</span> <span class="identifier">implementation_dependent</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="identifier">implementation_dependent</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
@@ -1176,19 +1286,20 @@
<div class="titlepage"><div><div><h6 class="title">
<a name="boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_.constructor"></a>Constructor
</h6></div></div></div>
-<pre class="programlisting"><span class="identifier">implementation_dependent</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
+<pre class="programlisting">
+<span class="identifier">implementation_dependent</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
</pre>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">Effects:</span></dt>
<dd><p>
- Stores the reference to type.
- </p></dd>
+ Stores the reference to type.
+ </p></dd>
<dt><span class="term">Throws:</span></dt>
<dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
</dl>
</div>
</div>
@@ -1198,20 +1309,21 @@
operator">Conversion
operator</a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span> <span class="keyword">operator</span> <span class="identifier">U</span><span class="special">();</span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span> <span class="keyword">operator</span> <span class="identifier">U</span><span class="special">();</span>
</pre>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">Effects:</span></dt>
<dd><p>
- Call to the <code class="computeroutput"><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span></code> on the stored reference.
- </p></dd>
+ Call to the <code class="computeroutput"><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span></code> on the stored reference.
+ </p></dd>
<dt><span class="term">Throws:</span></dt>
<dd><p>
- Whatever <code class="computeroutput"><span class="identifier">convert_to</span></code>
- throws.
- </p></dd>
+ Whatever <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ throws.
+ </p></dd>
</dl>
</div>
</div>
@@ -1221,21 +1333,22 @@
operator">Assignment
operator</a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span> <span class="identifier">T</span><span class="special">&</span> <span class="keyword">operator</span> <span class="special">=(</span><span class="identifier">U</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">u</span><span class="special">);</span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span> <span class="identifier">T</span><span class="special">&</span> <span class="keyword">operator</span> <span class="special">=(</span><span class="identifier">U</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">u</span><span class="special">);</span>
</pre>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">Effects:</span></dt>
<dd><p>
- Call to the <code class="computeroutput"><span class="identifier">assign_to</span><span class="special"><</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">U</span><span class="special">></span></code> with the stored reference
- and the passed parameter <code class="computeroutput"><span class="identifier">u</span></code>.
- </p></dd>
+ Call to the <code class="computeroutput"><span class="identifier">assign_to</span><span class="special"><</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">U</span><span class="special">></span></code> with the stored reference
+ and the passed parameter <code class="computeroutput"><span class="identifier">u</span></code>.
+ </p></dd>
<dt><span class="term">Throws:</span></dt>
<dd><p>
- Whatever <code class="computeroutput"><span class="identifier">assign_to</span></code>
- throws.
- </p></dd>
+ Whatever <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ throws.
+ </p></dd>
</dl>
</div>
</div>
@@ -1255,7 +1368,8 @@
function is equivalent to a fusion sequence containing reference_warpper's
instead of C++ reference (&) as this are not allowed.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">result_of</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...></span>
<span class="keyword">struct</span> <span class="identifier">pack</span> <span class="special">{</span>
@@ -1281,7 +1395,8 @@
pack<>()">Function
<code class="computeroutput"><span class="identifier">pack</span><span class="special"><>()</span></code></a>
</h5></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span>
<span class="keyword">typename</span> <span class="identifier">result_of_pack</span><span class="special"><</span><span class="identifier">T1</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">T2</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">pack</span><span class="special">(</span>
<span class="identifier">T1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">T2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">t2</span><span class="special">);</span>
@@ -1294,12 +1409,12 @@
<dl>
<dt><span class="term">Effects:</span></dt>
<dd><p>
- Returns a packed type from the template parameters.
- </p></dd>
+ Returns a packed type from the template parameters.
+ </p></dd>
<dt><span class="term">Throws:</span></dt>
<dd><p>
- Nothing.
- </p></dd>
+ Nothing.
+ </p></dd>
</dl>
</div>
</div>
@@ -1331,7 +1446,8 @@
Include this file when using conversions between complex of convertible
types.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">></span>
@@ -1356,7 +1472,8 @@
<p>
Include this file when using conversions between pairs of convertible types.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U2</span><span class="special">></span>
@@ -1381,7 +1498,8 @@
Include this file when using conversions between std::vector of convertible
types.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A2</span><span class="special">></span>
@@ -1415,7 +1533,8 @@
<p>
Include this file when using conversions to std::string.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Alloc</span><span class="special">></span>
@@ -1471,7 +1590,8 @@
Include this file when using conversions between rational of convertible
types.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">></span>
<span class="identifier">rational</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">rational</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">from</span>
<span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">rational</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&);</span>
@@ -1492,7 +1612,8 @@
Include this file when using conversions between chrono and posix_time
time and duration types.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
<span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">from</span>
@@ -1500,7 +1621,7 @@
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
<span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">&</span> <span class="identifier">from</span>
- <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&);;</span>
+ <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&);</span>
<span class="special">}</span>
<span class="keyword">namespace</span> <span class="identifier">posix_time</span> <span class="special">{</span>
@@ -1545,7 +1666,8 @@
Include this file when using conversions between intervals of convertible
types.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">PT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">PU</span><span class="special">></span>
<span class="identifier">interval</span><span class="special"><</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">PT</span><span class="special">></span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">interval</span><span class="special"><</span><span class="identifier">U</span><span class="special">,</span><span class="identifier">PU</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">from</span>
@@ -1568,7 +1690,8 @@
Include this file when using conversions between optional of convertible
types.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Source</span><span class="special">></span>
<span class="identifier">optional</span><span class="special"><</span><span class="identifier">Target</span><span class="special">></span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">optional</span><span class="special"><</span><span class="identifier">Source</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">from</span>
<span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">optional</span><span class="special"><</span><span class="identifier">Target</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&);</span>
@@ -1589,10 +1712,11 @@
Include this file when using conversions between arrays of convertible
types.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">></span>
<span class="identifier">array</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">N</span><span class="special">></span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">array</span><span class="special"><</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">N</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">from</span>
- <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">array</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">N</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&);;</span>
+ <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">array</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">N</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&);</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">></span>
<span class="identifier">array</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">N</span><span class="special">>&</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">array</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">N</span><span class="special">>&</span> <span class="identifier">to</span><span class="special">,</span> <span class="identifier">array</span><span class="special"><</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">N</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">from</span>
@@ -1610,7 +1734,8 @@
Include this file when using conversions between fusion::tuple of convertible
types.
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">namespace</span> <span class="identifier">fusion</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U2</span><span class="special">></span>
<span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">></span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">U1</span><span class="special">,</span><span class="identifier">U2</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">from</span>
@@ -1622,11 +1747,11 @@
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U3</span><span class="special">></span>
<span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">T3</span><span class="special">></span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">U1</span><span class="special">,</span><span class="identifier">U2</span><span class="special">,</span><span class="identifier">U3</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">from</span>
- <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">T3</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&);;</span>
+ <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">T3</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&);</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U3</span><span class="special">></span>
<span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">T3</span><span class="special">></span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">T3</span><span class="special">>&</span> <span class="identifier">to</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">U1</span><span class="special">,</span><span class="identifier">U2</span><span class="special">,</span><span clas
s="identifier">U3</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">from</span>
- <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">T3</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&);;</span>
+ <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">T3</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&);</span>
<span class="special">}</span>
<span class="special">}</span>
</pre>
@@ -1650,10 +1775,13 @@
and posix_time::ptime</a>
</h3></div></div></div>
<p>
-
+ </p>
+<p>
+
</p>
-<pre class="programlisting"><span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_CONVERT_TO_CHRONO_TIME_POINT_TO_POSIX_TIME_PTIME__HPP</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_CONVERT_TO_CHRONO_TIME_POINT_TO_POSIX_TIME_PTIME__HPP</span>
+<pre class="programlisting">
+<span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_CONVERT_TO_CHRONO_TIME_POINT_TO_POSIX_TIME_PTIME_HPP</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_CONVERT_TO_CHRONO_TIME_POINT_TO_POSIX_TIME_PTIME_HPP</span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">date_time</span><span class="special">/</span><span class="identifier">posix_time</span><span class="special">/</span><span class="identifier">posix_time_types</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
@@ -1699,9 +1827,8 @@
<span class="special">{</span>
<span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span> <span class="keyword">const</span> <span class="identifier">time_since_epoch</span><span class="special">=</span><span class="identifier">from</span><span class="special">-</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="number">0</span><span class="special">);</span>
<span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">></span> <span class="identifier">t</span><span class="special">=</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">total_seconds</span><span class="special">());</span>
- <span class="keyword">long</span> <span class="identifier">nsec</span><span class="special">=</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">fractional_seconds</span><span class="special">()*(</span><span class="number">1000000000</span><span class="special">/</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">ticks_per_second</span><span class="special">());</span>
- <span class="keyword">return</span> <span class="identifier">t</span><span class="special">+</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">nanoseconds</span><span class="special">(</span><span class="identifier">nsec</span><span class="special">);</span>
-
+ <span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">nsec</span><span class="special">=</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">fractional_seconds</span><span class="special">()*(</span><span class="number">1000000000</span><span class="special">/</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">ticks_per_second</span><span class="special">());</span>
+ <span class="keyword">return</span> <span class="identifier">t</span><span class="special">+</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration_cast</span><span class="special"><</span><span class="identifier">Duration</span><span class="special">>(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">nanoseconds</span><span class="special">(</span><span class="identifier">nsec</span><span class="special">));</span>
<span class="special">}</span>
<span class="special">};</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
@@ -1734,7 +1861,6 @@
<span class="preprocessor">#endif</span>
<span class="special">}</span>
-
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
<span class="keyword">inline</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">&</span> <span class="identifier">from</span>
<span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&</span>
@@ -1745,15 +1871,16 @@
<span class="special">}</span>
<span class="special">}</span>
+
<span class="keyword">namespace</span> <span class="identifier">posix_time</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
- <span class="keyword">inline</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">></span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ptime</span><span class="special">&</span> <span class="identifier">from</span>
- <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span><span class="special">&)</span>
+ <span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">TP</span><span class="special">></span>
+ <span class="keyword">inline</span> <span class="identifier">TP</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ptime</span><span class="special">&</span> <span class="identifier">from</span>
+ <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">TP</span> <span class="special">></span> <span class="keyword">const</span><span class="special">&)</span>
<span class="special">{</span>
<span class="identifier">time_duration</span> <span class="keyword">const</span> <span class="identifier">time_since_epoch</span><span class="special">=</span><span class="identifier">from</span><span class="special">-</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="number">0</span><span class="special">);</span>
- <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">></span> <span class="identifier">t</span><span class="special">=</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">total_seconds</span><span class="special">());</span>
- <span class="keyword">long</span> <span class="identifier">nsec</span><span class="special">=</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">fractional_seconds</span><span class="special">()*(</span><span class="number">1000000000</span><span class="special">/</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">ticks_per_second</span><span class="special">());</span>
- <span class="keyword">return</span> <span class="identifier">t</span><span class="special">+</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">nanoseconds</span><span class="special">(</span><span class="identifier">nsec</span><span class="special">);</span>
+ <span class="identifier">TP</span> <span class="identifier">t</span><span class="special">=</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">total_seconds</span><span class="special">());</span>
+ <span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">nsec</span><span class="special">=</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">fractional_seconds</span><span class="special">()*(</span><span class="number">1000000000</span><span class="special">/</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">ticks_per_second</span><span class="special">());</span>
+ <span class="keyword">return</span> <span class="identifier">t</span><span class="special">+</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration_cast</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">TP</span><span class="special">::</span><span class="identifier">duration</span><span class="special">>(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">nanoseconds</span><span class="special">(</span><span class="identifier">nsec</span><span class="special">));</span>
<span class="special">}</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
@@ -1772,6 +1899,8 @@
<span class="preprocessor">#endif</span>
</pre>
<p>
+ </p>
+<p>
</p>
</div>
<div class="section" lang="en">
@@ -1779,10 +1908,13 @@
<a name="boost.conversion.examples.boost__optional"></a>boost::optional
</h3></div></div></div>
<p>
-
+ </p>
+<p>
+
</p>
-<pre class="programlisting"><span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_CONVERT_TO_OPTIONAL__HPP</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_CONVERT_TO_OPTIONAL__HPP</span>
+<pre class="programlisting">
+<span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_CONVERT_TO_OPTIONAL_HPP</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_CONVERT_TO_OPTIONAL_HPP</span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">optional</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">none</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
@@ -1834,6 +1966,8 @@
</pre>
<p>
+ </p>
+<p>
</p>
</div>
<div class="section" lang="en">
@@ -1841,10 +1975,13 @@
<a name="boost.conversion.examples.std__pair"></a>std::pair
</h3></div></div></div>
<p>
-
+ </p>
+<p>
+
</p>
-<pre class="programlisting"><span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_CONVERT_TO_PAIR__HPP</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_CONVERT_TO_PAIR__HPP</span>
+<pre class="programlisting">
+<span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_CONVERT_TO_PAIR_HPP</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_CONVERT_TO_PAIR_HPP</span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">utility</span><span class="special">></span>
<span class="comment">//#include <boost/conversion/convert_to.hpp>
@@ -1877,6 +2014,8 @@
</pre>
<p>
+ </p>
+<p>
</p>
</div>
</div>
@@ -1938,8 +2077,8 @@
of Conversions</em></span></a></span></dt>
</dl></div>
<div class="itemizedlist"><ul type="disc"><li>
- Add conversion between std::vector of explicitly convertible types.
- </li></ul></div>
+ Add conversion between std::vector of explicitly convertible types.
+ </li></ul></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost.conversion.appendices.history.__version_0_5_0__may_30__2010____adding_pack_expression_"></a><a href="index.html#boost.conversion.appendices.history.__version_0_5_0__may_30__2010____adding_pack_expression_" title="Version 0.5.0, May 30, 2010 Adding pack
@@ -1951,24 +2090,25 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- Added a pack funcrion able to pack the Source and the Target constructor
- arguments in one parameter.
- </li>
-<li>
- Added conversion between std::vector of explicitly convertible types.
- </li>
-<li>
- Added is_convertible_to metafunction. Inherits: If an imaginary lvalue
- of type From is convertible to type To using convert_to then inherits
- from true_type, otherwise inherits from false_type.
- </li>
+ Added a pack funcrion able to pack the Source and the Target constructor
+ arguments in one parameter.
+ </li>
+<li>
+ Added conversion between std::vector of explicitly convertible types.
+ </li>
+<li>
+ Added is_convertible_to metafunction. Inherits: If an imaginary lvalue
+ of type From is convertible to type To using convert_to then inherits
+ from true_type, otherwise inherits from false_type.
+ </li>
</ul></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">From</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">To</span><span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">From</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">To</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">is_convertible</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">true_type</span><span class="special">-</span><span class="keyword">or</span><span class="special">-</span><span class="identifier">false_type</span> <span class="special">{};</span>
</pre>
<div class="itemizedlist"><ul type="disc"><li>
- Added is_asignable_to metafunction.
- </li></ul></div>
+ Added is_asignable_to metafunction.
+ </li></ul></div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
@@ -1985,21 +2125,20 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- Either: A function with the signature <code class="computeroutput"><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">Target</span><span class="special">>(</span><span class="identifier">Source</span>
- <span class="keyword">const</span><span class="special">&,</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">To</span><span class="special">></span>
- <span class="keyword">const</span><span class="special">&)</span></code>
- is available via argument dependent lookup
- </li>
-<li>
- Or: A template specialization of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">Target</span><span class="special">,</span> <span class="identifier">Source</span><span class="special">></span></code> exists for <code class="computeroutput"><span class="identifier">Target</span></code>
- and <code class="computeroutput"><span class="identifier">Source</span></code>
- </li>
-<li>
- Or: <code class="computeroutput"><span class="identifier">Target</span></code> is copy
- constructible from <code class="computeroutput"><span class="identifier">Source</span></code>
- (default implementation)
- </li>
+ Either: A function with the signature <code class="computeroutput"><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">Target</span><span class="special">>(</span><span class="identifier">Source</span>
+ <span class="keyword">const</span><span class="special">&,</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">To</span><span class="special">></span> <span class="keyword">const</span><span class="special">&)</span></code>
+ is available via argument dependent lookup
+ </li>
+<li>
+ Or: A template specialization of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">Target</span><span class="special">,</span> <span class="identifier">Source</span><span class="special">></span></code> exists for <code class="computeroutput"><span class="identifier">Target</span></code>
+ and <code class="computeroutput"><span class="identifier">Source</span></code>
+</li>
+<li>
+ Or: <code class="computeroutput"><span class="identifier">Target</span></code> is copy constructible
+ from <code class="computeroutput"><span class="identifier">Source</span></code> (default
+ implementation)
+ </li>
</ul></div>
</div>
<div class="section" lang="en">
@@ -2015,37 +2154,37 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- Changing the order of <code class="computeroutput"><span class="identifier">to</span></code>
- and <code class="computeroutput"><span class="identifier">from</span></code> parameters
- on <code class="computeroutput"><span class="identifier">assign_to</span></code>.
- </li>
-<li>
- Now <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span></code> and <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">assign_to</span><span class="special">.</span><span class="identifier">hpp</span></code>
- files are separated.
- </li>
+ Changing the order of <code class="computeroutput"><span class="identifier">to</span></code>
+ and <code class="computeroutput"><span class="identifier">from</span></code> parameters on
+ <code class="computeroutput"><span class="identifier">assign_to</span></code>.
+ </li>
+<li>
+ Now <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span></code> and <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">assign_to</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ files are separated.
+ </li>
</ul></div>
<p>
<span class="bold"><strong>New Features:</strong></span>
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- Added <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> global file.
- </li>
+ Added <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> global file.
+ </li>
+<li>
+ Added <code class="computeroutput"><span class="identifier">mca</span><span class="special">()</span></code>
+ function.
+ </li>
<li>
- Added <code class="computeroutput"><span class="identifier">mca</span><span class="special">()</span></code>
- function.
- </li>
-<li>
- Added <code class="computeroutput"><span class="identifier">convert_to_via</span></code>
- function.
- </li>
+ Added <code class="computeroutput"><span class="identifier">convert_to_via</span></code>
+ function.
+ </li>
</ul></div>
<p>
<span class="bold"><strong>Test:</strong></span>
</p>
<div class="itemizedlist"><ul type="disc"><li>
- Added test for the new features
- </li></ul></div>
+ Added test for the new features
+ </li></ul></div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
@@ -2058,13 +2197,12 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between Boost.Fusion sequences of explicitly convertible
- types.
- </li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between Boost.Fusion sequences of explicitly convertible types.
+ </li>
</ul></div>
</div>
<div class="section" lang="en">
@@ -2078,50 +2216,50 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- a generic <code class="computeroutput"><span class="identifier">convert_to</span></code>
- function which can be specialized by the user to make explicit conversion
- between unrelated types.
- </li>
-<li>
- a generic <code class="computeroutput"><span class="identifier">assign_to</span></code>
- function which can be specialized by the user to make explicit assignation
- between unrelated types.
- </li>
-<li>
- conversion between C-arrays of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>
- and Streamable types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rational</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interval</span></code>
- of explicitly convertible types.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span></code>
- and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ptime</span></code>.
- </li>
-<li>
- conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span></code>
- and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">time_duration</span></code>.
- </li>
+ a generic <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ function which can be specialized by the user to make explicit conversion
+ between unrelated types.
+ </li>
+<li>
+ a generic <code class="computeroutput"><span class="identifier">assign_to</span></code> function
+ which can be specialized by the user to make explicit assignation between
+ unrelated types.
+ </li>
+<li>
+ conversion between C-arrays of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>
+ and Streamable types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rational</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interval</span></code>
+ of explicitly convertible types.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span></code>
+ and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ptime</span></code>.
+ </li>
+<li>
+ conversion between <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span></code>
+ and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">time_duration</span></code>.
+ </li>
</ul></div>
</div>
</div>
@@ -2130,7 +2268,7 @@
<a name="boost.conversion.appendices.rationale"></a> Appendix B: Rationale
</h3></div></div></div>
<a name="boost.conversion.appendices.rationale.trick_to_avoid_recursion_on_the_convert_to_calls"></a><h4>
-<a name="id5022677"></a>
+<a name="id5022743"></a>
<a href="index.html#boost.conversion.appendices.rationale.trick_to_avoid_recursion_on_the_convert_to_calls">Trick
to avoid recursion on the convert_to calls</a>
</h4>
@@ -2139,28 +2277,33 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- <code class="computeroutput"><span class="identifier">conversion_impl</span></code> is put
- outside the boost namespace, to avoid infinite recursion (causing stack
- overflow) when converting objects of a primitive type.
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">conversion_impl</span></code> has a
- using-directive <code class="computeroutput"><span class="keyword">using</span> <span class="keyword">namespace</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">;</span></code>,
- rather than a using-declaration, because some compilers (including MSVC
- 7.1, Borland 5.9.3, and Intel 8.1) don't do argument-dependent lookup
- when it has a using-declaration instead.
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code> has an additional template
- argument, a tag, to avoid ambiguity between the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">::</span><span class="identifier">convert_to</span></code>
- and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code> and the when converting
- from objects of a Boost type that does not have its own <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code> overload. This additional
- argument is a reference to a base tag class <code class="computeroutput"><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special"><</span><span class="identifier">Target</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span></code> for the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code>
- and a reference derived tag class <code class="computeroutput"><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">To</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span></code> for all others.
- </li>
+<code class="computeroutput"><span class="identifier">conversion_impl</span></code> is put
+ outside the boost namespace, to avoid infinite recursion (causing stack
+ overflow) when converting objects of a primitive type.
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">conversion_impl</span></code> has a using-directive
+ <code class="computeroutput"><span class="keyword">using</span> <span class="keyword">namespace</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">;</span></code>,
+ rather than a using-declaration, because some compilers (including MSVC
+ 7.1, Borland 5.9.3, and Intel 8.1) don't do argument-dependent lookup when
+ it has a using-declaration instead.
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code> has an additional template
+ argument, a tag, to avoid ambiguity between the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">::</span><span class="identifier">convert_to</span></code>
+ and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code> and the when converting from
+ objects of a Boost type that does not have its own <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code>
+ overload. This additional argument is a reference to a base tag class
+ <code class="computeroutput"><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special"><</span><span class="identifier">Target</span><span class="special">></span>
+ <span class="keyword">const</span><span class="special">&</span></code>
+ for the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code> and a reference derived tag
+ class <code class="computeroutput"><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">To</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span></code>
+ for all others.
+ </li>
</ul></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">dummy</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">dummy</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">base_tag</span> <span class="special">{};</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">type_tag</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">base_tag</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">{};</span>
<span class="special">}</span>
@@ -2168,25 +2311,28 @@
<p>
In this way
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">></span>
<span class="identifier">Target</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">Source</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special"><</span><span class="identifier">Target</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">p</span><span class="special">=</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special"><</span><span class="identifier">Target</span><span class="special">>())</span> <span class="special">{</span>
</pre>
<p>
would be never chosen when called in this context
</p>
-<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">;</span>
+<pre class="programlisting">
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">;</span>
<span class="keyword">return</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">from</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">Target</span><span class="special">>());</span>
</pre>
<p>
as the library defines
</p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
+<pre class="programlisting">
+<span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">></span>
<span class="identifier">To</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&</span> <span class="identifier">val</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">To</span><span class="special">></span> <span class="keyword">const</span><span class="special">&);</span>
<span class="special">}</span>
</pre>
<a name="boost.conversion.appendices.rationale.trick_to_avoid_the_use_of_the_tag_on_the_user_side"></a><h4>
-<a name="id5023585"></a>
+<a name="id5023646"></a>
<a href="index.html#boost.conversion.appendices.rationale.trick_to_avoid_the_use_of_the_tag_on_the_user_side">Trick
to avoid the use of the tag on the user side</a>
</h4>
@@ -2194,66 +2340,73 @@
The tag type is there to avoid infinite recursion, but it is quite cumbersome
at the user side.
</p>
-<pre class="programlisting"><span class="identifier">a</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">b</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">A</span><span class="special">>());</span>
+<pre class="programlisting">
+<span class="identifier">a</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">b</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special"><</span><span class="identifier">A</span><span class="special">>());</span>
</pre>
<p>
To avoid to pass it as parameter the tag parameter has a default value boost::dummy::base_tag<Target>().
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">></span>
<span class="identifier">Target</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">Source</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special"><</span><span class="identifier">Target</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">p</span><span class="special">=</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special"><</span><span class="identifier">Target</span><span cl
ass="special">>())</span> <span class="special">{</span>
</pre>
<p>
This default value needs however to give the Target template parameter
</p>
-<pre class="programlisting"><span class="identifier">a</span><span class="special">=</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">A</span><span class="special">>(</span><span class="identifier">b</span><span class="special">);</span>
+<pre class="programlisting">
+<span class="identifier">a</span><span class="special">=</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">A</span><span class="special">>(</span><span class="identifier">b</span><span class="special">);</span>
</pre>
<a name="boost.conversion.appendices.rationale.mathematical_background"></a><h4>
-<a name="id5023933"></a>
+<a name="id5023997"></a>
<a href="index.html#boost.conversion.appendices.rationale.mathematical_background">Mathematical
background</a>
</h4>
<p>
Let be
</p>
-<pre class="programlisting"><span class="identifier">A</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">a2</span><span class="special">;</span>
+<pre class="programlisting">
+<span class="identifier">A</span> <span class="identifier">a</span><span class="special">,</span><span class="identifier">a2</span><span class="special">;</span>
<span class="identifier">B</span> <span class="identifier">b</span><span class="special">;</span>
<span class="identifier">C</span> <span class="identifier">c</span><span class="special">;</span>
</pre>
<div class="itemizedlist"><ul type="disc">
<li>
- Reflexive: A is convertible to A if it is CopyConstructible or a specialization
- of convert_to is provided.
- </li>
+ Reflexive: A is convertible to A if it is CopyConstructible or a specialization
+ of convert_to is provided.
+ </li>
<li>
- Anti-Symetric : A convertible to B don't implies B convertible to A
- </li>
+ Anti-Symetric : A convertible to B don't implies B convertible to A
+ </li>
<li>
- Loss of precision: Conversions can loss precision but not at infinitum
- </li>
+ Loss of precision: Conversions can loss precision but not at infinitum
+ </li>
</ul></div>
<p>
Two convertible types don't loss precision if
</p>
-<pre class="programlisting"><span class="identifier">b</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">B</span><span class="special">>(</span><span class="identifier">a</span><span class="special">);</span>
+<pre class="programlisting">
+<span class="identifier">b</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">B</span><span class="special">>(</span><span class="identifier">a</span><span class="special">);</span>
<span class="identifier">a2</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">A</span><span class="special">>(</span><span class="identifier">b</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">a</span><span class="special">==</span><span class="identifier">a2</span><span class="special">);</span>
</pre>
<p>
If they can loss precision they satisfy
</p>
-<pre class="programlisting"><span class="identifier">b</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">B</span><span class="special">>(</span><span class="identifier">a</span><span class="special">)</span>
+<pre class="programlisting">
+<span class="identifier">b</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">B</span><span class="special">>(</span><span class="identifier">a</span><span class="special">)</span>
<span class="identifier">a2</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">A</span><span class="special">>(</span><span class="identifier">b</span><span class="special">)</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">a</span><span class="special">==</span><span class="identifier">a2</span> <span class="special">||</span> <span class="identifier">ct</span><span class="special">(</span><span class="identifier">a2</span><span class="special">)==</span><span class="identifier">b</span>
</pre>
<div class="itemizedlist"><ul type="disc"><li>
- Transitive: A convertible to B && B convertible to C implies
- A convertible to C
- </li></ul></div>
+ Transitive: A convertible to B && B convertible to C implies A
+ convertible to C
+ </li></ul></div>
<p>
The implementation could use a intermediary B b to make the conversion or
make the conversion directly.
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><></span>
<span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">C</span><span class="special">,</span><span class="identifier">A</span><span class="special">>(</span><span class="keyword">const</span> <span class="identifier">C</span><span class="special">&</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">A</span><span class="special">>(</span><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">B</span><span class="special">>(</span><span class="identifier">c</span><span class="special">));</span>
<span class="special">}</span>
@@ -2262,7 +2415,7 @@
The library provides a convert_to_via function which helps to implement that.
</p>
<a name="boost.conversion.appendices.rationale.ambiguity_of_multiple_overloadins"></a><h4>
-<a name="id5024467"></a>
+<a name="id5024522"></a>
<a href="index.html#boost.conversion.appendices.rationale.ambiguity_of_multiple_overloadins">Ambiguity
of multiple overloadins</a>
</h4>
@@ -2283,7 +2436,7 @@
C: Implementation Notes</a>
</h3></div></div></div>
<a name="boost.conversion.appendices.implementation.why__code__phrase_role__identifier__convert_to__phrase___code__between_tuples_is_not_implemented_using__code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__fusion__phrase__phrase_role__special______phrase__phrase_role__identifier__transform__phrase___code__"></a><h4>
-<a name="id5024517"></a>
+<a name="id5024572"></a>
<a href="index.html#boost.conversion.appendices.implementation.why__code__phrase_role__identifier__convert_to__phrase___code__between_tuples_is_not_implemented_using__code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__fusion__phrase__phrase_role__special______phrase__phrase_role__identifier__transform__phrase___code__">Why
<code class="computeroutput"><span class="identifier">convert_to</span></code> between tuples
is not implemented using <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">transform</span></code>?</a>
@@ -2340,169 +2493,169 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Name
- </p>
+ <p>
+ Name
+ </p>
</th>
<th>
- <p>
- kind
- </p>
+ <p>
+ kind
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
<th>
- <p>
- Result
- </p>
+ <p>
+ Result
+ </p>
</th>
<th>
- <p>
- Ticket
- </p>
+ <p>
+ Ticket
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- convert_to_with_builtin_types
- </p>
+ <p>
+ convert_to_with_builtin_types
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- works for builting types
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ works for builting types
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- assign_to_with_builtin_types
- </p>
+ <p>
+ assign_to_with_builtin_types
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">assign_to</span></code>
- works for builtin types
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ works for builtin types
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- assign_to_transitive
- </p>
+ <p>
+ assign_to_transitive
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- Use of <code class="computeroutput"><span class="identifier">assign_to</span></code>
- transitively
- </p>
+ <p>
+ Use of <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ transitively
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- mca_assign_to_with_builtin_types
- </p>
+ <p>
+ mca_assign_to_with_builtin_types
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">mca</span></code> <code class="computeroutput"><span class="identifier">works</span></code> for builtin types
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">mca</span></code> <code class="computeroutput"><span class="identifier">works</span></code> for builtin types
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- mca_assign_to_transitive
- </p>
+ <p>
+ mca_assign_to_transitive
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- use of <code class="computeroutput"><span class="identifier">mca</span></code> to
- multiple assignments
- </p>
+ <p>
+ use of <code class="computeroutput"><span class="identifier">mca</span></code> to multiple
+ assignments
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
</tbody>
@@ -2524,282 +2677,282 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Name
- </p>
+ <p>
+ Name
+ </p>
</th>
<th>
- <p>
- kind
- </p>
+ <p>
+ kind
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
<th>
- <p>
- Result
- </p>
+ <p>
+ Result
+ </p>
</th>
<th>
- <p>
- Ticket
- </p>
+ <p>
+ Ticket
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- convert_to_with_implicit_constructor
- </p>
+ <p>
+ convert_to_with_implicit_constructor
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- works when there is an implicit constructor
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ works when there is an implicit constructor
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_with_explicit_constructor
- </p>
+ <p>
+ convert_to_with_explicit_constructor
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- works when there is an explicit constructor
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ works when there is an explicit constructor
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_with_conversion_operator
- </p>
+ <p>
+ convert_to_with_conversion_operator
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">assign_to</span></code>
- works when there is an conversion operator
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ works when there is an conversion operator
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- assign_to_with_assignment_operator
- </p>
+ <p>
+ assign_to_with_assignment_operator
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">assign_to</span></code>
- works when there is an assignment operator
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ works when there is an assignment operator
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- assign_to_with_assignment_operator_and_implicit_constructor
- </p>
+ <p>
+ assign_to_with_assignment_operator_and_implicit_constructor
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">assign_to</span></code>
- works when there is an assignment operator and implicit constructor
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ works when there is an assignment operator and implicit constructor
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- assign_to_with_assignment_operator_and_conversion_operator
- </p>
+ <p>
+ assign_to_with_assignment_operator_and_conversion_operator
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- works when there is an assignment operator and a conversion operator
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ works when there is an assignment operator and a conversion operator
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- mca_with_assignment_operator
- </p>
+ <p>
+ mca_with_assignment_operator
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">mca</span></code> works
- when there is an assignment operator
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">mca</span></code> works
+ when there is an assignment operator
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- mca_with_assignment_operator_and_implicit_constructor
- </p>
+ <p>
+ mca_with_assignment_operator_and_implicit_constructor
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">mca</span></code> works
- when there is an assignment operator and implicit constructor
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">mca</span></code> works
+ when there is an assignment operator and implicit constructor
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- mca_with_assignment_operator_and_conversion_operator
- </p>
+ <p>
+ mca_with_assignment_operator_and_conversion_operator
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">mca</span></code> works
- when there is an assignment operator and a conversion operator
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">mca</span></code> works
+ when there is an assignment operator and a conversion operator
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
</tbody>
@@ -2821,117 +2974,117 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Name
- </p>
+ <p>
+ Name
+ </p>
</th>
<th>
- <p>
- kind
- </p>
+ <p>
+ kind
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
<th>
- <p>
- Result
- </p>
+ <p>
+ Result
+ </p>
</th>
<th>
- <p>
- Ticket
- </p>
+ <p>
+ Ticket
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- explicit_convert_to
- </p>
+ <p>
+ explicit_convert_to
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- works when <code class="computeroutput"><span class="identifier">convert_to</span></code>
- is overloaded
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ works when <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ is overloaded
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- explicit_assign_to
- </p>
+ <p>
+ explicit_assign_to
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">assign_to</span></code>
- works when <code class="computeroutput"><span class="identifier">assign_to</span></code>
- is overloaded
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ works when <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ is overloaded
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- explicit_mca
- </p>
+ <p>
+ explicit_mca
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">mca</span></code> works
- when <code class="computeroutput"><span class="identifier">assign_to</span></code>
- is overloaded
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">mca</span></code> works
+ when <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ is overloaded
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
</tbody>
@@ -2951,175 +3104,175 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Name
- </p>
+ <p>
+ Name
+ </p>
</th>
<th>
- <p>
- kind
- </p>
+ <p>
+ kind
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
<th>
- <p>
- Result
- </p>
+ <p>
+ Result
+ </p>
</th>
<th>
- <p>
- Ticket
- </p>
+ <p>
+ Ticket
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- convert_to_pair
- </p>
+ <p>
+ convert_to_pair
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code> works when the parameters
- are convertible
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code> works when the parameters
+ are convertible
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_complex
- </p>
+ <p>
+ convert_to_complex
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span></code> works when the parameters
- are convertible
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span></code> works when the parameters
+ are convertible
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_vector
- </p>
+ <p>
+ convert_to_vector
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span></code> works when the parameters
- are convertible
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span></code> works when the parameters
+ are convertible
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_string
- </p>
+ <p>
+ convert_to_string
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code> works when the parameter
- defines the <code class="computeroutput"><span class="keyword">operator</span><span class="special"><<</span></code>
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code> works when the parameter
+ defines the <code class="computeroutput"><span class="keyword">operator</span><span class="special"><<</span></code>
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_from_string
- </p>
+ <p>
+ convert_from_string
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code> works when the parameter
- defines the <code class="computeroutput"><span class="keyword">operator</span><span class="special">>></span></code>
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code> works when the parameter
+ defines the <code class="computeroutput"><span class="keyword">operator</span><span class="special">>></span></code>
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
</tbody>
@@ -3139,289 +3292,290 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Name
- </p>
+ <p>
+ Name
+ </p>
</th>
<th>
- <p>
- kind
- </p>
+ <p>
+ kind
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
<th>
- <p>
- Result
- </p>
+ <p>
+ Result
+ </p>
</th>
<th>
- <p>
- Ticket
- </p>
+ <p>
+ Ticket
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- convert_to_rational
- </p>
+ <p>
+ convert_to_rational
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rational</span></code> works when the parameters
- are convertible
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rational</span></code> works when the parameters
+ are convertible
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_interval
- </p>
+ <p>
+ convert_to_interval
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interval</span></code> works when the parameters
- are convertible
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interval</span></code> works when the parameters
+ are convertible
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_optional
- </p>
+ <p>
+ convert_to_optional
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span></code> works when the parameters
- are convertible
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span></code> works when the parameters
+ are convertible
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_time_point
- </p>
+ <p>
+ convert_to_time_point
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">time_point</span></code> from boost::posix_time::ptime
- works
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">time_point</span></code> from boost::posix_time::ptime
+ works
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_ptime
- </p>
+ <p>
+ convert_to_ptime
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span></code> from boost::chrono::system_clock::time_point
- works
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span></code> from boost::chrono::system_clock::time_point
+ works
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_duration
- </p>
+ <p>
+ convert_to_duration
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span></code> from <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span></code> works
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span></code> from <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span></code>
+ works
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_time_duration
- </p>
+ <p>
+ convert_to_time_duration
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span></code> from <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span></code> works
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span></code> from <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span></code> works
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_array
- </p>
+ <p>
+ convert_to_array
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code> works when the parameters
- are convertible
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code> works when the parameters
+ are convertible
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- convert_to_tuple
- </p>
+ <p>
+ convert_to_tuple
+ </p>
</td>
<td>
- <p>
- run
- </p>
+ <p>
+ run
+ </p>
</td>
<td>
- <p>
- check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span></code> works when the parameters
- are convertible
- </p>
+ <p>
+ check <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span></code> works when the parameters
+ are convertible
+ </p>
</td>
<td>
- <p>
- Pass
- </p>
+ <p>
+ Pass
+ </p>
</td>
<td>
- <p>
- #
- </p>
+ <p>
+ #
+ </p>
</td>
</tr>
</tbody>
@@ -3440,25 +3594,25 @@
plans</a>
</h3></div></div></div>
<a name="boost.conversion.appendices.todo.tasks_to_do_before_review"></a><h4>
-<a name="id5027145"></a>
+<a name="id5027037"></a>
<a href="index.html#boost.conversion.appendices.todo.tasks_to_do_before_review">Tasks
to do before review</a>
</h4>
<a name="boost.conversion.appendices.todo.for_later_releases"></a><h4>
-<a name="id5027168"></a>
+<a name="id5027060"></a>
<a href="index.html#boost.conversion.appendices.todo.for_later_releases">For later
releases</a>
</h4>
<div class="itemizedlist"><ul type="disc">
<li>
- conversion between types for which lexical_cast works.
- </li>
+ conversion between types for which lexical_cast works.
+ </li>
<li>
- conversion between types for which numeric_cast works.
- </li>
+ conversion between types for which numeric_cast works.
+ </li>
</ul></div>
<a name="boost.conversion.appendices.todo.make_a_proposal_to_the_c___standard"></a><h4>
-<a name="id5027209"></a>
+<a name="id5027095"></a>
<a href="index.html#boost.conversion.appendices.todo.make_a_proposal_to_the_c___standard">Make
a proposal to the C++ standard</a>
</h4>
@@ -3472,7 +3626,8 @@
operators to the class std::pair, so we can say that two pairs are convertible
if the parameters are explicitly convertible using a convert_to function
</p>
-<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">U</span> <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">V</span><span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">U</span> <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">V</span><span class="special">></span>
<span class="comment">//requires HasConvertTo<T1, const U&> && HasConvertTo<T2, const V&>
</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">U</span> <span class="special">,</span> <span class="identifier">V</span><span class="special">>&</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">T1</span><span class="special">>(</span><span class="identifier">p</span><span class="special">.</span><span class="identifier">first</span><span class="special">),</span> <span class="identifier">convert_to</span><span class="special"><</span><span class="identifier">T2</span><span class="special">>(</span><span class="identifier">p</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
@@ -3487,7 +3642,8 @@
to implicitly or explicitly add extrinsic conversion operators between unrelated
types. Non-member assignment operators could also be specialized.
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">></span>
<span class="keyword">operator</span> <span class="identifier">To</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&</span> <span class="identifier">val</span><span class="special">);</span>
<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">></span>
@@ -3497,7 +3653,8 @@
For example we could define the explicit conversion from as chrono::time_point<Clock,
Duration> to posix_time::ptime follows
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
+<pre class="programlisting">
+<span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">></span>
<span class="keyword">explicit</span> <span class="keyword">operator</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>&</span> <span class="identifier">from</span><span class="special">)</span> <span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">></span> <span class="identifier">time_point_t</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">nanoseconds</span> <span class="identifier">duration_t</span><span class="special">;</span>
@@ -3514,7 +3671,8 @@
With this explicit conversion and the equivalen for duration, the actual
definition of std::pair will allows to
</p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span> <span class="special">></span> <span class="identifier">tp_dur_pair</span><span class="special">;</span>
+<pre class="programlisting">
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">></span> <span class="special">></span> <span class="identifier">tp_dur_pair</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span><span class="special">></span> <span class="identifier">ppt</span><span class="special">;</span>
<span class="identifier">ppt</span> <span class="special">=</span> <span class="identifier">tp_dur_pair</span><span class="special">;</span>
</pre>
@@ -3522,7 +3680,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: September 23, 2010 at 19:30:01 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 23, 2011 at 22:54:20 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/conversion/libs/conversion_ext/test/helper.hpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/helper.hpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/helper.hpp 2011-01-24 07:14:12 EST (Mon, 24 Jan 2011)
@@ -8,8 +8,8 @@
//
//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONVERSION_TEST_HELPER__HPP
-#define BOOST_CONVERSION_TEST_HELPER__HPP
+#ifndef BOOST_CONVERSION_TEST_HELPER_HPP
+#define BOOST_CONVERSION_TEST_HELPER_HPP
#include <boost/conversion/convert_to.hpp>
#include <boost/conversion/assign_to.hpp>
Modified: sandbox/conversion/libs/conversion_ext/test/vector.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/vector.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/vector.cpp 2011-01-24 07:14:12 EST (Mon, 24 Jan 2011)
@@ -34,14 +34,24 @@
void explicit_convert_to() {
std::vector<B1> vb1;
std::vector<A1> va1(boost::convert_to<std::vector<A1> >(vb1));
-
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
B1 b10, b11, b12, b13;
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
std::vector<B1> vb2;
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
+ vb2.reserve(5);
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
vb2[0]=b10;
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
vb2[1]=b11;
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
vb2[2]=b12;
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
vb2[3]=b13;
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
std::vector<A1> va2(boost::convert_to<std::vector<A1> >(vb2));
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
std::allocator<A1> all;
std::vector<A1,std::allocator<A1> > va3(
@@ -50,13 +60,16 @@
boost::reference_wrapper<std::vector<B1> const>,
boost::reference_wrapper<std::allocator<A1> const>
>(boost::cref(vb2), boost::cref(all))));
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
std::vector<A1,std::allocator<A1> > va32(
boost::convert_to<std::vector<A1,std::allocator<A1> > >(
std::make_pair(boost::cref(vb2), boost::cref(all))));
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
boost::conversion::result_of::pack2<std::vector<B1> const, std::allocator<A1> const>::type v =
boost::conversion::pack(vb2, all);
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
//~ std::vector<A1,std::allocator<A1> > va4(
//~ boost::convert_to<std::vector<A1,std::allocator<A1> > >(v));
@@ -68,6 +81,7 @@
std::vector<A1,std::allocator<A1> > va6(
boost::convert_to<std::vector<A1,std::allocator<A1> > >(
boost::conversion::pack(vb2, std::allocator<A1>())));
+ std::cout << __FILE__ << '['<<__LINE__<<"]" << std::endl;
}
@@ -78,6 +92,7 @@
B1 b10, b11, b12, b13;
std::vector<B1> vb2;
+ vb2.reserve(5);
vb2[0]=b10;
vb2[1]=b11;
vb2[2]=b12;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk