mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Some additional functions added to optional (being new there won't be regressions)
[SVN r34411]
This commit is contained in:
parent
bf968794c9
commit
e55610a0d0
@ -3,9 +3,8 @@
|
|||||||
<HTML>
|
<HTML>
|
||||||
|
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
|
||||||
<LINK REL="stylesheet" TYPE="text/css" HREF="../../boost.css">
|
<TITLE>In_place_factory Documentation</TITLE>
|
||||||
<TITLE>Header </TITLE>
|
|
||||||
</HEAD>
|
</HEAD>
|
||||||
|
|
||||||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
|
||||||
@ -77,7 +76,7 @@ object is likely to be temporary and serve no purpose besides being the source</
|
|||||||
</pre>
|
</pre>
|
||||||
<p>A solution to this problem is to support direct construction of the contained
|
<p>A solution to this problem is to support direct construction of the contained
|
||||||
object right in the container's storage.<br>
|
object right in the container's storage.<br>
|
||||||
In this shceme, the user supplies the arguments for the X constructor
|
In this scheme, the user supplies the arguments for the X constructor
|
||||||
directly to the container:</p>
|
directly to the container:</p>
|
||||||
<pre>struct C
|
<pre>struct C
|
||||||
{
|
{
|
||||||
@ -138,7 +137,7 @@ The following simplified example shows the basic idea. A complete example follow
|
|||||||
|
|
||||||
void foo()
|
void foo()
|
||||||
{
|
{
|
||||||
C c( in_place(123,"hello" ) ;
|
C c( in_place(123,"hello") ) ;
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user