Boost logo

Boost-Commit :

From: jefffaust_at_[hidden]
Date: 2007-05-27 09:50:07


Author: jefffaust
Date: 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
New Revision: 4311
URL: http://svn.boost.org/trac/boost/changeset/4311

Log:
Move stream operators to namespace of what they are streaming.

Text files modified:
   sandbox/explore/libs/explore/test/boost_array.cpp | 2 --
   sandbox/explore/libs/explore/test/boost_range.cpp | 1 -
   sandbox/explore/libs/explore/test/boost_tuple.cpp | 1 -
   sandbox/explore/libs/explore/test/boost_variant.cpp | 1 -
   sandbox/explore/libs/explore/test/c_array.cpp | 24 ++++++++++++------------
   sandbox/explore/libs/explore/test/std_deque.cpp | 2 --
   sandbox/explore/libs/explore/test/std_list.cpp | 2 --
   sandbox/explore/libs/explore/test/std_map.cpp | 3 ---
   sandbox/explore/libs/explore/test/std_pair.cpp | 2 --
   sandbox/explore/libs/explore/test/std_set.cpp | 3 ---
   sandbox/explore/libs/explore/test/std_vector.cpp | 37 +++++++++++++++++--------------------
   sandbox/explore/libs/explore/test/user_defined_container.cpp | 3 +--
   12 files changed, 30 insertions(+), 51 deletions(-)

Modified: sandbox/explore/libs/explore/test/boost_array.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/boost_array.cpp (original)
+++ sandbox/explore/libs/explore/test/boost_array.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -50,7 +50,6 @@
 
 BOOST_AUTO_TEST_CASE( basic_array_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     boost::array<int,0> ai0;
@@ -122,7 +121,6 @@
 
 BOOST_AUTO_TEST_CASE( vector_in_array_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::vector<int> vi;

Modified: sandbox/explore/libs/explore/test/boost_range.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/boost_range.cpp (original)
+++ sandbox/explore/libs/explore/test/boost_range.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -41,7 +41,6 @@
 
 BOOST_AUTO_TEST_CASE( boost_range_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     typedef std::vector<int> Cont;

Modified: sandbox/explore/libs/explore/test/boost_tuple.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/boost_tuple.cpp (original)
+++ sandbox/explore/libs/explore/test/boost_tuple.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -30,7 +30,6 @@
 
 BOOST_AUTO_TEST_CASE( basic_tuple_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     boost::tuples::tuple<int, double> t(1, 3.14);

Modified: sandbox/explore/libs/explore/test/boost_variant.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/boost_variant.cpp (original)
+++ sandbox/explore/libs/explore/test/boost_variant.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -44,7 +44,6 @@
 
 BOOST_AUTO_TEST_CASE( basic_variant_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     boost::variant< int, std::string, std::vector<int> > varVal;

Modified: sandbox/explore/libs/explore/test/c_array.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/c_array.cpp (original)
+++ sandbox/explore/libs/explore/test/c_array.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -24,7 +24,7 @@
     BOOST_CHECK_EQUAL(str_out.str(), "[1]");
 
     str_out.str("");
-
+
     int arri3[] = {1,2,3};
     explore::print(arri3, str_out);
     BOOST_CHECK_EQUAL(str_out.str(), "[1, 2, 3]");
@@ -32,15 +32,15 @@
 
 BOOST_AUTO_TEST_CASE( basic_c_array_stream_test )
 {
- using namespace boost;
+ using namespace explore;
     std::stringstream str_out;
-
+
     int arri1[] = {1};
     str_out << arri1;
     BOOST_CHECK_EQUAL(str_out.str(), "[1]");
-
+
     str_out.str("");
-
+
     int arri3[] = {1,2,3};
     str_out << arri3;
     BOOST_CHECK_EQUAL(str_out.str(), "[1, 2, 3]");
@@ -60,7 +60,7 @@
     BOOST_CHECK_EQUAL(str_out.str(), "[[1, 2, 3]]");
 
     str_out.str("");
-
+
     std::vector<int> arrvi3[] = {vi,vi,vi};
     explore::print(arrvi3, str_out);
     BOOST_CHECK_EQUAL(str_out.str(), "[[1, 2, 3], [1, 2, 3], [1, 2, 3]]");
@@ -68,20 +68,20 @@
 
 BOOST_AUTO_TEST_CASE( vector_in_c_array_stream_test )
 {
- using namespace boost;
- std::stringstream str_out;
-
+ using namespace explore;
+ std::stringstream str_out;
+
     std::vector<int> vi;
     vi.push_back(1);
     vi.push_back(2);
     vi.push_back(3);
-
+
     std::vector<int> arrvi1[] = {vi};
     str_out << arrvi1;
     BOOST_CHECK_EQUAL(str_out.str(), "[[1, 2, 3]]");
-
+
     str_out.str("");
-
+
     std::vector<int> arrvi3[] = {vi,vi,vi};
     str_out << arrvi3;
     BOOST_CHECK_EQUAL(str_out.str(), "[[1, 2, 3], [1, 2, 3], [1, 2, 3]]");

Modified: sandbox/explore/libs/explore/test/std_deque.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/std_deque.cpp (original)
+++ sandbox/explore/libs/explore/test/std_deque.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -49,7 +49,6 @@
 
 BOOST_AUTO_TEST_CASE( basic_deque_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::deque<int> di;
@@ -119,7 +118,6 @@
 
 BOOST_AUTO_TEST_CASE( deque_in_deque_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::deque<int> di;

Modified: sandbox/explore/libs/explore/test/std_list.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/std_list.cpp (original)
+++ sandbox/explore/libs/explore/test/std_list.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -50,7 +50,6 @@
 
 BOOST_AUTO_TEST_CASE( basic_list_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::list<std::complex<double> > lc;
@@ -120,7 +119,6 @@
 
 BOOST_AUTO_TEST_CASE( list_in_list_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::list<int> li;

Modified: sandbox/explore/libs/explore/test/std_map.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/std_map.cpp (original)
+++ sandbox/explore/libs/explore/test/std_map.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -50,7 +50,6 @@
 
 BOOST_AUTO_TEST_CASE( basic_map_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::map<int,std::string> mis;
@@ -122,7 +121,6 @@
 
 BOOST_AUTO_TEST_CASE( basic_multimap_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::multimap<int,std::string> mmis;
@@ -199,7 +197,6 @@
 
 BOOST_AUTO_TEST_CASE( vector_in_map_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::vector<int> vi;

Modified: sandbox/explore/libs/explore/test/std_pair.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/std_pair.cpp (original)
+++ sandbox/explore/libs/explore/test/std_pair.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -25,7 +25,6 @@
 
 BOOST_AUTO_TEST_CASE( basic_pair_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::pair<int,int> pi = std::make_pair(1,2);
@@ -62,7 +61,6 @@
 
 BOOST_AUTO_TEST_CASE( pair_in_vector_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::vector<std::pair<int,int> > vpi;

Modified: sandbox/explore/libs/explore/test/std_set.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/std_set.cpp (original)
+++ sandbox/explore/libs/explore/test/std_set.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -49,7 +49,6 @@
 
 BOOST_AUTO_TEST_CASE( basic_set_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::set<int> si;
@@ -121,7 +120,6 @@
 
 BOOST_AUTO_TEST_CASE( basic_multiset_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::multiset<int> msi;
@@ -198,7 +196,6 @@
 
 BOOST_AUTO_TEST_CASE( vector_in_set_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     std::vector<int> vi;

Modified: sandbox/explore/libs/explore/test/std_vector.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/std_vector.cpp (original)
+++ sandbox/explore/libs/explore/test/std_vector.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -28,7 +28,7 @@
         
     vi.push_back(1);
     explore::print(vi, str_out);
- BOOST_CHECK_EQUAL(sŒtr_out.str(), "[1]");
+ BOOST_CHECK_EQUAL(str_out.str(), "[1]");
         
     str_out.str("");
         
@@ -36,14 +36,14 @@
     vi.push_back(3);
     explore::print(vi, str_out);
     BOOST_CHECK_EQUAL(str_out.str(), "[1, 2, 3]");
-
+
     str_out.str("");
-
+
     explore::print(vi.begin(), ++(++vi.begin()), str_out);
     BOOST_CHECK_EQUAL(str_out.str(), "[1, 2]");
-
+
     str_out.str("");
-
+
     explore::print(boost::make_iterator_range(vi.begin(), ++(++vi.begin())), str_out);
     BOOST_CHECK_EQUAL(str_out.str(), "[1, 2]");
         
@@ -55,7 +55,6 @@
 
 BOOST_AUTO_TEST_CASE( basic_vector_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
         
     std::vector<int> vi;
@@ -74,14 +73,14 @@
     vi.push_back(3);
     str_out << vi;
     BOOST_CHECK_EQUAL(str_out.str(), "[1, 2, 3]");
-
+
     //str_out.str("");
-
+
     //explore::print(vi.begin(), ++(++vi.begin()), str_out);
     //BOOST_CHECK_EQUAL(str_out.str(), "[1, 2]");
-
+
     //str_out.str("");
-
+
     //explore::print(boost::make_iterator_range(vi.begin(), ++(++vi.begin())), str_out);
     //BOOST_CHECK_EQUAL(str_out.str(), "[1, 2]");
 }
@@ -111,21 +110,20 @@
     vvi.push_back(vi);
     explore::print(vvi, str_out);
     BOOST_CHECK_EQUAL(str_out.str(), "[[1, 2, 3], [1, 2, 3], [1, 2, 3]]");
-
+
     str_out.str("");
-
+
     explore::print(vvi.begin(), ++(++vvi.begin()), str_out);
     BOOST_CHECK_EQUAL(str_out.str(), "[[1, 2, 3], [1, 2, 3]]");
-
+
     str_out.str("");
-
+
     explore::print(boost::make_iterator_range(vvi.begin(), ++(++vvi.begin())), str_out);
     BOOST_CHECK_EQUAL(str_out.str(), "[[1, 2, 3], [1, 2, 3]]");
 }
 
 BOOST_AUTO_TEST_CASE( vector_in_vector_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
         
     std::vector<int> vi;
@@ -149,14 +147,14 @@
     vvi.push_back(vi);
     str_out << vvi;
     BOOST_CHECK_EQUAL(str_out.str(), "[[1, 2, 3], [1, 2, 3], [1, 2, 3]]");
-
+
     //str_out.str("");
-
+
     //explore::print(vvi.begin(), ++(++vvi.begin()), str_out);
     //BOOST_CHECK_EQUAL(str_out.str(), "[[1, 2, 3], [1, 2, 3]]");
-
+
     //str_out.str("");
-
+
     //explore::print(boost::make_iterator_range(vvi.begin(), ++(++vvi.begin())), str_out);
     //BOOST_CHECK_EQUAL(str_out.str(), "[[1, 2, 3], [1, 2, 3]]");
 }
@@ -175,7 +173,6 @@
 
 BOOST_AUTO_TEST_CASE( vector_with_ugly_string_case_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
         
     std::vector<std::string> vs;

Modified: sandbox/explore/libs/explore/test/user_defined_container.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/user_defined_container.cpp (original)
+++ sandbox/explore/libs/explore/test/user_defined_container.cpp 2007-05-27 09:50:05 EDT (Sun, 27 May 2007)
@@ -40,7 +40,7 @@
 
 std::ostream& operator<<(std::ostream& ostr, const user_vector& u)
 {
- return boost::stream_container(ostr, u.start(), u.finish());
+ return explore::stream_container(ostr, u.start(), u.finish());
 }
 
 BOOST_AUTO_TEST_CASE( user_defined_print_test )
@@ -54,7 +54,6 @@
 
 BOOST_AUTO_TEST_CASE( user_defined_stream_test )
 {
- using namespace boost;
     std::stringstream str_out;
 
     user_vector v;


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