|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59972 - sandbox/statistics/detail/assign/libs/assign/example
From: erwann.rogard_at_[hidden]
Date: 2010-02-27 21:14:02
Author: e_r
Date: 2010-02-27 21:14:02 EST (Sat, 27 Feb 2010)
New Revision: 59972
URL: http://svn.boost.org/trac/boost/changeset/59972
Log:
m
Added:
sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.cpp
- copied unchanged from r59971, /sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp
sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.h
- copied unchanged from r59954, /sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.h
Removed:
sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp
sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.h
Deleted: sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp 2010-02-27 21:14:02 EST (Sat, 27 Feb 2010)
+++ (empty file)
@@ -1,83 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// example::cref_list_of.cpp //
-// //
-// (C) Copyright 2010 Erwann Rogard //
-// Use, modification and distribution are 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) //
-//////////////////////////////////////////////////////////////////////////////
-#include <ostream>
-#include <vector>
-#include <algorithm>
-#include <boost/typeof/typeof.hpp>
-#include <boost/assign/auto_size/ref_rebind_list_of.hpp>
-#include <boost/assign/auto_size/ref_list_of.hpp>
-#include <boost/assign/list_of.hpp>
-#include <libs/assign/example/cref_list_of2.h>
-
-void example_cref_list_of(std::ostream& os)
-{
- os << "-> example_cref_listof2 : ";
- using namespace boost::assign;
-
- typedef std::vector<int> ints_;
- typedef boost::array<int,3> array_;
- array_ array;
-
- // Since operator= calls begin() and end(), no need to test these separately
-
- {
- // cref_list_of
-
- int a=1, b=2, c=3;
- ints_ ints;
-
- {
- ints.clear();
- ints = cref_list_of(a,b,3);
- BOOST_ASSERT(ints[0] == a);
- BOOST_ASSERT(ints[1] == b);
- BOOST_ASSERT(ints[2] == c);
- }
- {
- array.assign(-1);
- array = cref_list_of(a,b,3);
- BOOST_ASSERT(array[0] == a);
- BOOST_ASSERT(array[1] == b);
- BOOST_ASSERT(array[2] == c);
- }
- {
- BOOST_AUTO(tmp,ref_list_of(a,b,c));
- std::fill(boost::begin(tmp),boost::end(tmp),0);
- BOOST_ASSERT(a == 0);
- BOOST_ASSERT(b == 0);
- BOOST_ASSERT(c == 0);
- }
- }
- {
- // ref_rebind_list_of
- {
- int a=1, b=2, c=3;
- ints_ ints;
- ints.clear();
- BOOST_AUTO(tmp,cref_rebind_list_of(a,b,c));
- {
- ints = tmp;
- BOOST_ASSERT(ints[0] == a);
- BOOST_ASSERT(ints[1] == b);
- BOOST_ASSERT(ints[2] == c);
- }
- int d = 4;
- tmp.assign(d);
- d = 5;
- {
- ints = tmp;
- BOOST_ASSERT(ints[0] == d);
- BOOST_ASSERT(ints[1] == d);
- BOOST_ASSERT(ints[2] == d);
- }
- }
- }
- os << "<- " << std::endl;
-
-};
Deleted: sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.h
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.h 2010-02-27 21:14:02 EST (Sat, 27 Feb 2010)
+++ (empty file)
@@ -1,16 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// example::cref_list_of.h //
-// //
-// (C) Copyright 2010 Erwann Rogard //
-// Use, modification and distribution are 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) //
-//////////////////////////////////////////////////////////////////////////////
-#ifndef LIBS_ASSIGN_EXAMPLE_CREF_LIST_OF2_ER_2010_HPP
-#define LIBS_ASSIGN_EXAMPLE_CREF_LIST_OF2_ER_2010_HPP
-#include <ostream>
-
-
-void example_cref_list_of(std::ostream&);
-
-#endif
\ No newline at end of file
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