Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70084 - sandbox/assign_v2/libs/assign/v2/src
From: erwann.rogard_at_[hidden]
Date: 2011-03-17 17:37:04


Author: e_r
Date: 2011-03-17 17:37:03 EDT (Thu, 17 Mar 2011)
New Revision: 70084
URL: http://svn.boost.org/trac/boost/changeset/70084

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/libs/assign/v2/src/main.cpp | 41 ++++++++++++++++++++++-----------------
   1 files changed, 23 insertions(+), 18 deletions(-)

Modified: sandbox/assign_v2/libs/assign/v2/src/main.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/src/main.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/src/main.cpp 2011-03-17 17:37:03 EDT (Thu, 17 Mar 2011)
@@ -1,3 +1,8 @@
+#include <string>
+#include <iostream>
+#include <boost/config.hpp>
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#include <boost/format.hpp>
 
 // Test
 //#include <libs/assign/v2/test/detail.h>
@@ -7,42 +12,42 @@
 #include <libs/assign/v2/test/utility.h>
 #include <libs/assign/v2/tutorial.h>
 
-// Speed
+// Tutorial
+
+// Speed -- CPP0x required
 #include <fstream>
 #include <libs/assign/v2/speed/test.h>
 
-#include <string>
-#include <iostream>
-#include <boost/config.hpp>
-#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
-
-
 int main (int argc, char * const argv[])
 {
 
     // Do not put libs/assign/v2/test/unit_testing in this project
     {
- std::string cpp0x = "RVALUE_REFERENCES : ";
+ std::string str = "RVALUE_REFERENCE : %1%\n";
+ str += "VARIADIC_TEMPLATES : %2%\n";
+ str += "0X_HDR_TUPLE : %3%\n";
+ str += "BOOST_ASSIGN_V2_CPP0X : %4%\n";
+
+ boost::format cpp0x(str);
+
         #ifdef BOOST_NO_RVALUE_REFERENCES
- cpp0x += "NO";
+ cpp0x % "No";
         #else
- cpp0x += "YES";
+ cpp0x % "Yes";
         #endif
- cpp0x += ", VARIADIC_TEMPLATES : ";
         #ifdef BOOST_NO_VARIADIC_TEMPLATES
- cpp0x += "NO";
+ cpp0x % "No";
         #else
- cpp0x += "YES";
+ cpp0x % "Yes";
         #endif
- cpp0x += ", 0X_HDR_TUPLE : ";
         #ifdef BOOST_NO_0X_HDR_TUPLE
- cpp0x += "NO";
+ cpp0x % "No";
         #else
- cpp0x += "YES";
+ cpp0x % "Yes";
         #endif
- cpp0x += ", ENABLE_CPP0X : " + std::string(BOOST_ASSIGN_V2_ENABLE_CPP0X ? "YES" : "NO");
+ cpp0x % (BOOST_ASSIGN_V2_ENABLE_CPP0X ? "YES" : "NO");
 
- std::cout << cpp0x << std::endl;
+ std::cout << cpp0x.str() << std::endl;
     }
     {
         using namespace test_assign_v2;


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