Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60509 - sandbox/statistics/detail/assign/libs/assign/example
From: erwann.rogard_at_[hidden]
Date: 2010-03-12 01:54:25


Author: e_r
Date: 2010-03-12 01:54:25 EST (Fri, 12 Mar 2010)
New Revision: 60509
URL: http://svn.boost.org/trac/boost/changeset/60509

Log:
m
Added:
   sandbox/statistics/detail/assign/libs/assign/example/
   sandbox/statistics/detail/assign/libs/assign/example/chain.cpp (contents, props changed)
   sandbox/statistics/detail/assign/libs/assign/example/chain.h (contents, props changed)

Added: sandbox/statistics/detail/assign/libs/assign/example/chain.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/assign/libs/assign/example/chain.cpp 2010-03-12 01:54:25 EST (Fri, 12 Mar 2010)
@@ -0,0 +1,38 @@
+//////////////////////////////////////////////////////////////////////////////
+// test::chain.cpp //
+// //
+//////////////////////////////////////////////////////////////////////////////
+#include <ostream>
+#include <iterator>
+#include <vector>
+#include <boost/array.hpp>
+#include <boost/typeof/typeof.hpp>
+#include <boost/range/chain.hpp>
+#include <boost/next_prior.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign/auto_size/ref_list_of.hpp>
+#include <boost/assign/auto_size/reference_wrapper/chain_traits.hpp> // MUST be included
+#include <boost/assign/chain/auto_convert.hpp>
+#include <libs/assign/example/chain.h>
+
+void example_chain(std::ostream& os)
+{
+ using namespace boost::assign;
+ using namespace boost::assign::detail;
+ os << "-> test_chain: " << std::endl;
+ typedef int val_;
+ val_ a = 1, b = 2, c = 3;
+ typedef boost::array<val_,3> ar_;
+ typedef std::vector<val_> vec_;
+ typedef detail::result_of::convert_range<val_&,ar_> caller_;
+ typedef caller_::type res_;
+ ar_ ar; ar.assign(-1);
+ BOOST_AUTO(tmp1,cref_list_of(a)(b)(c));
+ boost::copy(
+ detail::chain_auto_convert_filter_wrapper(tmp1,ar),
+ std::ostream_iterator<val_>(os," ")
+ );
+
+ os << "<- " << std::endl;
+
+}

Added: sandbox/statistics/detail/assign/libs/assign/example/chain.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/assign/libs/assign/example/chain.h 2010-03-12 01:54:25 EST (Fri, 12 Mar 2010)
@@ -0,0 +1,11 @@
+//////////////////////////////////////////////////////////////////////////////
+// test::chain.h //
+// //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_TEST_CHAIN_ER_2010_H
+#define LIBS_ASSIGN_TEST_CHAIN_ER_2010_H
+#include <ostream>
+
+void example_chain(std::ostream&);
+
+#endif


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