Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51294 - in sandbox/libs/move_semantics: . doc doc/html doc/html/images example proj proj/vc7ide test
From: igaztanaga_at_[hidden]
Date: 2009-02-17 13:09:53


Author: igaztanaga
Date: 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
New Revision: 51294
URL: http://svn.boost.org/trac/boost/changeset/51294

Log:
Added move_semantics library
Added:
   sandbox/libs/move_semantics/
   sandbox/libs/move_semantics/doc/
   sandbox/libs/move_semantics/doc/Jamfile.v2 (contents, props changed)
   sandbox/libs/move_semantics/doc/html/
   sandbox/libs/move_semantics/doc/html/boostbook.css (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/
   sandbox/libs/move_semantics/doc/html/images/blank.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/caution.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/draft.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/home.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/important.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/next.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/note.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/prev.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/tip.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/toc-blank.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/toc-minus.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/toc-plus.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/up.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/images/warning.png (contents, props changed)
   sandbox/libs/move_semantics/doc/html/reference.css (contents, props changed)
   sandbox/libs/move_semantics/doc/move.qbk (contents, props changed)
   sandbox/libs/move_semantics/example/
   sandbox/libs/move_semantics/example/Jamfile.v2 (contents, props changed)
   sandbox/libs/move_semantics/example/doc_clone_ptr.cpp (contents, props changed)
   sandbox/libs/move_semantics/example/doc_construct_forward.cpp (contents, props changed)
   sandbox/libs/move_semantics/example/doc_file_descriptor.cpp (contents, props changed)
   sandbox/libs/move_semantics/example/doc_move_algorithms.cpp (contents, props changed)
   sandbox/libs/move_semantics/example/doc_move_inserter.cpp (contents, props changed)
   sandbox/libs/move_semantics/example/doc_move_iterator.cpp (contents, props changed)
   sandbox/libs/move_semantics/example/movable.hpp (contents, props changed)
   sandbox/libs/move_semantics/proj/
   sandbox/libs/move_semantics/proj/vc7ide/
   sandbox/libs/move_semantics/proj/vc7ide/Move.sln (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/back_move_inserter_test.vcproj (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/construct_forward_test.vcproj (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/doc_clone_ptr.vcproj (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/doc_construct_forward.vcproj (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/doc_file_descriptor.vcproj (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/doc_move_algorithms.vcproj (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/doc_move_inserter.vcproj (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/doc_move_iterator.vcproj (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/move_algorithm.vcproj (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/move_iterator_test.vcproj (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/move_test.vcproj (contents, props changed)
   sandbox/libs/move_semantics/proj/vc7ide/todo.txt (contents, props changed)
   sandbox/libs/move_semantics/test/
   sandbox/libs/move_semantics/test/Jamfile.v2 (contents, props changed)
   sandbox/libs/move_semantics/test/back_move_inserter.cpp (contents, props changed)
   sandbox/libs/move_semantics/test/construct_forward.cpp (contents, props changed)
   sandbox/libs/move_semantics/test/move.cpp (contents, props changed)
   sandbox/libs/move_semantics/test/move_algorithm.cpp (contents, props changed)
   sandbox/libs/move_semantics/test/move_iterator.cpp (contents, props changed)

Added: sandbox/libs/move_semantics/doc/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/doc/Jamfile.v2 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,38 @@
+# Boost.Move library documentation Jamfile
+#
+# Copyright Ion Gaztanaga 2009.
+# 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)
+#
+# See http://www.boost.org/libs/move for documentation.
+
+
+import doxygen ;
+import quickbook ;
+
+doxygen autodoc
+ :
+ [ glob ../../../boost/move_semantics/*.hpp ]
+ :
+ <doxygen:param>HIDE_UNDOC_MEMBERS=YES
+ <doxygen:param>HIDE_UNDOC_MEMBERS=YES
+ <doxygen:param>HIDE_UNDOC_CLASSES=YES
+ <doxygen:param>EXTRACT_PRIVATE=NO
+ <doxygen:param>ENABLE_PREPROCESSING=YES
+ <doxygen:param>MACRO_EXPANSION=YES
+ <doxygen:param>"PREDEFINED=\"BOOST_MOVE_DOXYGEN_INVOKED\""
+ ;
+
+xml move : move.qbk ;
+
+boostbook standalone
+ :
+ move
+ :
+ <xsl:param>boost.root=../../../..
+ <xsl:param>boost.libraries=../../../../libs/libraries.htm
+ <xsl:param>generate.section.toc.level=3
+ <xsl:param>chunk.first.sections=1
+ <dependency>autodoc
+ ;

Added: sandbox/libs/move_semantics/doc/html/boostbook.css
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/doc/html/boostbook.css 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,538 @@
+/*=============================================================================
+ Copyright (c) 2004 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Use, modification and distribution is subject to 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)
+=============================================================================*/
+
+/*=============================================================================
+ Body defaults
+=============================================================================*/
+
+ body
+ {
+ margin: 1em;
+ font-family: sans-serif;
+ }
+
+/*=============================================================================
+ Paragraphs
+=============================================================================*/
+
+ p
+ {
+ text-align: left;
+ font-size: 10pt;
+ line-height: 1.15;
+ }
+
+/*=============================================================================
+ Program listings
+=============================================================================*/
+
+ /* Code on paragraphs */
+ p tt.computeroutput
+ {
+ font-size: 10pt;
+ }
+
+ pre.synopsis
+ {
+ font-size: 10pt;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ .programlisting,
+ .screen
+ {
+ font-size: 10pt;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+/*=============================================================================
+ Headings
+=============================================================================*/
+
+ h1, h2, h3, h4, h5, h6
+ {
+ text-align: left;
+ margin: 1em 0em 0.5em 0em;
+ font-weight: bold;
+ }
+
+ h1 { font: 140% }
+ h2 { font: bold 140% }
+ h3 { font: bold 130% }
+ h4 { font: bold 120% }
+ h5 { font: italic 110% }
+ h6 { font: italic 100% }
+
+ /* Top page titles */
+ title,
+ h1.title,
+ h2.title
+ h3.title,
+ h4.title,
+ h5.title,
+ h6.title,
+ .refentrytitle
+ {
+ font-weight: bold;
+ margin-bottom: 1pc;
+ }
+
+ h1.title { font-size: 140% }
+ h2.title { font-size: 140% }
+ h3.title { font-size: 130% }
+ h4.title { font-size: 120% }
+ h5.title { font-size: 110% }
+ h6.title { font-size: 100% }
+
+ .section h1
+ {
+ margin: 0em 0em 0.5em 0em;
+ font-size: 140%;
+ }
+
+ .section h2 { font-size: 140% }
+ .section h3 { font-size: 130% }
+ .section h4 { font-size: 120% }
+ .section h5 { font-size: 110% }
+ .section h6 { font-size: 100% }
+
+ /* Code on titles */
+ h1 tt.computeroutput { font-size: 140% }
+ h2 tt.computeroutput { font-size: 140% }
+ h3 tt.computeroutput { font-size: 130% }
+ h4 tt.computeroutput { font-size: 120% }
+ h5 tt.computeroutput { font-size: 110% }
+ h6 tt.computeroutput { font-size: 100% }
+
+/*=============================================================================
+ Author
+=============================================================================*/
+
+ h3.author
+ {
+ font-size: 100%
+ }
+
+/*=============================================================================
+ Lists
+=============================================================================*/
+
+ li
+ {
+ font-size: 10pt;
+ line-height: 1.3;
+ }
+
+ /* Unordered lists */
+ ul
+ {
+ text-align: left;
+ }
+
+ /* Ordered lists */
+ ol
+ {
+ text-align: left;
+ }
+
+/*=============================================================================
+ Links
+=============================================================================*/
+
+ a
+ {
+ text-decoration: none; /* no underline */
+ }
+
+ a:hover
+ {
+ text-decoration: underline;
+ }
+
+/*=============================================================================
+ Spirit style navigation
+=============================================================================*/
+
+ .spirit-nav
+ {
+ text-align: right;
+ }
+
+ .spirit-nav a
+ {
+ color: white;
+ padding-left: 0.5em;
+ }
+
+ .spirit-nav img
+ {
+ border-width: 0px;
+ }
+
+/*=============================================================================
+ Table of contents
+=============================================================================*/
+
+ .toc
+ {
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.1pc 1pc 0.1pc 1pc;
+ font-size: 10pt;
+ line-height: 1.15;
+ }
+
+ .toc-main
+ {
+ width: 600;
+ text-align: center;
+ margin: 1pc 1pc 1pc 10%;
+ padding: 2pc 1pc 3pc 1pc;
+ line-height: 0.1;
+ }
+
+ .boost-toc
+ {
+ float: right;
+ padding: 0.5pc;
+ }
+
+/*=============================================================================
+ Tables
+=============================================================================*/
+
+ .table-title,
+ div.table p.title
+ {
+ margin-left: 4%;
+ padding-right: 0.5em;
+ padding-left: 0.5em;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ width: 92%;
+ margin-left: 4%;
+ margin-right: 4%;
+ }
+
+ div.informaltable table,
+ div.table table
+ {
+ padding: 4px;
+ }
+
+ /* Table Cells */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ padding: 0.5em;
+ text-align: left;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ padding: 0.5em 0.5em 0.5em 0.5em;
+ border: 1pt solid white;
+ font-size: 120%;
+ }
+
+/*=============================================================================
+ Blurbs
+=============================================================================*/
+
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ font-size: 10pt;
+ line-height: 1.2;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ p.blurb img
+ {
+ padding: 1pt;
+ }
+
+/*=============================================================================
+ Variable Lists
+=============================================================================*/
+
+ span.term
+ {
+ font-weight: bold;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td
+ {
+ text-align: left;
+ vertical-align: top;
+ padding: 0em 2em 0em 0em;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td p
+ {
+ margin: 0em 0em 0.5em 0em;
+ }
+
+ /* Make the terms in definition lists bold */
+ div.variablelist dl dt
+ {
+ font-weight: bold;
+ font-size: 10pt;
+ }
+
+ div.variablelist dl dd
+ {
+ margin: 1em 0em 1em 2em;
+ font-size: 10pt;
+ }
+
+/*=============================================================================
+ Misc
+=============================================================================*/
+
+ /* Title of books and articles in bibliographies */
+ span.title
+ {
+ font-style: italic;
+ }
+
+ span.underline
+ {
+ text-decoration: underline;
+ }
+
+ span.strikethrough
+ {
+ text-decoration: line-through;
+ }
+
+ /* Copyright, Legal Notice */
+ div div.legalnotice p
+ {
+ font-size: 8pt;
+ text-align: left
+ }
+
+/*=============================================================================
+ Colors
+=============================================================================*/
+
+ @media screen
+ {
+ /* Links */
+ a
+ {
+ color: #0C7445;
+ }
+
+ a:visited
+ {
+ color: #663974;
+ }
+
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
+ h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
+ h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
+ {
+ text-decoration: none; /* no underline */
+ color: #000000;
+ }
+
+ /* Syntax Highlighting */
+ .keyword { color: #0000AA; }
+ .identifier { color: #000000; }
+ .special { color: #707070; }
+ .preprocessor { color: #402080; }
+ .char { color: teal; }
+ .comment { color: #800000; }
+ .string { color: teal; }
+ .number { color: teal; }
+ .white_bkd { background-color: #E8FBE9; }
+ .dk_grey_bkd { background-color: #A0DAAC; }
+
+ /* Copyright, Legal Notice */
+ .copyright
+ {
+ color: #666666;
+ font-size: small;
+ }
+
+ div div.legalnotice p
+ {
+ color: #666666;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Blurbs */
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc-main
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid #DCDCDC;
+ background-color: #FAFFFB;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ background-color: #E3F9E4;
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ color: #00A000;
+ }
+ }
+
+ @media print
+ {
+ /* Links */
+ a
+ {
+ color: black;
+ }
+
+ a:visited
+ {
+ color: black;
+ }
+
+ .spirit-nav
+ {
+ display: none;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid gray;
+ background-color: #FAFFFB;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid gray;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc-main
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ border-collapse: collapse;
+ background-color: #FAFFFB;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid #DCDCDC;
+ background-color: #FAFFFB;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ border: 1px solid #DCDCDC;
+ background-color: #FAFFFB;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ font-weight: bold;
+ }
+ }

Added: sandbox/libs/move_semantics/doc/html/images/blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/caution.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/draft.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/home.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/important.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/next.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/note.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/prev.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/tip.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/toc-blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/toc-minus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/toc-plus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/up.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/images/warning.png
==============================================================================
Binary file. No diff available.

Added: sandbox/libs/move_semantics/doc/html/reference.css
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/doc/html/reference.css 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2004 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Use, modification and distribution is subject to 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)
+=============================================================================*/
+PRE.synopsis {
+ background-color: #e0ffff;
+ border: thin solid blue;
+ padding: 1em
+}

Added: sandbox/libs/move_semantics/doc/move.qbk
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/doc/move.qbk 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,540 @@
+[/
+ / Copyright (c) 2008-2009 Ion Gaztanaga
+ /
+ / 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)
+ /]
+
+[library Boost.Move
+ [quickbook 1.3]
+ [authors [Gazta&ntilde;aga, Ion]]
+ [copyright 2008-2009 Ion Gazta&ntilde;aga]
+ [id move]
+ [dirname move_semantics]
+ [purpose Move semantics]
+ [license
+ 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])
+ ]
+]
+
+[warning This library is NOT an official Boost library]
+
+[important To be able to use containers of movable values you will need an special version
+ of [*Boost.Interprocess] bundled with this library]
+
+[section:introduction Introduction]
+
+[note
+
+ The first 3 chapters are the adapted from the article
+ [@http://www.artima.com/cppsource/rvalue.html ['A Brief Introduction to Rvalue References]]
+ by Howard E. Hinnant, Bjarne Stroustrup, and Bronek Kozicki
+
+]
+
+Copying can be expensive. For example, for vectors `v2=v1` typically involves a function call,
+a memory allocation, and a loop. This is of course acceptable where we actually need two copies of
+a vector, but in many cases, we don't: We often copy a `vector` from one place to another, just to
+proceed to overwrite the old copy. Consider:
+
+[c++]
+
+ template <class T> swap(T& a, T& b)
+ {
+ T tmp(a); // now we have two copies of a
+ a = b; // now we have two copies of b
+ b = tmp; // now we have two copies of tmp (aka a)
+ }
+
+But, we didn't want to have any copies of a or b, we just wanted to swap them. Let's try again:
+
+[c++]
+
+ template <class T> swap(T& a, T& b)
+ {
+ T tmp(boost::move(a));
+ a = boost::move(b);
+ b = boost::move(tmp);
+ }
+
+This `move()` gives its target the value of its argument, but is not obliged to preserve the value
+of its source. So, for a `vector`, `move()` could reasonably be expected to leave its argument as
+a zero-capacity vector to avoid having to copy all the elements. In other words, [*move is a potentially
+destructive copy].
+
+In this particular case, we could have optimized swap by a specialization. However, we can't
+specialize every function that copies a large object just before it deletes or overwrites it. That
+would be unmanageable.
+
+In C++0x, move semantics are implemented with the introduction of rvalue references. They allow us to
+implement `move()` without verbosity or runtime overhead. [*Boost.Move] is a library that offers tools
+to implement those move semantics not only in compilers with `rvalue references` but also in compilers
+conforming to C++03.
+
+[endsect]
+
+[section:implementing_movable_classes Implementing movable classes]
+
+[import ../example/doc_clone_ptr.cpp]
+
+Consider a simple handle class that owns a resource and also provides copy semantics
+(copy constructor and assignment). For example a `clone_ptr` might own a pointer, and call
+`clone()` on it for copying purposes:
+
+[c++]
+
+ template <class T>
+ class clone_ptr
+ {
+ private:
+ T* ptr;
+
+ public:
+ // construction
+ explicit clone_ptr(T* p = 0) : ptr(p) {}
+
+ // destruction
+ ~clone_ptr() { delete ptr; }
+
+ // copy semantics
+ clone_ptr(const clone_ptr& p)
+ : ptr(p.ptr ? p.ptr->clone() : 0) {}
+
+ clone_ptr& operator=(const clone_ptr& p)
+ {
+ if (this != &p)
+ {
+ delete ptr;
+ ptr = p.ptr ? p.ptr->clone() : 0;
+ }
+ return *this;
+ }
+
+ // move semantics
+ clone_ptr(clone_ptr&& p)
+ : ptr(p.ptr) { p.ptr = 0; }
+
+ clone_ptr& operator=(clone_ptr&& p)
+ {
+ std::swap(ptr, p.ptr);
+ delete p.ptr;
+ p.ptr = 0;
+ return *this;
+ }
+
+ // Other operations...
+ };
+
+`clone_ptr` has expected copy constructor and assignment semantics, duplicating resources when copying.
+Note that copy constructing or assigning a `clone_ptr` is a relatively expensive operation:
+
+[copy_clone_ptr]
+
+`clone_ptr` is code that you might find in today's books on C++, except for the part marked as
+`move semantics`. That part is implemented in terms of C++0x `rvalue references`. You can find
+some good introduction and tutorials on rvalue references in these papers:
+
+* [@http://www.artima.com/cppsource/rvalue.html ['A Brief Introduction to Rvalue References]]
+* [@http://blogs.msdn.com/vcblog/archive/2009/02/03/rvalue-references-c-0x-features-in-vc10-part-2.aspx ['Rvalue References: C++0x Features in VC10, Part 2]]
+
+When the source of the copy is known to be an `rvalue` (e.g.: a temporary object), one can avoid the
+potentially expensive `clone()` operation by pilfering source's pointer (no one will notice!). The move
+constructor above does exactly that, leaving the rvalue in a default constructed state. The move assignment
+operator simply does the same freeing old resources.
+
+Now when code tries to copy an rvalue `clone_ptr`, or if that code explicitly gives permission to
+consider the source of the copy an rvalue (using `boost::move`), the operation will execute much faster.
+
+[move_clone_ptr]
+
+Many aspects of move semantics can be emulated for compilers not supporting `rvalue references`
+and [*Boost.Move] offers tools for that purpose. With [*Boost.Move] we can write code that
+will work both in compilers with rvalue references and those who conform to C++03:
+
+[clone_ptr_def]
+
+For compilers with rvalue references `BOOST_ENABLE_MOVE_EMULATION(TYPE)` macro is expanded to nothing
+and `BOOST_RV_REF` to `TYPE &&` so we obtain exactly the same code we've presented in the beginning
+of this chapter.
+
+For compilers without rvalue references, `BOOST_ENABLE_MOVE_EMULATION(TYPE)` is expaded to a
+conversion operator that will allow `boost::move` to work:
+
+[c++]
+
+ operator boost::rv<TYPE>&()
+ { return static_cast<boost::rv<TYPE>& >(*this); }
+
+and `BOOST_RV_REF` is expanded to `boost::rv<TYPE> &`, a non-instantiable type derived from T, and
+thus, it's similar to a reference to that class:
+
+[c++]
+
+ template <class T>
+ class rv : public T
+ {
+ //Non-instantiable...
+ public:
+ T &get() { return *this; }
+ };
+
+For classes made up of other classes (via either containment or inheritance), the move constructor
+and move assignment can be easily coded using the `boost::move` function:
+
+[clone_ptr_base_derived]
+
+Each subobject will now be treated individually, calling move to bind to the subobject's move
+constructors and move assignment operators. `Member` has move operations coded (just like
+our earlier `clone_ptr` example) which will completely avoid the tremendously more expensive
+copy operations:
+
+[clone_ptr_move_derived]
+
+Note above that the argument x is treated as a lvalue reference. That's why it is necessary to
+say `move(x)` instead of just x when passing down to the base class. This is a key safety feature of move
+semantics designed to prevent accidently moving twice from some named variable. All moves occur
+explicitly.
+
+[*Question]: What about types that don't own resources? (E.g. `std::complex`?)
+
+No work needs to be done in that case. The copy constructor is already optimal.
+
+[endsect]
+
+[section:movable_only_classes Movable but Non-Copyable Types]
+
+Some types are not amenable to copy semantics but can still be made movable. For example:
+
+* `unique_ptr` (non-shared, non-copyable ownership)
+* A type representing a thread of execution
+* A type representing a file descriptor
+
+By making such types movable (though still non-copyable) their utility is tremendously
+increased. Movable but non-copyable types can be returned by value from factory functions:
+
+[c++]
+
+ file_descriptor create_file(/* ... */);
+ //...
+ file_descriptor data_file = create_file(/* ... */); // No copies!
+
+In the above example, the underlying file handle is passed from object to object, as long
+as the source `file_descriptor` is an rvalue. At all times, there is still only one underlying file
+handle, and only one `file_descriptor` owns it at a time. Here's the definition of `file descriptor`:
+
+[import ../example/doc_file_descriptor.cpp]
+[file_descriptor_def]
+
+Movable but non-copyable types can also safely be put into containers if those containers
+are aware of move semantics. If the container needs to "copy" an element internally
+(e.g. vector reallocation) it will move the element instead of copying it.
+[*Boost.Interprocess] containers are move-aware:
+
+[file_descriptor_example]
+
+[/
+ /Many standard algorithms benefit from moving elements of the sequence as opposed to
+ /copying them. This not only provides better performance (like the improved `swap`
+ /implementation described above), but also allows these algorithms to operate on movable
+ /but non-copyable types. For example the following code sorts a `vector<unique_ptr<T>>`
+ /based on comparing the pointed-to types:
+ /
+ /[c++]
+ /
+ / struct indirect_less
+ / {
+ / template <class T>
+ / bool operator()(const T& x, const T& y)
+ / {return *x < *y;}
+ / };
+ / ...
+ / std::vector<std::unique_ptr<A>> v;
+ / ...
+ / std::sort(v.begin(), v.end(), indirect_less());
+ /
+ /
+ /As sort moves the unique_ptr's around, it will use swap (which no longer requires Copyability)
+ /or move construction / move assignment. Thus during the entire algorithm, the invariant that
+ /each item is owned and referenced by one and only one smart pointer is maintained. If the
+ /algorithm were to attempt a copy (say by programming mistake) a compile time error would result.
+ /]
+
+[endsect]
+
+[section:construct_forwarding Constructor Forwarding]
+
+Consider writing a generic factory function that returns an object for a newly
+constructed generic type. Factory functions such as this are valuable for encapsulating
+and localizing the allocation of resources. Obviously, the factory function must accept
+exactly the same sets of arguments as the constructors of the type of objects constructed:
+
+[c++]
+
+ template<class T> T* factory_new()
+ { return new T(); }
+
+ template<class T> T* factory_new(a1)
+ { return new T(a1); }
+
+ template<class T> T* factory_new(a1, a2)
+ { return new T(a1, a2); }
+
+Unfortunately, in C++03 the much bigger issue with this approach is that the N-argument case
+would require 2^N overloads, immediately discounting this as a general solution. Fortunately,
+most constructors take arguments by value, by const-reference or by rvalue reference. If these
+limitations are accepted, the forwarding emulation of a N-argument case requires just N overloads.
+This library makes this emulation easy with the help of `BOOST_CONSTRUCT_FWD_REF` and
+`boost::forward_constructor`:
+
+[import ../example/doc_construct_forward.cpp]
+[construct_forward_example]
+
+In compilers wit rvalue references `BOOST_CONSTRUCT_FWD_REF(TYPE)` expands to `TYPE &&` and
+`boost::forward_constructor` implements perfect forwarding. Otherwise
+`BOOST_CONSTRUCT_FWD_REF(TYPE)` expands to `const TYPE &` and `boost::forward_constructor`
+behaviour depends on the argument type:
+
+* If TYPE is boost::rv<T>, then return a non-const reference `boost::rv<T> &`.
+* Otherwise, just returns the input const reference.
+
+Constructor forwarding comes handful to implement placement insertion in containers with
+just N overloads if the implementor accepts the limitations of this type of forwarding for
+C++03 compilers. In compilers with rvalue references perfect forwarding is achieved.
+
+[endsect]
+
+[/[section:perfect_forwarding Perfect Forwarding]
+ /
+ /Consider writing a generic factory function that returns a std::shared_ptr for a newly
+ /constructed generic type. Factory functions such as this are valuable for encapsulating
+ /and localizing the allocation of resources. Obviously, the factory function must accept
+ /exactly the same sets of arguments as the constructors of the type of objects constructed.
+ /Today this might be coded as:
+ /
+ /[c++]
+ /
+ / template <class T>
+ / std::shared_ptr<T>
+ / factory() // no argument version
+ / {
+ / return std::shared_ptr<T>(new T);
+ / }
+ /
+ / template <class T, class A1>
+ / std::shared_ptr<T>
+ / factory(const A1& a1) // one argument version
+ / {
+ / return std::shared_ptr<T>(new T(a1));
+ / }
+ /
+ / // all the other versions
+ /
+ /
+ /In the interest of brevity, we will focus on just the one-parameter version. For example:
+ /
+ / [c++]
+ /
+ / std::shared_ptr<A> p = factory<A>(5);
+ /
+ /
+ / [*Question]: What if T's constructor takes a parameter by non-const reference?
+ /
+ / In that case, we get a compile-time error as the const-qualifed argument of the factory
+ / function will not bind to the non-const parameter of T's constructor.
+ /
+ / To solve that problem, we could use non-const parameters in our factory functions:
+ /
+ / [c++]
+ /
+ / template <class T, class A1>
+ / std::shared_ptr<T>
+ / factory(A1& a1)
+ / {
+ / return std::shared_ptr<T>(new T(a1));
+ / }
+ /
+ /
+ / This is much better. If a const-qualified type is passed to the factory, the const will
+ / be deduced into the template parameter (A1 for example) and then properly forwarded to
+ / T's constructor. Similarly, if a non-const argument is given to factory, it will be
+ / correctly forwarded to T's constructor as a non-const. Indeed, this is precisely how
+ /forwarding applications are coded today (e.g. `std::bind`).
+ /
+ /However, consider:
+ /
+ /[c++]
+ /
+ / std::shared_ptr<A> p = factory<A>(5); // error
+ / A* q = new A(5); // ok
+ /
+ /
+ /This example worked with our first version of factory, but now it's broken: The "5"
+ /causesthe factory template argument to be deduced as int& and subsequently will not
+ /bind to the rvalue "5". Neither solution so far is right. Each breaks reasonable and
+ /common code.
+ /
+ /[*Question]: What about overloading on every combination of AI& and const AI&?
+ /
+ /This would allow use to handle all examples, but at a cost of an exponential explosion:
+ /For our two-parameter case, this would require 4 overloads. For a three-parameter factory
+ /we would need 8 additional overloads. For a four-parameter factory we would need 16, and
+ /so on. This is not a scalable solution.
+ /
+ /Rvalue references offer a simple, scalable solution to this problem:
+ /
+ /[c++]
+ /
+ / template <class T, class A1>
+ / std::shared_ptr<T>
+ / factory(A1&& a1)
+ / {
+ / return std::shared_ptr<T>(new T(std::forward<A1>(a1)));
+ / }
+ /
+ / Now rvalue arguments can bind to the factory parameters. If the argument is const, that
+ / fact gets deduced into the factory template parameter type.
+ /
+ / [*Question]: What is that forward function in our solution?
+ /
+ / Like move, forward is a simple standard library function used to express our intent
+ / directly and explicitly, rather than through potentially cryptic uses of references.
+ / We want to forward the argument a1, so we simply say so.
+ /
+ / Here, forward preserves the lvalue/rvalue-ness of the argument that was passed to factory.
+ / If an rvalue is passed to factory, then an rvalue will be passed to T's constructor with
+ / the help of the forward function. Similarly, if an lvalue is passed to factory, it is
+ / forwarded to T's constructor as an lvalue.
+ /
+ / The definition of forward looks like this:
+ /
+ / [c++]
+ /
+ / template <class T>
+ / struct identity
+ / {
+ / typedef T type;
+ / };
+ /
+ / template <class T>
+ / T&& forward(typename identity<T>::type&& a)
+ / {
+ / return a;
+ / }
+ /
+ /[endsect]
+ /
+ /]
+
+[section:move_iterator Move iterators]
+
+[c++]
+
+ template<class Iterator>
+ class move_iterator;
+
+ template<class It>
+ move_iterator<It> make_move_iterator(const It &it);
+
+[classref boost::move_iterator move_iterator] is an iterator adaptor with the
+same behavior as the underlying iterator
+except that its dereference operator implicitly converts the value returned by the
+underlying iterator's dereference operator to an rvalue reference: `boost::move(*underlying_iterator)`
+It is a read-once iterator, but can have up to random access traversal characteristics.
+
+`move_iterator` is very useful because some generic algorithms and container insertion functions
+can be called with move iterators to replace copying with moving. For example:
+
+[import ../example/movable.hpp]
+[movable_definition]
+
+`movable` objects can be moved from one container to another using move iterators and insertion
+and assignment operations.w
+
+[import ../example/doc_move_iterator.cpp]
+[move_iterator_example]
+
+[endsect]
+
+[section:move_inserters Move inserters]
+
+Similar to standard insert iterators, it's possible to deal with move insertion in the same way
+as writing into an array. A special kind of iterator adaptors, called move insert iterators, are
+provided with this library. With regular iterator classes,
+
+[c++]
+
+ while (first != last) *result++ = *first++;
+
+causes a range [first,last) to be copied into a range starting with result. The same code with
+result being an move insert iterator will move insert corresponding elements into the container.
+This device allows all of the copying algorithms in the library to work in the move insert mode
+instead of the regular overwrite mode. This library offers 3 move insert iterators and their
+helper functions:
+
+[c++]
+
+ // Note: C models Container
+ template <typename C>
+ class back_move_insert_iterator;
+
+ template <typename C>
+ back_move_insert_iterator<C> back_move_inserter(C& x);
+
+ template <typename C>
+ class front_move_insert_iterator;
+
+ template <typename C>
+ front_move_insert_iterator<C> front_move_inserter(C& x);
+
+ template <typename C>
+ class move_insert_iterator;
+
+ template <typename C>
+ move_insert_iterator<C> move_inserter(C& x, typename C::iterator it);
+
+
+A move insert iterator is constructed from a container and possibly one of its iterators pointing
+to where insertion takes place if it is neither at the beginning nor at the end of the container.
+Insert iterators satisfy the requirements of output iterators. `operator*` returns the move insert
+iterator itself. The assignment `operator=(T& x)` is defined on insert iterators to allow writing
+into them, it inserts x right before where the insert iterator is pointing. In other words, an
+`insert iterator` is like a cursor pointing into the container where the insertion takes place.
+`back_move_iterator` move inserts elements at the end of a container, `front_insert_iterator`
+move inserts elements at the beginning of a container, and `move_insert_iterator` move inserts
+elements where the iterator points to in a container. `back_move_inserter`, `front_move_inserter`,
+and `move_inserter` are three functions making the insert iterators out of a container. Here's
+an example of how to use them:
+
+[import ../example/doc_move_inserter.cpp]
+[move_inserter_example]
+
+[endsect]
+
+[section:move_algorithms Move algorithms]
+
+The standard library offers several copy-based algorithms. Some of them, like `std::copy` or
+`std::uninitialized_copy` are basic building blocks for containers and other data structures.
+This library offers move-based functions for those purposes:
+
+[c++]
+
+ template<typename I, typename O> O move(I, I, O);
+ template<typename I, typename O> O move_backward(I, I, O);
+ template<typename I, typename F> F uninitialized_move(I, I, F);
+ template<typename I, typename F> F uninitialized_copy_or_move(I, I, F);
+
+
+The first 3 are move variations of their equivalent copy algorithms, but copy assignment and
+copy construction are replaced with move assignment and construction. The last one has the
+same behaviour as `std::uninitialized_copy` but since several standand library implementations
+don't play very well with `move_iterator`s, this version is a portable version for those
+willing to use move iterators.
+
+[import ../example/doc_move_algorithms.cpp]
+[move_algorithms_example]
+
+[endsect]
+
+[xinclude autodoc.xml]

Added: sandbox/libs/move_semantics/example/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/example/Jamfile.v2 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,28 @@
+##############################################################################
+##
+## (C) Copyright Ion Gaztanaga 2008-2009 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)
+##
+##
+##############################################################################
+rule test_all
+{
+ local all_rules = ;
+
+ for local fileb in [ glob *.cpp ]
+ {
+ all_rules += [ run $(fileb)
+ : # additional args
+ : # test-files
+ : # requirements
+ ] ;
+ }
+
+ return $(all_rules) ;
+}
+
+test-suite move_example : [ test_all r ]
+: <link>static
+;
+

Added: sandbox/libs/move_semantics/example/doc_clone_ptr.cpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/example/doc_clone_ptr.cpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,145 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#include <boost/move_semantics/move.hpp>
+#include <utility>
+
+//[clone_ptr_base_derived
+class Base
+{
+ public:
+ // Compiler-generated copy constructor and assignment
+
+ Base(){}
+
+ // move semantics
+ BOOST_ENABLE_MOVE_EMULATION(Base)
+
+ Base(BOOST_RV_REF(Base) x) {/**/} // Move ctor
+
+ Base& operator=(BOOST_RV_REF(Base) x)
+ {/**/ return *this;} // Move assign
+
+ virtual Base *clone() const
+ { return new Base(*this); }
+};
+
+class Member
+{
+ public:
+ Member(){}
+
+ // Compiler-generated copy constructor and assignment
+
+ // move semantics
+ BOOST_ENABLE_MOVE_EMULATION(Member)
+
+ Member(BOOST_RV_REF(Member)) {/**/} // Move ctor
+
+ Member &operator=(BOOST_RV_REF(Member)) // Move assign
+ {/**/ return *this; }
+};
+
+class Derived : public Base
+{
+ Member mem_;
+
+ public:
+ // Compiler-generated copy constructor and assignment
+
+ Derived(){}
+
+ // move semantics
+ BOOST_ENABLE_MOVE_EMULATION(Derived)
+
+ Derived(BOOST_RV_REF(Derived) x) // Move ctor
+ : Base(boost::move(static_cast<Base&>(x))),
+ mem_(boost::move(x.mem_)) { }
+
+ Derived& operator=(BOOST_RV_REF(Derived) x) // Move assign
+ {
+ Base::operator=(boost::move(x));
+ mem_ = boost::move(x.mem_);
+ return *this;
+ }
+ // ...
+};
+//]
+
+//[clone_ptr_def
+template <class T>
+class clone_ptr
+{
+ //<-
+ private:
+ T* ptr;
+
+ public:
+ // construction
+ explicit clone_ptr(T* p = 0) : ptr(p) {}
+
+ // destruction
+ ~clone_ptr() { delete ptr; }
+
+ // copy semantics
+ clone_ptr(const clone_ptr& p)
+ : ptr(p.ptr ? p.ptr->clone() : 0) {}
+
+ clone_ptr& operator=(const clone_ptr& p)
+ {
+ if (this != &p)
+ {
+ delete ptr;
+ ptr = p.ptr ? p.ptr->clone() : 0;
+ }
+ return *this;
+ }
+
+ //->
+ // Same as before ...
+
+ // move semantics
+ BOOST_ENABLE_MOVE_EMULATION(clone_ptr)
+
+ clone_ptr(BOOST_RV_REF(clone_ptr) p)
+ : ptr(p.ptr) { p.ptr = 0; }
+
+ clone_ptr& operator=(BOOST_RV_REF(clone_ptr) p)
+ {
+ std::swap(ptr, p.ptr);
+ delete p.ptr;
+ p.ptr = 0;
+ return *this;
+ }
+};
+//]
+
+int main()
+{
+ {
+ //[copy_clone_ptr
+ clone_ptr<Base> p1(new Derived());
+ // ...
+ clone_ptr<Base> p2 = p1; // p2 and p1 each own their own pointer
+ //]
+ }
+ {
+ //[move_clone_ptr
+ clone_ptr<Base> p1(new Derived());
+ // ...
+ clone_ptr<Base> p2 = boost::move(p1); // p2 now owns the pointer instead of p1
+ }
+ //]
+ //[clone_ptr_move_derived
+ Derived d;
+ Derived d2(boost::move(d));
+ //]
+ return 0;
+}

Added: sandbox/libs/move_semantics/example/doc_construct_forward.cpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/example/doc_construct_forward.cpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,98 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright David Abrahams, Vicente Botet, Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//[construct_forward_example
+#include <boost/move_semantics/move.hpp>
+#include <iostream>
+
+class non_movable_test
+{
+ public:
+ non_movable_test()
+ { std::cout << "non_movable_test()" << std::endl; }
+
+ non_movable_test(const non_movable_test&)
+ { std::cout << "non_movable_test(const non_movable_test&)" << std::endl; }
+
+ non_movable_test(int)
+ { std::cout << "non_movable_test(int)" << std::endl; }
+
+ non_movable_test(int, double)
+ { std::cout << "non_movable_test(int, double)" << std::endl; }
+};
+
+class movable_test
+{
+ public:
+ BOOST_ENABLE_MOVE_EMULATION(movable_test)
+
+ movable_test()
+ { std::cout << "movable_test()" << std::endl; }
+
+ movable_test(int)
+ { std::cout << "movable_test(int)" << std::endl; }
+
+ movable_test(BOOST_RV_REF(movable_test))
+ { std::cout << "movable_test(BOOST_RV_REF(movable_test))" << std::endl; }
+
+ movable_test(const movable_test &)
+ { std::cout << "movable_test(const movable_test &)" << std::endl; }
+
+ movable_test(BOOST_RV_REF(movable_test), BOOST_RV_REF(movable_test))
+ { std::cout << "movable_test(BOOST_RV_REF(movable_test), BOOST_RV_REF(movable_test))" << std::endl; }
+};
+
+//1 argument
+template<class MaybeMovable, class MaybeRv>
+void function_construct(BOOST_CONSTRUCT_FWD_REF(MaybeRv) x)
+{ MaybeMovable m(boost::forward_constructor<MaybeRv>(x)); }
+
+//2 argument
+template<class MaybeMovable, class MaybeRv, class MaybeRv2>
+void function_construct( BOOST_CONSTRUCT_FWD_REF(MaybeRv) x, BOOST_CONSTRUCT_FWD_REF(MaybeRv2) x2)
+{
+ MaybeMovable m( boost::forward_constructor<MaybeRv>(x), boost::forward_constructor<MaybeRv2>(x2));
+}
+
+int main()
+{
+ movable_test m;
+ //move constructor
+ function_construct<movable_test>(boost::move(m));
+ //copy constructor
+ function_construct<movable_test>(movable_test());
+ //two rvalue constructor
+ function_construct<movable_test>(boost::move(m), boost::move(m));
+
+ non_movable_test nm;
+ //copy constructor (non_movable_test has no move ctor.)
+ function_construct<non_movable_test>(boost::move(nm));
+ //copy constructor
+ function_construct<non_movable_test>(nm);
+ //int constructor
+ function_construct<non_movable_test>(int(0));
+ //int, double constructor
+ function_construct<non_movable_test>(int(0), double(0.0));
+
+ //Output is:
+ //movable_test()
+ //movable_test(BOOST_RV_REF(movable_test))
+ //movable_test()
+ //movable_test(const movable_test &)
+ //movable_test(BOOST_RV_REF(movable_test), BOOST_RV_REF(movable_test))
+ //non_movable_test()
+ //non_movable_test(const non_movable_test&)
+ //non_movable_test(const non_movable_test&)
+ //non_movable_test(int)
+ //non_movable_test(int, double)
+ return 0;
+}
+//]

Added: sandbox/libs/move_semantics/example/doc_file_descriptor.cpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/example/doc_file_descriptor.cpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,87 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//[file_descriptor_def
+
+#include <boost/move_semantics/move.hpp>
+#include <stdexcept>
+
+class file_descriptor
+{
+ //<-
+ int operating_system_open_file(const char *)
+ {
+ return 1;
+ }
+
+ void operating_system_close_file(int)
+ {}
+ //->
+ int os_descr_;
+
+ file_descriptor(file_descriptor &);
+ file_descriptor & operator=(file_descriptor &);
+
+ public:
+ explicit file_descriptor(const char *filename = 0)
+ : os_descr_(filename ? operating_system_open_file(filename) : 0)
+ { if(!os_descr_) throw std::runtime_error("file not found"); }
+
+ ~file_descriptor()
+ { if(!os_descr_) operating_system_close_file(os_descr_); }
+
+ // move semantics
+ BOOST_ENABLE_MOVE_EMULATION(file_descriptor)
+
+ file_descriptor(BOOST_RV_REF(file_descriptor) x) // Move ctor
+ : os_descr_(x.os_descr_)
+ { x.os_descr_ = 0; }
+
+ file_descriptor& operator=(BOOST_RV_REF(file_descriptor) x) // Move assign
+ {
+ if(!os_descr_) operating_system_close_file(os_descr_);
+ os_descr_ = x.os_descr_;
+ x.os_descr_ = 0;
+ return *this;
+ }
+
+ bool empty() const { return os_descr_ == 0; }
+};
+
+//]
+
+//[file_descriptor_example
+#include <boost/interprocess/containers/vector.hpp>
+#include <cassert>
+
+file_descriptor create_file_descriptor(const char *filename)
+{ return file_descriptor(filename); }
+
+int main()
+{
+ //Open a file obtaining its descriptor. The file_descriptor
+ //can be returned from factory functions without any copy
+ file_descriptor fd = create_file_descriptor("filename");
+ assert(!fd.empty());
+
+ //Move into a vector
+ boost::interprocess::vector<file_descriptor> v;
+ v.push_back(boost::move(fd));
+
+ //Check ownership has been transferred
+ assert(fd.empty());
+ assert(!v[0].empty());
+
+ //Compilation error if uncommented, file_descriptor is not copyable:
+ //boost::interprocess::vector<file_descriptor> v2(v);
+ return 0;
+}
+//]

Added: sandbox/libs/move_semantics/example/doc_move_algorithms.cpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/example/doc_move_algorithms.cpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,41 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//[move_algorithms_example
+#include "movable.hpp"
+#include <cassert>
+#include <boost/aligned_storage.hpp>
+
+int main()
+{
+ const std::size_t ArraySize = 10;
+ movable movable_array[ArraySize];
+ movable movable_array2[ArraySize];
+ //move
+ boost::move(&movable_array2[0], &movable_array2[ArraySize], &movable_array[0]);
+ assert(movable_array2[0].moved());
+ assert(!movable_array[0].moved());
+
+ //move backward
+ boost::move_backward(&movable_array[0], &movable_array[ArraySize], &movable_array2[ArraySize]);
+ assert(movable_array[0].moved());
+ assert(!movable_array2[0].moved());
+
+ //uninitialized_move
+ boost::aligned_storage< sizeof(movable)*ArraySize
+ , boost::alignment_of<movable>::value>::type storage;
+ movable *raw_movable = static_cast<movable*>(static_cast<void*>(&storage));
+ boost::uninitialized_move(&movable_array2[0], &movable_array2[ArraySize], raw_movable);
+ assert(movable_array2[0].moved());
+ assert(!raw_movable[0].moved());
+ return 0;
+}
+//]

Added: sandbox/libs/move_semantics/example/doc_move_inserter.cpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/example/doc_move_inserter.cpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,48 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//[move_inserter_example
+#include <boost/interprocess/containers/list.hpp>
+#include "movable.hpp"
+#include <cassert>
+
+using namespace boost::interprocess;
+
+typedef list<movable> list_t;
+typedef list_t::iterator l_iterator;
+
+template<class MoveInsertIterator>
+void test_move_inserter(list_t &l2, MoveInsertIterator mit)
+{
+ //Create a list with 10 default constructed objects
+ list<movable> l(10);
+ assert(!l.begin()->moved());
+ l2.clear();
+
+ //Move construct
+ for(l_iterator itbeg = l.begin(), itend = l.end(); itbeg != itend; ++itbeg){
+ *mit = *itbeg;
+ }
+ //Check size and status
+ assert(l2.size() == l.size());
+ assert(l.begin()->moved());
+ assert(!l2.begin()->moved());
+}
+
+int main()
+{
+ list_t l2;
+ test_move_inserter(l2, boost::back_move_inserter(l2));
+ test_move_inserter(l2, boost::front_move_inserter(l2));
+ test_move_inserter(l2, boost::move_inserter(l2, l2.end()));
+ return 0;
+}
+//]

Added: sandbox/libs/move_semantics/example/doc_move_iterator.cpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/example/doc_move_iterator.cpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,39 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//[move_iterator_example
+#include <boost/interprocess/containers/vector.hpp>
+#include "movable.hpp"
+#include <cassert>
+
+int main()
+{
+ using namespace boost::interprocess;
+
+ //Create a vector with 10 default constructed objects
+ vector<movable> v(10);
+ assert(!v[0].moved());
+
+ //Move construct all elements in v into v2
+ vector<movable> v2( boost::make_move_iterator(v.begin())
+ , boost::make_move_iterator(v.end()));
+ assert(v[0].moved());
+ assert(!v2[0].moved());
+
+ //Now move assign all elements from in v2 back into v
+ v.assign( boost::make_move_iterator(v2.begin())
+ , boost::make_move_iterator(v2.end()));
+ assert(v2[0].moved());
+ assert(!v[0].moved());
+
+ return 0;
+}
+//]

Added: sandbox/libs/move_semantics/example/movable.hpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/example/movable.hpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,45 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_MOVE_TEST_MOVABLE_HPP
+#define BOOST_MOVE_TEST_MOVABLE_HPP
+
+//[movable_definition
+//header file "movable.hpp"
+#include <boost/move_semantics/move.hpp>
+
+//A movable class
+class movable
+{
+ //Non-copyable
+ movable(movable &);
+ movable & operator=(movable &);
+
+ int value_;
+
+ public:
+ BOOST_ENABLE_MOVE_EMULATION(movable)
+
+ movable() : value_(1){}
+
+ //Move constructor and assignment
+ movable(BOOST_RV_REF(movable) m)
+ { value_ = m.value_; m.value_ = 0; }
+
+ movable & operator=(BOOST_RV_REF(movable) m)
+ { value_ = m.value_; m.value_ = 0; return *this; }
+
+ bool moved() const //Observer
+ { return value_ == 0; }
+};
+
+//]
+
+#endif //BOOST_MOVE_TEST_MOVABLE_HPP

Added: sandbox/libs/move_semantics/proj/vc7ide/Move.sln
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/Move.sln 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,109 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "construct_forward_test", "construct_forward_test.vcproj", "{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "move_iterator_test", "move_iterator_test.vcproj", "{C8AD2618-79EB-8612-42FE-2A3AC9667A13}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "move_test", "move_test.vcproj", "{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "move_algorithm_test", "move_algorithm.vcproj", "{C8AD2618-79EB-8612-42FE-2A3AC9667A13}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_clone_ptr", "doc_clone_ptr.vcproj", "{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_file_descriptor", "doc_file_descriptor.vcproj", "{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_move_iterator", "doc_move_iterator.vcproj", "{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_move_inserter", "doc_move_inserter.vcproj", "{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_move_algorithms", "doc_move_algorithms.vcproj", "{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_construct_forward", "doc_construct_forward.vcproj", "{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "back_move_inserter_test", "back_move_inserter_test.vcproj", "{C8AD2618-79EB-8612-42FE-2A3AC9667A13}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.ActiveCfg = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.Build.0 = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.ActiveCfg = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.Build.0 = Release|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Debug.ActiveCfg = Debug|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Debug.Build.0 = Debug|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Release.ActiveCfg = Release|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Release.Build.0 = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.ActiveCfg = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.Build.0 = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.ActiveCfg = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.Build.0 = Release|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Debug.ActiveCfg = Debug|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Debug.Build.0 = Debug|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Release.ActiveCfg = Release|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Release.Build.0 = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.ActiveCfg = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.Build.0 = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.ActiveCfg = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.Build.0 = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.ActiveCfg = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.Build.0 = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.ActiveCfg = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.Build.0 = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.ActiveCfg = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.Build.0 = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.ActiveCfg = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.Build.0 = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.ActiveCfg = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.Build.0 = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.ActiveCfg = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.Build.0 = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.ActiveCfg = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.Build.0 = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.ActiveCfg = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.Build.0 = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.ActiveCfg = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.Build.0 = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.ActiveCfg = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.Build.0 = Release|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Debug.ActiveCfg = Debug|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Debug.Build.0 = Debug|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Release.ActiveCfg = Release|Win32
+ {C8AD2618-79EB-8612-42FE-2A3AC9667A13}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionItems) = postSolution
+ ..\..\doc\Jamfile.v2 = ..\..\doc\Jamfile.v2
+ ..\..\..\..\boost\move_semantics\move.hpp = ..\..\..\..\boost\move_semantics\move.hpp
+ ..\..\doc\move.qbk = ..\..\doc\move.qbk
+ todo.txt = todo.txt
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal

Added: sandbox/libs/move_semantics/proj/vc7ide/back_move_inserter_test.vcproj
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/back_move_inserter_test.vcproj 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="back_move_inserter_test"
+ ProjectGUID="{C8AD2618-79EB-8612-42FE-2A3AC9667A13}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/back_move_inserter_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="FALSE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/back_move_inserter_test_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/back_move_inserter_test.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/back_move_inserter_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/back_move_inserter_test.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{818563C3-6640-0A65-55CB-202E5BAD7FAF}">
+ <File
+ RelativePath="..\..\test\back_move_inserter.cpp">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/libs/move_semantics/proj/vc7ide/construct_forward_test.vcproj
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/construct_forward_test.vcproj 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="construct_forward_test"
+ ProjectGUID="{C8AD2618-79EB-8612-42FE-2A3AC9667A13}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/construct_forward_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="TRUE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/construct_forward_test_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/construct_forward_test.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/construct_forward_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/construct_forward_test.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{818563C3-6640-0A65-55CB-202E5BAD7FAF}">
+ <File
+ RelativePath="..\..\test\construct_forward.cpp">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/libs/move_semantics/proj/vc7ide/doc_clone_ptr.vcproj
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/doc_clone_ptr.vcproj 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="doc_clone_ptr"
+ ProjectGUID="{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/doc_clone_ptr"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="TRUE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_clone_ptr_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/doc_clone_ptr.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/doc_clone_ptr"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_clone_ptr.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{34957FC1-7BC5-1646-05A6-27542AA2A2FF}">
+ <File
+ RelativePath="..\..\example\doc_clone_ptr.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93A78280-B78D-4B31-7E8B-6255ACE1E5FB}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/libs/move_semantics/proj/vc7ide/doc_construct_forward.vcproj
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/doc_construct_forward.vcproj 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="doc_construct_forward"
+ ProjectGUID="{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/doc_construct_forward"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="FALSE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_construct_forward_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/doc_construct_forward.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/doc_construct_forward"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_construct_forward.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{34957FC1-7BC5-1646-05A6-27542AA2A2FF}">
+ <File
+ RelativePath="..\..\example\doc_construct_forward.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93A78280-B78D-4B31-7E8B-6255ACE1E5FB}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/libs/move_semantics/proj/vc7ide/doc_file_descriptor.vcproj
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/doc_file_descriptor.vcproj 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="doc_file_descriptor"
+ ProjectGUID="{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/doc_file_descriptor"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="FALSE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_file_descriptor_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/doc_file_descriptor.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/doc_file_descriptor"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_file_descriptor.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{34957FC1-7BC5-1646-05A6-27542AA2A2FF}">
+ <File
+ RelativePath="..\..\example\doc_file_descriptor.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93A78280-B78D-4B31-7E8B-6255ACE1E5FB}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/libs/move_semantics/proj/vc7ide/doc_move_algorithms.vcproj
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/doc_move_algorithms.vcproj 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="doc_move_algorithms"
+ ProjectGUID="{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/doc_move_algorithms"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="FALSE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_move_algorithms_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/doc_move_algorithms.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/doc_move_algorithms"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_move_algorithms.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{34957FC1-7BC5-1646-05A6-27542AA2A2FF}">
+ <File
+ RelativePath="..\..\example\doc_move_algorithms.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93A78280-B78D-4B31-7E8B-6255ACE1E5FB}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/libs/move_semantics/proj/vc7ide/doc_move_inserter.vcproj
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/doc_move_inserter.vcproj 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="doc_move_inserter"
+ ProjectGUID="{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/doc_move_inserter"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="FALSE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_move_inserter_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/doc_move_inserter.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/doc_move_inserter"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_move_inserter.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{34957FC1-7BC5-1646-05A6-27542AA2A2FF}">
+ <File
+ RelativePath="..\..\example\doc_move_inserter.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93A78280-B78D-4B31-7E8B-6255ACE1E5FB}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/libs/move_semantics/proj/vc7ide/doc_move_iterator.vcproj
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/doc_move_iterator.vcproj 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="doc_move_iterator"
+ ProjectGUID="{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/doc_move_iterator"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="FALSE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_move_iterator_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/doc_move_iterator.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/doc_move_iterator"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/doc_move_iterator.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{34957FC1-7BC5-1646-05A6-27542AA2A2FF}">
+ <File
+ RelativePath="..\..\example\doc_move_iterator.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93A78280-B78D-4B31-7E8B-6255ACE1E5FB}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/libs/move_semantics/proj/vc7ide/move_algorithm.vcproj
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/move_algorithm.vcproj 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="move_algorithm_test"
+ ProjectGUID="{C8AD2618-79EB-8612-42FE-2A3AC9667A13}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/move_algorithm_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="FALSE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/move_algorithm_test_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/move_algorithm_test.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/move_algorithm_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/move_algorithm_test.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{818563C3-6640-0A65-55CB-202E5BAD7FAF}">
+ <File
+ RelativePath="..\..\test\move_algorithm.cpp">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/libs/move_semantics/proj/vc7ide/move_iterator_test.vcproj
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/move_iterator_test.vcproj 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="move_iterator_test"
+ ProjectGUID="{C8AD2618-79EB-8612-42FE-2A3AC9667A13}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/move_iterator_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="FALSE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/move_iterator_test_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/move_iterator_test.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/move_iterator_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/move_iterator_test.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{818563C3-6640-0A65-55CB-202E5BAD7FAF}">
+ <File
+ RelativePath="..\..\test\move_iterator.cpp">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/libs/move_semantics/proj/vc7ide/move_test.vcproj
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/move_test.vcproj 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="move_test"
+ ProjectGUID="{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/move_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="TRUE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/move_test_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/move_test.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/move_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/move_test.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{34957FC1-7BC5-1646-05A6-27542AA2A2FF}">
+ <File
+ RelativePath="..\..\test\move.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93A78280-B78D-4B31-7E8B-6255ACE1E5FB}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/libs/move_semantics/proj/vc7ide/todo.txt
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/proj/vc7ide/todo.txt 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1 @@
+BOOST_MOVE_MOVABLE_ONLY
\ No newline at end of file

Added: sandbox/libs/move_semantics/test/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/test/Jamfile.v2 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,28 @@
+##############################################################################
+##
+## (C) Copyright Ion Gaztanaga 2008-2009 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)
+##
+##
+##############################################################################
+rule test_all
+{
+ local all_rules = ;
+
+ for local fileb in [ glob *.cpp ]
+ {
+ all_rules += [ run $(fileb)
+ : # additional args
+ : # test-files
+ : # requirements
+ ] ;
+ }
+
+ return $(all_rules) ;
+}
+
+test-suite move_test : [ test_all r ]
+: <link>static
+;
+

Added: sandbox/libs/move_semantics/test/back_move_inserter.cpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/test/back_move_inserter.cpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,44 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright David Abrahams, Vicente Botet, Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#include <boost/move_semantics/move.hpp>
+#include <boost/interprocess/containers/vector.hpp>
+#include "../example/movable.hpp"
+
+int main()
+{
+ namespace ipc = ::boost::interprocess;
+ //Default construct 10 movable objects
+ ipc::vector<movable> v(10);
+
+ //Test default constructed value
+ if(v[0].moved()){
+ return 1;
+ }
+
+ //Move values
+ ipc::vector<movable> v2;
+ std::copy(v.begin(), v.end(), boost::back_move_inserter(v2));
+
+ //Test values have been moved
+ if(!v[0].moved()){
+ return 1;
+ }
+
+ if(v2.size() != 10){
+ return 1;
+ }
+
+ if(v2[0].moved()){
+ return 1;
+ }
+
+ return 0;
+}

Added: sandbox/libs/move_semantics/test/construct_forward.cpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/test/construct_forward.cpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,39 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright David Abrahams, Vicente Botet, Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#include <boost/move_semantics/move.hpp>
+#include "../example/movable.hpp"
+#include <cstdio>
+
+class non_movable
+{
+ public:
+ non_movable()
+ {}
+};
+
+template<class MaybeMovableOnly, class MaybeRvalue>
+void function_construct(BOOST_CONSTRUCT_FWD_REF(MaybeRvalue) x)
+{
+ //Moves in case Convertible is boost::rv<movable> copies otherwise
+ //For C++0x perfect forwarding
+ MaybeMovableOnly m(boost::forward_constructor<MaybeRvalue>(x));
+}
+
+int main()
+{
+ movable m;
+ function_construct<movable>(boost::move(m));
+ non_movable nm;
+ function_construct<non_movable>(boost::move(nm));
+ const non_movable cnm;
+ function_construct<non_movable>(cnm);
+ return 0;
+}

Added: sandbox/libs/move_semantics/test/move.cpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/test/move.cpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,81 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright David Abrahams, Vicente Botet, Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#include <boost/move_semantics/move.hpp>
+#include "../example/movable.hpp"
+
+movable function(movable m)
+{
+ return movable(boost::move(m));
+}
+
+movable functionr(BOOST_RV_REF(movable) m)
+{
+ return movable(boost::move(m));
+}
+
+movable function2(movable m)
+{
+ return boost::move(m);
+}
+
+BOOST_RV_REF(movable) function2r(BOOST_RV_REF(movable) m)
+{
+ return boost::move(m);
+}
+
+movable move_return_function2 ()
+{
+ return movable();
+}
+
+movable move_return_function ()
+{
+ movable m;
+ return (boost::move(m));
+}
+int main()
+{
+ {
+ movable m;
+ movable m2(boost::move(m));
+ movable m3(function(movable(boost::move(m2))));
+ movable m4(function(boost::move(m3)));
+ }
+ {
+ movable m;
+ movable m2(boost::move(m));
+ movable m3(functionr(movable(boost::move(m2))));
+ movable m4(functionr(boost::move(m3)));
+ }
+ {
+ movable m;
+ movable m2(boost::move(m));
+ movable m3(function2(movable(boost::move(m2))));
+ movable m4(function2(boost::move(m3)));
+ }
+ {
+ movable m;
+ movable m2(boost::move(m));
+ movable m3(function2r(movable(boost::move(m2))));
+ movable m4(function2r(boost::move(m3)));
+ }
+ {
+ movable m;
+ movable m2(boost::move(m));
+ movable m3(move_return_function());
+ }
+ {
+ movable m;
+ movable m2(boost::move(m));
+ movable m3(move_return_function2());
+ }
+ return 0;
+}

Added: sandbox/libs/move_semantics/test/move_algorithm.cpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/test/move_algorithm.cpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,55 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright David Abrahams, Vicente Botet, Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#include <boost/move_semantics/move.hpp>
+#include <boost/interprocess/containers/vector.hpp>
+#include "../example/movable.hpp"
+
+int main()
+{
+ namespace ipc = ::boost::interprocess;
+ //Default construct 10 movable objects
+ ipc::vector<movable> v(10);
+ ipc::vector<movable> v2(10);
+
+ //Move to v2
+ boost::move(v.begin(), v.end(), v2.begin());
+
+ //Test values have been moved
+ if(!v[0].moved()){
+ return 1;
+ }
+
+ if(v2.size() != 10){
+ return 1;
+ }
+
+ if(v2[0].moved()){
+ return 1;
+ }
+
+ //Move to v again
+ boost::move_backward(v2.begin(), v2.end(), v.end());
+
+ //Test values have been moved
+ if(!v2[0].moved()){
+ return 1;
+ }
+
+ if(v.size() != 10){
+ return 1;
+ }
+
+ if(v[0].moved()){
+ return 1;
+ }
+
+ return 0;
+}

Added: sandbox/libs/move_semantics/test/move_iterator.cpp
==============================================================================
--- (empty file)
+++ sandbox/libs/move_semantics/test/move_iterator.cpp 2009-02-17 13:09:50 EST (Tue, 17 Feb 2009)
@@ -0,0 +1,52 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright David Abrahams, Vicente Botet, Ion Gaztanaga 2009.
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#include <boost/move_semantics/move.hpp>
+#include <boost/interprocess/containers/vector.hpp>
+#include "../example/movable.hpp"
+
+int main()
+{
+ namespace ipc = ::boost::interprocess;
+ //Default construct 10 movable objects
+ ipc::vector<movable> v(10);
+
+ //Test default constructed value
+ if(v[0].moved()){
+ return 1;
+ }
+
+ //Move values
+ ipc::vector<movable> v2
+ (boost::make_move_iterator(v.begin()), boost::make_move_iterator(v.end()));
+
+ //Test values have been moved
+ if(!v[0].moved()){
+ return 1;
+ }
+
+ if(v2.size() != 10){
+ return 1;
+ }
+
+ //Move again
+ v.assign(boost::make_move_iterator(v2.begin()), boost::make_move_iterator(v2.end()));
+
+ //Test values have been moved
+ if(!v2[0].moved()){
+ return 1;
+ }
+
+ if(v[0].moved()){
+ return 1;
+ }
+
+ return 0;
+}


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