stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r687231 - in /stdcxx/branches/4.2.x/examples: manual/ tutorial/
Date Wed, 20 Aug 2008 03:46:32 GMT
Author: sebor
Date: Tue Aug 19 20:46:29 2008
New Revision: 687231

URL: http://svn.apache.org/viewvc?rev=687231&view=rev
Log:
2008-08-19  Martin Sebor  <sebor@apache.org>

	STDCXX-1007
	* examples/tutorial/graph.cpp: Globally replaced all occurrences
	of the std::cout manipulator with '\n' to silence HP aCC 6.16
	warning #4320-D: performance advice: std::endl is expensive
	because it flushes the stream.
	* examples/tutorial/calc.cpp: Ditto.
	* examples/tutorial/complx.cpp: Ditto.
	* examples/tutorial/radix.cpp: Ditto.
	* examples/tutorial/sieve.cpp: Ditto.
	* examples/tutorial/spell.cpp: Ditto.
	* examples/tutorial/widwork.cpp: Ditto.
	* examples/tutorial/alg4.cpp: Ditto.
	* examples/tutorial/teller.cpp: Ditto.
	* examples/tutorial/alg5.cpp: Ditto.
	* examples/tutorial/alg6.cpp: Ditto.
	* examples/tutorial/tele.cpp: Ditto.
	* examples/manual/heap_ops.cpp: Ditto.
	* examples/manual/num_get.cpp: Ditto.
	* examples/manual/rotate.cpp: Ditto.
	* examples/manual/stream_iterator.cpp: Ditto.
	* examples/manual/mismatch.cpp: Ditto.
	* examples/manual/includes.cpp: Ditto.
	* examples/manual/find_end.cpp: Ditto.
	* examples/manual/messages.cpp: Ditto.
	* examples/manual/permutation.cpp: Ditto.
	* examples/manual/codecvt1.cpp: Ditto.
	* examples/manual/find_first_of.cpp: Ditto.
	* examples/manual/replace.cpp: Ditto.
	* examples/manual/map.cpp: Ditto.
	* examples/manual/partial_sum.cpp: Ditto.
	* examples/manual/max.cpp: Ditto.
	* examples/manual/fill.cpp: Ditto.
	* examples/manual/setex.cpp: Ditto.
	* examples/manual/time_get.cpp: Ditto.
	* examples/manual/remove.cpp: Ditto.
	* examples/manual/auto_ptr.cpp: Ditto.
	* examples/manual/use_facet.cpp: Ditto.
	* examples/manual/funct_ob.cpp: Ditto.
	* examples/manual/mutex.cpp: Ditto.
	* examples/manual/stringbuf.cpp: Ditto.
	* examples/manual/string.cpp: Ditto.
	* examples/manual/complex.cpp: Ditto.
	* examples/manual/isalnum.cpp: Ditto.
	* examples/manual/swap.cpp: Ditto.
	* examples/manual/priority_queue.cpp: Ditto.
	* examples/manual/adj_diff.cpp: Ditto.
	* examples/manual/multimap.cpp: Ditto.
	* examples/manual/pnt2fnct.cpp: Ditto.
	* examples/manual/locale.cpp: Ditto.
	* examples/manual/indirect_array.cpp: Ditto.
	* examples/manual/negator.cpp: Ditto.
	* examples/manual/moneypunct.cpp: Ditto.
	* examples/manual/advance.cpp: Ditto.
	* examples/manual/wostream.cpp: Ditto.
	* examples/manual/deque.cpp: Ditto.
	* examples/manual/partial_sort.cpp: Ditto.
	* examples/manual/multiset.cpp: Ditto.
	* examples/manual/copyex.cpp: Ditto.
	* examples/manual/equal.cpp: Ditto.
	* examples/manual/partition.cpp: Ditto.
	* examples/manual/inner_product.cpp: Ditto.
	* examples/manual/reverse.cpp: Ditto.
	* examples/manual/transform.cpp: Ditto.
	* examples/manual/moneyput.cpp: Ditto.
	* examples/manual/find.cpp: Ditto.
	* examples/manual/equal_range.cpp: Ditto.
	* examples/manual/ctype.cpp: Ditto.
	* examples/manual/queue.cpp: Ditto.
	* examples/manual/reverse_iterator.cpp: Ditto.
	* examples/manual/max_elem.cpp: Ditto.
	* examples/manual/mask_array.cpp: Ditto.
	* examples/manual/generate.cpp: Ditto.
	* examples/manual/istringstream.cpp: Ditto.
	* examples/manual/slice_array.cpp: Ditto.
	* examples/manual/lex_compare.cpp: Ditto.
	* examples/manual/gslice_array.cpp: Ditto.
	* examples/manual/for_each.cpp: Ditto.
	* examples/manual/unique.cpp: Ditto.
	* examples/manual/insert_iterator.cpp: Ditto.
	* examples/manual/accumulate.cpp: Ditto.
	* examples/manual/binders.cpp: Ditto.

Modified:
    stdcxx/branches/4.2.x/examples/manual/accumulate.cpp
    stdcxx/branches/4.2.x/examples/manual/adj_diff.cpp
    stdcxx/branches/4.2.x/examples/manual/advance.cpp
    stdcxx/branches/4.2.x/examples/manual/auto_ptr.cpp
    stdcxx/branches/4.2.x/examples/manual/binders.cpp
    stdcxx/branches/4.2.x/examples/manual/codecvt1.cpp
    stdcxx/branches/4.2.x/examples/manual/complex.cpp
    stdcxx/branches/4.2.x/examples/manual/copyex.cpp
    stdcxx/branches/4.2.x/examples/manual/ctype.cpp
    stdcxx/branches/4.2.x/examples/manual/deque.cpp
    stdcxx/branches/4.2.x/examples/manual/equal.cpp
    stdcxx/branches/4.2.x/examples/manual/equal_range.cpp
    stdcxx/branches/4.2.x/examples/manual/fill.cpp
    stdcxx/branches/4.2.x/examples/manual/find.cpp
    stdcxx/branches/4.2.x/examples/manual/find_end.cpp
    stdcxx/branches/4.2.x/examples/manual/find_first_of.cpp
    stdcxx/branches/4.2.x/examples/manual/for_each.cpp
    stdcxx/branches/4.2.x/examples/manual/funct_ob.cpp
    stdcxx/branches/4.2.x/examples/manual/generate.cpp
    stdcxx/branches/4.2.x/examples/manual/gslice_array.cpp
    stdcxx/branches/4.2.x/examples/manual/heap_ops.cpp
    stdcxx/branches/4.2.x/examples/manual/includes.cpp
    stdcxx/branches/4.2.x/examples/manual/indirect_array.cpp
    stdcxx/branches/4.2.x/examples/manual/inner_product.cpp
    stdcxx/branches/4.2.x/examples/manual/insert_iterator.cpp
    stdcxx/branches/4.2.x/examples/manual/isalnum.cpp
    stdcxx/branches/4.2.x/examples/manual/istringstream.cpp
    stdcxx/branches/4.2.x/examples/manual/lex_compare.cpp
    stdcxx/branches/4.2.x/examples/manual/locale.cpp
    stdcxx/branches/4.2.x/examples/manual/map.cpp
    stdcxx/branches/4.2.x/examples/manual/mask_array.cpp
    stdcxx/branches/4.2.x/examples/manual/max.cpp
    stdcxx/branches/4.2.x/examples/manual/max_elem.cpp
    stdcxx/branches/4.2.x/examples/manual/messages.cpp
    stdcxx/branches/4.2.x/examples/manual/mismatch.cpp
    stdcxx/branches/4.2.x/examples/manual/moneypunct.cpp
    stdcxx/branches/4.2.x/examples/manual/moneyput.cpp
    stdcxx/branches/4.2.x/examples/manual/multimap.cpp
    stdcxx/branches/4.2.x/examples/manual/multiset.cpp
    stdcxx/branches/4.2.x/examples/manual/mutex.cpp
    stdcxx/branches/4.2.x/examples/manual/negator.cpp
    stdcxx/branches/4.2.x/examples/manual/num_get.cpp
    stdcxx/branches/4.2.x/examples/manual/partial_sort.cpp
    stdcxx/branches/4.2.x/examples/manual/partial_sum.cpp
    stdcxx/branches/4.2.x/examples/manual/partition.cpp
    stdcxx/branches/4.2.x/examples/manual/permutation.cpp
    stdcxx/branches/4.2.x/examples/manual/pnt2fnct.cpp
    stdcxx/branches/4.2.x/examples/manual/priority_queue.cpp
    stdcxx/branches/4.2.x/examples/manual/queue.cpp
    stdcxx/branches/4.2.x/examples/manual/remove.cpp
    stdcxx/branches/4.2.x/examples/manual/replace.cpp
    stdcxx/branches/4.2.x/examples/manual/reverse.cpp
    stdcxx/branches/4.2.x/examples/manual/reverse_iterator.cpp
    stdcxx/branches/4.2.x/examples/manual/rotate.cpp
    stdcxx/branches/4.2.x/examples/manual/setex.cpp
    stdcxx/branches/4.2.x/examples/manual/slice_array.cpp
    stdcxx/branches/4.2.x/examples/manual/stream_iterator.cpp
    stdcxx/branches/4.2.x/examples/manual/string.cpp
    stdcxx/branches/4.2.x/examples/manual/stringbuf.cpp
    stdcxx/branches/4.2.x/examples/manual/swap.cpp
    stdcxx/branches/4.2.x/examples/manual/time_get.cpp
    stdcxx/branches/4.2.x/examples/manual/transform.cpp
    stdcxx/branches/4.2.x/examples/manual/unique.cpp
    stdcxx/branches/4.2.x/examples/manual/use_facet.cpp
    stdcxx/branches/4.2.x/examples/manual/wostream.cpp
    stdcxx/branches/4.2.x/examples/tutorial/alg4.cpp
    stdcxx/branches/4.2.x/examples/tutorial/alg5.cpp
    stdcxx/branches/4.2.x/examples/tutorial/alg6.cpp
    stdcxx/branches/4.2.x/examples/tutorial/calc.cpp
    stdcxx/branches/4.2.x/examples/tutorial/complx.cpp
    stdcxx/branches/4.2.x/examples/tutorial/graph.cpp
    stdcxx/branches/4.2.x/examples/tutorial/radix.cpp
    stdcxx/branches/4.2.x/examples/tutorial/sieve.cpp
    stdcxx/branches/4.2.x/examples/tutorial/spell.cpp
    stdcxx/branches/4.2.x/examples/tutorial/tele.cpp
    stdcxx/branches/4.2.x/examples/tutorial/teller.cpp
    stdcxx/branches/4.2.x/examples/tutorial/widwork.cpp

Modified: stdcxx/branches/4.2.x/examples/manual/accumulate.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/accumulate.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/accumulate.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/accumulate.cpp Tue Aug 19 20:46:29 2008
@@ -57,7 +57,7 @@
 
     std::cout << "where N = " << v1.size ()
               << "\nThe sum = (N * N + N) / 2 = " << sum
-              << "\nThe product = N! = " << prod << std::endl;
+              << "\nThe product = N! = " << prod << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/adj_diff.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/adj_diff.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/adj_diff.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/adj_diff.cpp Tue Aug 19 20:46:29 2008
@@ -66,22 +66,22 @@
     os_iter osit (std::cout, " ");
 
     // Output the results.
-    std::cout << "For the vector: " << std::endl << "     ";
+    std::cout << "For the vector: " << '\n' << "     ";
     std::copy (v.begin (), v.end (), osit);
 
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     std::cout << "The differences between adjacent elements are: "
-              << std::endl << "    ";
+              << '\n' << "    ";
 
     std::copy (diffs.begin (), diffs.end (), osit);
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     std::cout << "The products of adjacent elements are: "
-              << std::endl << "     ";
+              << '\n' << "     ";
 
     std::copy (prods.begin (), prods.end (), osit);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/advance.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/advance.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/advance.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/advance.cpp Tue Aug 19 20:46:29 2008
@@ -51,14 +51,14 @@
     std::cout << "For the list: ";
     std::copy (l.begin (), l.end (), os_iter (std::cout, " "));
 
-    std::cout << std::endl << std::endl
+    std::cout << '\n' << std::endl
               << "When the iterator is initialized to l.begin ()," 
-              << "\nit points to " << *itr << std::endl;
+              << "\nit points to " << *itr << '\n';
 
     // operator+ is not available for a ForwardIterator, so use advance.
     std::advance (itr, 4);
     std::cout << "\nAfter advance (itr, 4), the iterator points to "
-              << *itr << std::endl;
+              << *itr << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/auto_ptr.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/auto_ptr.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/auto_ptr.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/auto_ptr.cpp Tue Aug 19 20:46:29 2008
@@ -40,11 +40,11 @@
 public:
 
     X (int i) : i_ (i) {
-        std::cout << "X::X (" << i_ << ')' << std::endl;
+        std::cout << "X::X (" << i_ << ')' << '\n';
     }
 
     ~X () {
-        std::cout << "X::~X [" << i_ << ']' << std::endl;
+        std::cout << "X::~X [" << i_ << ']' << '\n';
     }
 
     int get () const { return i_; }
@@ -65,13 +65,13 @@
         a = b;
     }
 
-    std::cout << "b destroyed" << std::endl;
+    std::cout << "b destroyed" << '\n';
 
         // Output the value contained by the underlying pointer.
 #ifndef _RWSTD_NO_NONCLASS_ARROW_RETURN
-        std::cout << a->get () << std::endl;
+        std::cout << a->get () << '\n';
 #else
-        std::cout << (*a).get () << std::endl;
+        std::cout << (*a).get () << '\n';
 #endif
 
     // The pointer will be delete'd when a is destroyed on leaving scope.

Modified: stdcxx/branches/4.2.x/examples/manual/binders.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/binders.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/binders.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/binders.cpp Tue Aug 19 20:46:29 2008
@@ -64,7 +64,7 @@
                       std::bind2nd (equal_to (), 3)); 
 
     // Output results.
-    std::cout << *it1 << " " << *it2 << " " << *it3 << std::endl;
+    std::cout << *it1 << " " << *it2 << " " << *it3 << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/codecvt1.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/codecvt1.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/codecvt1.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/codecvt1.cpp Tue Aug 19 20:46:29 2008
@@ -211,12 +211,12 @@
        do_diff_conversion ();
     }
     catch (const std::exception &e) {
-        std::cout << "Caught an exception: " << e.what () << std::endl;
+        std::cout << "Caught an exception: " << e.what () << '\n';
 
         return 1;   // Indicate failure.
     }
     catch (...) {
-        std::cout << "Caught an unknown exception" << std::endl;
+        std::cout << "Caught an unknown exception" << '\n';
 
         return 1;   // Indicate failure.
     }

Modified: stdcxx/branches/4.2.x/examples/manual/complex.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/complex.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/complex.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/complex.cpp Tue Aug 19 20:46:29 2008
@@ -45,7 +45,7 @@
 
     // Output result in fixed notation.
     std::cout.setf (std::ios::fixed, std::ios::floatfield);
-    std::cout << "a = " << a << ", b = " << b << std::endl;
+    std::cout << "a = " << a << ", b = " << b << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/copyex.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/copyex.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/copyex.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/copyex.cpp Tue Aug 19 20:46:29 2008
@@ -66,16 +66,16 @@
         out (std::cout, " ");
 
     std::copy (v1.begin (), v1.end (), out);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     std::copy (v2.begin (), v2.end (), out);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     std::copy (v3.begin (), v3.end (), out);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     std::copy (v4.begin (), v4.end (), out);
-    std::cout << std::endl;
+    std::cout << '\n';
    
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/ctype.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/ctype.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/ctype.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/ctype.cpp Tue Aug 19 20:46:29 2008
@@ -40,17 +40,17 @@
     const std::ctype<char>& ct = std::use_facet<std::ctype<char> >(loc);
 
     // Check the classification of the 'a' character.
-    std::cout << ct.is (std::ctype_base::alpha, 'a') << std::endl;
-    std::cout << ct.is (std::ctype_base::punct, 'a') << std::endl;
+    std::cout << ct.is (std::ctype_base::alpha, 'a') << '\n';
+    std::cout << ct.is (std::ctype_base::punct, 'a') << '\n';
 
     // Scan for the first upper case character.
     std::cout << *ct.scan_is (std::ctype_base::upper,
                               s, s + sizeof s / sizeof *s)
-              << std::endl;
+              << '\n';
 
     // Convert characters to upper case.
     (ct.toupper)(s, s + sizeof s / sizeof *s);
-    std::cout << s << std::endl;
+    std::cout << s << '\n';
   
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/deque.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/deque.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/deque.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/deque.cpp Tue Aug 19 20:46:29 2008
@@ -55,7 +55,7 @@
 void print_current_hand (It start, It2 end) 
 {
     while (start < end) 
-        std::cout << *start++ << std::endl;
+        std::cout << *start++ << '\n';
 }
 
 

Modified: stdcxx/branches/4.2.x/examples/manual/equal.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/equal.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/equal.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/equal.cpp Tue Aug 19 20:46:29 2008
@@ -66,7 +66,7 @@
     std::copy (v2.begin (), v2.end (), os_iter (std::cout, " "));
 
     // Output the result.
-    std::cout << "} --> " << std::boolalpha << same << std::endl;
+    std::cout << "} --> " << std::boolalpha << same << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/equal_range.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/equal_range.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/equal_range.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/equal_range.cpp Tue Aug 19 20:46:29 2008
@@ -56,11 +56,11 @@
     // Output results.
     std::cout << "\nThe equal range for 3 is: "
               << "(" << *p1.first << " , " 
-              << *p1.second << ")" << std::endl;
+              << *p1.second << ")" << '\n';
 
     std::cout << "\nThe equal range for 2 is: "
               << "(" << *p2.first << " , " 
-              << *p2.second << ")" << std::endl; 
+              << *p2.second << ")" << '\n'; 
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/fill.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/fill.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/fill.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/fill.cpp Tue Aug 19 20:46:29 2008
@@ -63,17 +63,17 @@
                           std::char_traits<char> > out (std::cout, " ");
 
     std::copy (v1.begin (), v1.end (), out);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     std::copy (v2.begin (), v2.end (), out);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     std::copy (v3.begin (), v3.end (), out);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Fill cout with 3 5's.
     std::fill_n (out, 3, 5);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/find.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/find.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/find.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/find.cpp Tue Aug 19 20:46:29 2008
@@ -64,7 +64,7 @@
     it = std::adjacent_find (v1.begin (), v1.end (),
                              std::equal_to<Vector::value_type>());
 
-    std::cout << *it << std::endl;
+    std::cout << *it << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/find_end.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/find_end.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/find_end.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/find_end.cpp Tue Aug 19 20:46:29 2008
@@ -79,14 +79,14 @@
         std::copy (l2.begin (), l2.end (), out);
              
         std::cout << "} \nboth versions of find_first_of point to: "
-                  << *it1 << std::endl;
+                  << *it1 << '\n';
 
         // Output results of find_end.
         // Iterator now points to the first element of the last
         // find subsequence.
 
         std::cout << "both versions of find_end point to: "
-                  << *it3 << std::endl;
+                  << *it3 << '\n';
     }
 
     return 0;

Modified: stdcxx/branches/4.2.x/examples/manual/find_first_of.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/find_first_of.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/find_first_of.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/find_first_of.cpp Tue Aug 19 20:46:29 2008
@@ -67,7 +67,7 @@
     std::copy (v2.begin (), v2.end (), out);
 
     std::cout << "}\nboth versions of find_first_of point to: "
-              << *it1 << std::endl; 
+              << *it1 << '\n'; 
 
     // Return 0 on success, non-0 on failure.
     return !(*it1 == *it2);

Modified: stdcxx/branches/4.2.x/examples/manual/for_each.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/for_each.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/for_each.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/for_each.cpp Tue Aug 19 20:46:29 2008
@@ -44,7 +44,7 @@
     out_times_x (const Arg &x) : multiplier (x) { }
 
     void operator() (const Arg &x) const {
-        std::cout << x * multiplier << " " << std::endl;
+        std::cout << x * multiplier << " " << '\n';
     }
 };
 

Modified: stdcxx/branches/4.2.x/examples/manual/funct_ob.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/funct_ob.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/funct_ob.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/funct_ob.cpp Tue Aug 19 20:46:29 2008
@@ -80,10 +80,10 @@
                           char, 
                           std::char_traits<char> > outv (std::cout, " ");
 
-    std::cout << std::endl;
+    std::cout << '\n';
     std::cout << "\nHave the factorials: \n     ";
     std::copy (v.begin (), v.end (), outv);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/generate.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/generate.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/generate.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/generate.cpp Tue Aug 19 20:46:29 2008
@@ -80,17 +80,17 @@
                           std::char_traits<char> > out (std::cout, " ");
 
     std::copy (v1.begin (), v1.end (), out);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     std::copy (v2.begin (), v2.end (), out);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     std::copy (v3.begin (), v3.end (), out);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Generate 3 values into cout.
     std::generate_n (out, 3, gen);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/gslice_array.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/gslice_array.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/gslice_array.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/gslice_array.cpp Tue Aug 19 20:46:29 2008
@@ -64,7 +64,7 @@
       *= static_cast<valarray_t > (vi[std::gslice(2,length_val,stride_val)]);
 
   std::cout << "vi[gslice(0,[4,2],[4,8])] *= vi[gslice(2,[4,2],[4,6])]\n\n"
-            << vi << std::endl;
+            << vi << '\n';
 
   return 0;
 

Modified: stdcxx/branches/4.2.x/examples/manual/heap_ops.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/heap_ops.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/heap_ops.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/heap_ops.cpp Tue Aug 19 20:46:29 2008
@@ -42,7 +42,7 @@
     std::copy (v.begin (), v.end (),
                std::ostream_iterator<T, charT, Traits> (strm, " "));
 
-    strm << std::endl;
+    strm << '\n';
 }
 
 

Modified: stdcxx/branches/4.2.x/examples/manual/includes.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/includes.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/includes.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/includes.cpp Tue Aug 19 20:46:29 2008
@@ -57,18 +57,18 @@
     bool answer = std::includes (all.begin (), all.end (), 
                                  other.begin (), other.end ());
 
-    std::cout << std::endl << (answer ? "INCLUDES " : "DOES NOT INCLUDE ");
+    std::cout << '\n' << (answer ? "INCLUDES " : "DOES NOT INCLUDE ");
     std::copy (other.begin (), other.end (), os_iter (std::cout, " "));
 
     answer = std::includes (all.begin (), all.end (),
                             even.begin (), even.end ());
 
-    std::cout << ", and" << std::endl
+    std::cout << ", and" << '\n'
               << (answer ? "INCLUDES" : "DOES NOT INCLUDE ");
 
     std::copy (even.begin (), even.end (), os_iter (std::cout, " "));
 
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/indirect_array.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/indirect_array.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/indirect_array.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/indirect_array.cpp Tue Aug 19 20:46:29 2008
@@ -53,7 +53,7 @@
   vi[selector] += vi[selector];
 
   // Print out the modified valarray.
-  std::cout << "vi[0,2,3,4,7,8] += vi[0,2,3,4,7,8]\n\n" << vi << std::endl;
+  std::cout << "vi[0,2,3,4,7,8] += vi[0,2,3,4,7,8]\n\n" << vi << '\n';
 
   return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/inner_product.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/inner_product.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/inner_product.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/inner_product.cpp Tue Aug 19 20:46:29 2008
@@ -69,7 +69,7 @@
 
     std::cout << "}\nThe inner product is: " << prod
               << "\nThe wacky result is:  " << wacky
-              << std::endl;
+              << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/insert_iterator.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/insert_iterator.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/insert_iterator.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/insert_iterator.cpp Tue Aug 19 20:46:29 2008
@@ -74,7 +74,7 @@
     std::cout << "\n\nUse a back_inserter: \n     ";
     std::copy (d.begin (), d.end (), os_iter (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
    
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/isalnum.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/isalnum.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/isalnum.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/isalnum.cpp Tue Aug 19 20:46:29 2008
@@ -40,7 +40,7 @@
         if ((std::isalnum)(c, std::cout.getloc ()))
             std::cout << c << ' ';
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/istringstream.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/istringstream.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/istringstream.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/istringstream.cpp Tue Aug 19 20:46:29 2008
@@ -51,7 +51,7 @@
         out.exceptions (std::ios::failbit | std::ios::badbit);
 
         // write string into out
-        out << L"Il avait l'air heureux." << std::endl;
+        out << L"Il avait l'air heureux." << '\n';
 
         // seek to the beginning of the stream
         in.seekg (0);
@@ -61,12 +61,12 @@
         // output each space-separated word on a separate line
         while (in.get (c)) {
             if ((std::isspace)(c, in.getloc ())) 
-                std::wcout << std::endl;
+                std::wcout << '\n';
             else
                 std::wcout.put(c);
         }
 
-        std::wcout << std::endl;
+        std::wcout << '\n';
 
         // clear stream state, failbit | eofbit set by last call to get ()
         in.clear ();
@@ -86,10 +86,10 @@
         // output each word on a separate line in a field of width 10
         while (in >> buf) {
             std::wcout.width (10);
-            std::wcout << buf << std::endl;
+            std::wcout << buf << '\n';
         }
     
-        std::wcout << std::endl;
+        std::wcout << '\n';
 
         // clear flags, last in >> buf set fail bit
         // because of a newline at end of string
@@ -103,19 +103,19 @@
         const long l = 10;
         
         // output l in hex with a field with of 10 
-        out << std::hex << std::setw (10) << l << std::endl;
+        out << std::hex << std::setw (10) << l << '\n';
 
         // output l in oct with a field with of 10
-        out << std::oct << std::setw (10) << l << std::endl;
+        out << std::oct << std::setw (10) << l << '\n';
 
         // output l in dec with a field with of 10
-        out << std::dec << std::setw (10) << l << std::endl;
+        out << std::dec << std::setw (10) << l << '\n';
 
         // move back to the beginning of the stream
         in.seekg (0);
 
         // output the entire stream
-        std::wcout << in.rdbuf () << std::endl;
+        std::wcout << in.rdbuf () << '\n';
 
         // clear the flags 
         in.clear (); 
@@ -131,11 +131,11 @@
         in >> a >> b >> d;
 
         // output 3 times 10
-        std::wcout << a << std::endl << b << std::endl << d << std::endl;
+        std::wcout << a << '\n' << b << std::endl << d << std::endl;
 
     }
     catch (std::ios::failure &e) {
-        std::wcerr << e.what () << std::endl;
+        std::wcerr << e.what () << '\n';
     }
  
     return 0;

Modified: stdcxx/branches/4.2.x/examples/manual/lex_compare.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/lex_compare.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/lex_compare.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/lex_compare.cpp Tue Aug 19 20:46:29 2008
@@ -54,7 +54,7 @@
                                             v1.begin (), v1.end (),
                                             std::less<int>());
     std::cout << std::boolalpha << b1
-              << " " << b2 << std::endl;
+              << " " << b2 << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/locale.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/locale.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/locale.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/locale.cpp Tue Aug 19 20:46:29 2008
@@ -56,10 +56,10 @@
 
     // imbue modified locale onto cout
     std::locale old = std::cout.imbue (my_loc);
-    std::cout << "A \x93 jolly time was had by all" << std::endl;
+    std::cout << "A \x93 jolly time was had by all" << '\n';
 
     std::cout.imbue (old);
-    std::cout << "A jolly time was had by all" << std::endl;
+    std::cout << "A jolly time was had by all" << '\n';
 
     // Create a vector of strings 
     std::vector<std::string, std::allocator<std::string> > v;
@@ -71,14 +71,14 @@
         Iter;
 
     std::copy (v.begin (), v.end (), Iter (std::cout, " "));
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Sort the strings using the locale as a comparitor
     std::sort (v.begin (), v.end (), loc);
 
     std::copy (v.begin (), v.end (), Iter (std::cout," "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/map.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/map.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/map.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/map.cpp Tue Aug 19 20:46:29 2008
@@ -73,14 +73,14 @@
     months.insert (value_type (std::string ("December"),  31));
 
     // Print out the months.  Second Febuary is not present.
-    std::cout << months << std::endl;
+    std::cout << months << '\n';
 
     // Find the Number of days in June.
     months_type::iterator p = months.find (std::string ("June"));
 
     // Print out the number of days in June.
     if (p != months.end ())
-        std::cout << std::endl << (*p).first << " has "
+        std::cout << '\n' << (*p).first << " has "
                   << (*p).second << " days\n";
   
     return 0;

Modified: stdcxx/branches/4.2.x/examples/manual/mask_array.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/mask_array.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/mask_array.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/mask_array.cpp Tue Aug 19 20:46:29 2008
@@ -54,7 +54,7 @@
 
   // Double the values of the masked array and print out.
   vi[mask] += static_cast<valarray_t> (vi[mask]);
-  std::cout << "vi[mask] += vi[mask]\n\n" << vi << std::endl;
+  std::cout << "vi[mask] += vi[mask]\n\n" << vi << '\n';
 
   return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/max.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/max.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/max.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/max.cpp Tue Aug 19 20:46:29 2008
@@ -55,7 +55,7 @@
     double val4 = std::max(d1, d2, std::less<double>());
 
     std::cout << val1 << " " << val2 << " "
-              << val3 << " " << val4 << std::endl;
+              << val3 << " " << val4 << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/max_elem.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/max_elem.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/max_elem.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/max_elem.cpp Tue Aug 19 20:46:29 2008
@@ -58,7 +58,7 @@
                                      std::less<int>());
 
     std::cout << *it1 << " " << *it2 << " "
-              << *it3 << " " << *it4 << std::endl;
+              << *it3 << " " << *it4 << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/messages.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/messages.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/messages.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/messages.cpp Tue Aug 19 20:46:29 2008
@@ -63,7 +63,7 @@
         msgs.close (cat);
     }
     else
-        std::cerr << "Unable to open message catalog" << std::endl;
+        std::cerr << "Unable to open message catalog" << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/mismatch.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/mismatch.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/mismatch.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/mismatch.cpp Tue Aug 19 20:46:29 2008
@@ -61,8 +61,8 @@
                        vi2.begin (), std::less_equal<int>());
 
     // Output results.
-    std::cout << *p1.first << ", " << *p1.second << std::endl;
-    std::cout << *p2.first << ", " << *p2.second << std::endl;
+    std::cout << *p1.first << ", " << *p1.second << '\n';
+    std::cout << *p2.first << ", " << *p2.second << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/moneypunct.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/moneypunct.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/moneypunct.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/moneypunct.cpp Tue Aug 19 20:46:29 2008
@@ -96,7 +96,7 @@
                   << ")";
     }
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/moneyput.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/moneyput.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/moneyput.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/moneyput.cpp Tue Aug 19 20:46:29 2008
@@ -55,10 +55,10 @@
     mp.put (begin, false, std::cout, ' ', buffer);
 
     // Put out the long double representation of the monetary value
-    std::cout << std::endl << ldval << " --> ";
+    std::cout << '\n' << ldval << " --> ";
     mp.put (begin, false, std::cout, ' ', ldval);
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/multimap.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/multimap.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/multimap.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/multimap.cpp Tue Aug 19 20:46:29 2008
@@ -72,7 +72,7 @@
     months.insert (value_type (31, std::string ("December")));
 
     // Print out the months.
-    std::cout << "All months of the year\n" << months << std::endl;
+    std::cout << "All months of the year\n" << months << '\n';
 
     // Find all months with 30 days.
     std::pair<months_type::iterator, months_type::iterator> p = 

Modified: stdcxx/branches/4.2.x/examples/manual/multiset.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/multiset.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/multiset.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/multiset.cpp Tue Aug 19 20:46:29 2008
@@ -73,27 +73,27 @@
     }
 
     // Print out the multiset.
-    std::cout << si << std::endl;
+    std::cout << si << '\n';
 
     // Make another multiset and an empty multiset.
     IntSet si2, result;
     for (IntSet::value_type i = 0; i < 10; i++)
         si2.insert (i + 5);
 
-    std::cout << si2 << std::endl;
+    std::cout << si2 << '\n';
 
     // Try a couple of set algorithms.
     std::set_union (si.begin (), si.end (), si2.begin (), si2.end (),
                     std::inserter (result, result.begin ()));
 
-    std::cout << "Union:\n" << result << std::endl;
+    std::cout << "Union:\n" << result << '\n';
 
     result.erase (result.begin (), result.end ());
 
     std::set_intersection (si.begin (), si.end (), si2.begin (), si2.end (),
                           std::inserter (result, result.begin ()));
 
-    std::cout << "Intersection:\n" << result << std::endl;
+    std::cout << "Intersection:\n" << result << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/mutex.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/mutex.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/mutex.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/mutex.cpp Tue Aug 19 20:46:29 2008
@@ -88,11 +88,11 @@
     increment_shared();
     decrement_shared();
 
-    std::cout << "Multi Threading enabled" << std::endl;
+    std::cout << "Multi Threading enabled" << '\n';
 
 #else   // if !defined (_RWSTD_REENTRANT)
 
-    std::cout << "Multi Threading not enabled" << std::endl;
+    std::cout << "Multi Threading not enabled" << '\n';
 
 #endif   // _RWSTD_REENTRANT
 

Modified: stdcxx/branches/4.2.x/examples/manual/negator.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/negator.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/negator.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/negator.cpp Tue Aug 19 20:46:29 2008
@@ -63,7 +63,7 @@
     std::cout << odd (1) << '\n'
               << odd (4) << '\n'
               << std::not1 (odd)(1) << '\n'
-              << std::not1 (odd)(4) << std::endl;
+              << std::not1 (odd)(4) << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/num_get.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/num_get.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/num_get.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/num_get.cpp Tue Aug 19 20:46:29 2008
@@ -63,7 +63,7 @@
     }
 #endif
 
-    std::cout << bval << std::endl;
+    std::cout << bval << '\n';
 
     {
         // Get the date
@@ -72,7 +72,7 @@
         ng.get (begin, end, ins, state, lval);
     }
 
-    std::cout << lval << std::endl;
+    std::cout << lval << '\n';
 
     {
         // Get the weekday
@@ -82,7 +82,7 @@
     }
 
     std::cout.setf (std::ios::fixed, std::ios::floatfield);
-    std::cout << ldval << std::endl;
+    std::cout << ldval << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/partial_sort.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/partial_sort.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/partial_sort.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/partial_sort.cpp Tue Aug 19 20:46:29 2008
@@ -56,7 +56,7 @@
     // Output result.
     std::cout << "\n\nA partial_sort of seven elements gives: \n     ";
     std::copy (v1.begin (), v1.end (), Iter (std::cout, " "));
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // A vector of ten elements.
     Vector v2 (Vector::size_type (10), 0);
@@ -70,7 +70,7 @@
         << "\nA partial_sort_copy of the last ten elements gives: \n     ";
     std::copy (v2.begin (), v2.end (), Iter (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/partial_sum.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/partial_sum.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/partial_sum.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/partial_sum.cpp Tue Aug 19 20:46:29 2008
@@ -64,7 +64,7 @@
 
     std::cout << "The partial products: \n     ";
     std::copy (prods.begin (), prods.end (), Iter (std::cout, " "));
-    std::cout << " should each equal N!" << std::endl;
+    std::cout << " should each equal N!" << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/partition.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/partition.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/partition.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/partition.cpp Tue Aug 19 20:46:29 2008
@@ -66,7 +66,7 @@
     // Output result of partition.
     std::cout << "\nStable partitioned values: \t";
     std::copy (d1.begin (), d1.end (), Iter (std::cout, " "));
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/permutation.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/permutation.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/permutation.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/permutation.cpp Tue Aug 19 20:46:29 2008
@@ -95,7 +95,7 @@
     std::cout << "\n     Next Permutation:     ";
     std::copy (next_m2.begin (), next_m2.end (), CharOSIter (std::cout, " "));  
 
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/pnt2fnct.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/pnt2fnct.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/pnt2fnct.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/pnt2fnct.cpp Tue Aug 19 20:46:29 2008
@@ -65,7 +65,7 @@
 
     std::cout << "\n\nHave the factorials: \n     ";
     std::copy (v.begin (), v.end (), Iter (std::cout, " "));
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/priority_queue.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/priority_queue.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/priority_queue.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/priority_queue.cpp Tue Aug 19 20:46:29 2008
@@ -46,9 +46,9 @@
     pq.push (2);
 
     // Pop a couple of values and examine the ends.
-    std::cout << pq.top () << std::endl;
+    std::cout << pq.top () << '\n';
     pq.pop ();
-    std::cout << pq.top () << std::endl;
+    std::cout << pq.top () << '\n';
     pq.pop ();
 
     // Make a priority queue of strings.
@@ -59,11 +59,11 @@
     // Push on a few strings then pop them back off.
     for (int i = 0; i < 10; i++) {
         pqs.push (std::string (i + 1, 'a'));
-        std::cout << pqs.top () << std::endl;
+        std::cout << pqs.top () << '\n';
     }
 
     for (int j = 0; j < 10; j++) {
-        std::cout << pqs.top () << std::endl;
+        std::cout << pqs.top () << '\n';
         pqs.pop ();
     }
 
@@ -76,11 +76,11 @@
     // Push on a few strings then pop them back off.
     for (int k = 0; k < 10; k++)  {
         pgqs.push (std::string (k + 1, 'a'));
-        std::cout << pgqs.top () << std::endl;
+        std::cout << pgqs.top () << '\n';
     }
 
     for (int m = 0; m < 10; m++) {
-        std::cout << pgqs.top () << std::endl;
+        std::cout << pgqs.top () << '\n';
         pgqs.pop ();
     }
 

Modified: stdcxx/branches/4.2.x/examples/manual/queue.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/queue.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/queue.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/queue.cpp Tue Aug 19 20:46:29 2008
@@ -45,8 +45,8 @@
     q.push (1);
     q.push (2);
 
-    std::cout << q.front () << std::endl;
-    std::cout << q.back () << std::endl;
+    std::cout << q.front () << '\n';
+    std::cout << q.back () << '\n';
 
     typedef std::queue<std::string, std::deque<std::string,
                        std::allocator<std::string> > > SQueue;
@@ -57,11 +57,11 @@
     // Push on a few strings then pop them back off.
     for (std::string::size_type i = 0U; i != 10U; i++) {
         qs.push (std::string (i + 1, 'a'));
-        std::cout << qs.front () << std::endl;
+        std::cout << qs.front () << '\n';
     }
 
     for (std::string::size_type j = 0U; j != 10U; j++) {
-        std::cout << qs.front () << std::endl;
+        std::cout << qs.front () << '\n';
         qs.pop ();
     }
 

Modified: stdcxx/branches/4.2.x/examples/manual/remove.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/remove.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/remove.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/remove.cpp Tue Aug 19 20:46:29 2008
@@ -66,7 +66,7 @@
 
     // Write out the contents to cout.
     std::copy (v.begin (), v.end (), Iter (std::cout," "));
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     // Move the 7 to the end of the vector.
     Vector::iterator result = std::remove (v.begin (), v.end (), 7);
@@ -75,18 +75,18 @@
     v.erase (result, v.end ());
 
     std::copy (v.begin (), v.end (), Iter (std::cout, " "));
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     // Remove all non-zero elements beyond the fourth element.
     v.erase (std::remove_if (v.begin () + 4, v.end (), 
                              bnd_greater( int_greater (), 0 )), v.end ());
 
     std::copy (v.begin (), v.end (), Iter (std::cout, " "));
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     // Now remove all 3s on output.
     std::remove_copy (v.begin (), v.end (), Iter (std::cout, " "), 3);
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     // Now remove everything satisfying predicate on output.
     std::remove_copy_if (v.begin (), v.end (), Iter (std::cout, " "),

Modified: stdcxx/branches/4.2.x/examples/manual/replace.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/replace.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/replace.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/replace.cpp Tue Aug 19 20:46:29 2008
@@ -58,7 +58,7 @@
     // Print out original vector.
     std::cout << "Original sequence:\n    ";
     std::copy (v.begin (), v.end (), Iter (std::cout, " "));
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     // Replace one number with another.
     std::replace (v.begin (), v.end (), 11199, 11211);
@@ -66,7 +66,7 @@
     // Print out the new vector.
     std::cout << "Sequence after replace:\n    ";
     std::copy (v.begin (), v.end (), Iter (std::cout, " "));
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     // Replace all numbers that aren't primes with zeros.
     std::replace_if (v.begin (), v.end (), std::not1 (is_prime ()), 0);
@@ -74,18 +74,18 @@
     // Print out the remaining vector.
     std::cout << "After replace_if:\n    ";
     std::copy (v.begin (), v.end (), Iter (std::cout, " "));
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     // Replace zeros with ones.
     std::cout << "Sequence replace_copy-ed to cout:\n    ";
     std::replace_copy (v.begin (), v.end (), Iter (std::cout, " "), 0, 1);
-    std::cout << std::endl << std::endl;
+    std::cout << '\n' << std::endl;
 
     // A simple example of replace_copy_if.
     std::cout << "Sequence replace_copy_if-ed to cout:\n    ";
     std::replace_copy_if (v.begin (), v.end (), Iter (std::cout, ""),
                           is_prime (), 1);
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/reverse.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/reverse.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/reverse.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/reverse.cpp Tue Aug 19 20:46:29 2008
@@ -57,7 +57,7 @@
 
     std::cout << "\n\nA reverse_copy to cout: \n     ";
     std::reverse_copy (v.begin (), v.end (), Iter (std::cout, " "));
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/reverse_iterator.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/reverse_iterator.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/reverse_iterator.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/reverse_iterator.cpp Tue Aug 19 20:46:29 2008
@@ -51,7 +51,7 @@
          j != Vector::const_reverse_iterator (v.begin ()); ++j)
         std::cout << *j << " ";
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/rotate.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/rotate.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/rotate.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/rotate.cpp Tue Aug 19 20:46:29 2008
@@ -54,7 +54,7 @@
     // Print out the rotated elements.
     std::cout << "\n\nElements after rotate: \n     ";
     std::copy (v.begin (), v.end (), Iter (std::cout, " "));
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/setex.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/setex.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/setex.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/setex.cpp Tue Aug 19 20:46:29 2008
@@ -87,7 +87,7 @@
     for (Set::value_type j = 1; j < 9; ++j)
         sd2.insert (j + 5);
 
-    std::cout << sd2 << std::endl;
+    std::cout << sd2 << '\n';
 
     // Try a couple of set algorithms.
     std::set_union (sd.begin (),sd.end (),sd2.begin (), sd2.end (),

Modified: stdcxx/branches/4.2.x/examples/manual/slice_array.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/slice_array.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/slice_array.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/slice_array.cpp Tue Aug 19 20:46:29 2008
@@ -62,7 +62,7 @@
     //  ------slice(0,3,3)    ----slice_array assignment refers to valarray.
 
     std::cout << "vi[slice(0,3,3)] = vi[slice(1,3,3)] + vi[slice(2,3,3)]\n\n"
-              << vi << std::endl;
+              << vi << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/stream_iterator.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/stream_iterator.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/stream_iterator.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/stream_iterator.cpp Tue Aug 19 20:46:29 2008
@@ -60,7 +60,7 @@
 
     if (v.size ())
         std::cout << v.back () << " = " <<  
-            std::accumulate (v.begin (), v.end (), sum) << std::endl;
+            std::accumulate (v.begin (), v.end (), sum) << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/string.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/string.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/string.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/string.cpp Tue Aug 19 20:46:29 2008
@@ -56,7 +56,7 @@
     // Try replacement.
     test.replace (test.find ("middle", 0), 6, "center");
     std::cout << "I didn't like the word 'middle', so instead, I'll say: \n"
-              << test << std::endl; 
+              << test << '\n'; 
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/stringbuf.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/stringbuf.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/stringbuf.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/stringbuf.cpp Tue Aug 19 20:46:29 2008
@@ -52,13 +52,13 @@
     std::istringstream in_2 (string_ex);
 
     // output in_1 to the standard output
-    std::cout << in_1.rdbuf () << std::endl;
+    std::cout << in_1.rdbuf () << '\n';
 
     // reposition in_1 at the beginning
     in_1.seekg (0);
 
     // output in_2 to the standard output
-    std::cout << in_2.rdbuf () << std::endl;
+    std::cout << in_2.rdbuf () << '\n';
 
     // reposition in_2 at the beginning
     in_2.seekg (0);
@@ -72,13 +72,13 @@
     out_1 << ' ' << in_2.rdbuf ();
 
     // output in_1 to the standard output
-    std::cout << in_1.rdbuf () << std::endl;
+    std::cout << in_1.rdbuf () << '\n';
 
     // position the get sequence (equivalent to in_1.seekg (pos))
     in_1.rdbuf ()->pubseekpos (pos, std::ios::in);
 
     // output "L'heure est grave!"
-    std::cout << in_1.rdbuf () << std::endl;  
+    std::cout << in_1.rdbuf () << '\n';  
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/swap.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/swap.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/swap.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/swap.cpp Tue Aug 19 20:46:29 2008
@@ -60,7 +60,7 @@
     std::cout << "\n\nSwaping the first and last elements gives: \n     ";
     std::copy (v.begin (), v.end (), Iter (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/time_get.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/time_get.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/time_get.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/time_get.cpp Tue Aug 19 20:46:29 2008
@@ -92,21 +92,21 @@
 
     // get_date from the stream and output tm contents.
     tg.get_date (begin, end, ins, state, &timeb);
-    std::cout << "Date: Apr 7 1969\n" << timeb << std::endl;
+    std::cout << "Date: Apr 7 1969\n" << timeb << '\n';
 
     // Insert weekday string into stream.
     ins.str ("Monday");
 
     // get_weekday from the stream and output tm contents.
     tg.get_weekday (begin, end, ins, state, &timeb);
-    std::cout << "Weekday: Monday\n" << timeb << std::endl;
+    std::cout << "Weekday: Monday\n" << timeb << '\n';
   
     // Insert time string into stream.
     ins.str ("06:47:32");
 
     // get_time from the stream and output tm contents.
     tg.get_time (begin, end, ins, state, &timeb);
-    std::cout << "Time: 06:47:32\n" << timeb << std::endl;
+    std::cout << "Time: 06:47:32\n" << timeb << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/transform.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/transform.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/transform.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/transform.cpp Tue Aug 19 20:46:29 2008
@@ -64,7 +64,7 @@
     for (i1 = d1.begin (); i1 != d1.end (); ++i1)
         std::cout << std::setw (6) << *i1 << " ";
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/unique.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/unique.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/unique.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/unique.cpp Tue Aug 19 20:46:29 2008
@@ -52,7 +52,7 @@
     Iter ins (result, result.begin ());
 
     // Demonstrate includes.
-    std::cout << "The vector: " << std::endl << "    ";
+    std::cout << "The vector: " << '\n' << "    ";
 
     std::copy (v.begin (), v.end (), OSIter (std::cout, " "));
 
@@ -63,7 +63,7 @@
     std::cout << "\n\nHas the following unique elements:\n     ";
 
     std::copy (result.begin (), result.end (), OSIter (std::cout, " "));
-    std::cout << std::endl;
+    std::cout << '\n';
     
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/use_facet.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/use_facet.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/use_facet.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/use_facet.cpp Tue Aug 19 20:46:29 2008
@@ -39,7 +39,7 @@
     const std::ctype<char>&
         ct = std::use_facet<std::ctype<char> >(loc); 
 
-    std::cout << 'a' << ct.toupper('c') << std::endl;
+    std::cout << 'a' << ct.toupper('c') << '\n';
  
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/manual/wostream.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/manual/wostream.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/manual/wostream.cpp (original)
+++ stdcxx/branches/4.2.x/examples/manual/wostream.cpp Tue Aug 19 20:46:29 2008
@@ -45,26 +45,26 @@
     // tie the wostream object to the wistringstream object
     std::wostream out (in.rdbuf ());
 
-    out << L"test beginning !" << std::endl;
+    out << L"test beginning !" << '\n';
     out.setf (std::wios::fixed, std::wios::floatfield);
 
     // output f in fixed format
-    out << f << std::endl; 
+    out << f << '\n'; 
 
     // store the current put-pointer position  
     std::wostream::pos_type pos = out.tellp ();
 
     // output s 
-    out << s << std::endl;
+    out << s << '\n';
 
     // output the all buffer to standard output
-    std::wcout << in.rdbuf () << std::endl;
+    std::wcout << in.rdbuf () << '\n';
 
     // position the get-pointer
     in.seekg (pos);
 
     // output s
-    std::wcout << in.rdbuf () << std::endl;         
+    std::wcout << in.rdbuf () << '\n';         
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/tutorial/alg4.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/alg4.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/alg4.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/alg4.cpp Tue Aug 19 20:46:29 2008
@@ -47,7 +47,7 @@
 // Illustrate the use of the remove algorithm.
 void remove_example ()
 {
-    std::cout << "Remove Algorithm examples" << std::endl;
+    std::cout << "Remove Algorithm examples" << '\n';
 
     // Create a list of numbers.
     int data[] = { 1, 2, 4, 3, 1, 4, 2 };
@@ -58,7 +58,7 @@
     std::copy (aList.begin (), aList.end (),
                ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Remove 2's, copy into a new list.
     std::list<int, std::allocator<int> > newList;
@@ -69,7 +69,7 @@
     std::copy (newList.begin (), newList.end (),
                ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Remove 2's in place.
     std::list<int, std::allocator<int> >::iterator 
@@ -79,14 +79,14 @@
     std::copy (aList.begin (), aList.end (),
                ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     aList.erase (where, aList.end ());
     std::cout << "List after erase: ";
     std::copy (aList.begin (), aList.end (),
                ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Remove all even values.
     where = std::remove_if (aList.begin (), aList.end (), isEven);
@@ -96,7 +96,7 @@
     std::copy (aList.begin (), aList.end (),
                ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 }
 
 
@@ -113,7 +113,7 @@
                ostrm_iter_type (std::cout, " "));
 
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Copy unique elements into a set.
     std::set<int, std::less<int>, std::allocator<int>  > aSet;
@@ -124,7 +124,7 @@
     std::cout << "Set after unique_copy: ";
     std::copy (aSet.begin (), aSet.end (), ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Copy unique elements in place.
     std::list<int, std::allocator<int> >::iterator 
@@ -134,7 +134,7 @@
     std::copy (aList.begin (), aList.end (),
                ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Remove trailing values.
     aList.erase (where, aList.end ());
@@ -143,20 +143,20 @@
     std::copy (aList.begin (), aList.end (),
                ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
 }
 
 int main ()
 {
     std::cout << "STL generic algorithms -- Removal Algorithms"
-              << std::endl;
+              << '\n';
 
     remove_example ();
     unique_example ();
     
     std::cout << "End of removal algorithms sample program"
-              << std::endl;
+              << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/tutorial/alg5.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/alg5.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/alg5.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/alg5.cpp Tue Aug 19 20:46:29 2008
@@ -83,10 +83,10 @@
 #endif   // _RWSTD_STRICT_ANSI
     
     std::cout << "There are "           << ecount
-              << " letter e's "         << std::endl
+              << " letter e's "         << '\n'
               << "and "                 << vowelCount
               << " vowels in the text:" << text
-              << std::endl;
+              << '\n';
 }
 
 
@@ -110,10 +110,10 @@
 
     std::cout << "The sum of the first five numbers is "
               << sum
-              << std::endl;
+              << '\n';
     std::cout << "The product of the first five numbers is "
               << product
-              << std::endl;
+              << '\n';
 
     // Example with different types for init.
     std::list<int, std::allocator<int> > nums;
@@ -121,7 +121,7 @@
 
     std::copy (nums.begin (), nums.end (), ostrm_iter_type (std::cout, " ")); 
 
-    std::cout << std::endl;
+    std::cout << '\n';
 }
 
 
@@ -133,14 +133,14 @@
 
     // Example 1, simple inner product.
     int in1 = std::inner_product (a, a+3, b, 0);
-    std::cout << "Inner product is " << in1 << std::endl;
+    std::cout << "Inner product is " << in1 << '\n';
 
     // Example 2, using different operations.
     bool anyequal = std::inner_product (a, a+3, b, true,
                                         std::logical_or<bool> (),
                                         std::equal_to<int> ());
 
-    std::cout << "any equal? " << anyequal << std::endl;  
+    std::cout << "any equal? " << anyequal << '\n';  
 }
 
 
@@ -151,11 +151,11 @@
     int b[] = { 4, 3, 3 };
     int c[] = { 4, 5, 3 };
     
-    std::cout << "a = b is:" << std::equal (a, a+3, b) << std::endl;
-    std::cout << "a = c is:" << std::equal (a, a+3, c) << std::endl;
+    std::cout << "a = b is:" << std::equal (a, a+3, b) << '\n';
+    std::cout << "a = c is:" << std::equal (a, a+3, c) << '\n';
     std::cout << "a pair-wise-greater_equal b is"
               << std::equal (a, a+3, b, std::greater_equal<int> ())
-              << std::endl;
+              << '\n';
 }
 
 
@@ -170,22 +170,22 @@
                                                wordTwo + sizeof wordTwo,
                                                wordOne,
                                                wordOne + sizeof wordOne)
-              << std::endl;
+              << '\n';
             
     int a[] = { 3, 4, 5, 2 };
     int b[] = { 3, 4, 5 };
     int c[] = { 3, 5 };
     
     std::cout << "compare a to b: "
-              << std::lexicographical_compare (a, a+4, b, b+3) << std::endl;
+              << std::lexicographical_compare (a, a+4, b, b+3) << '\n';
     std::cout << "compare a to c: "
-              << std::lexicographical_compare (a, a+4, c, c+2) << std::endl;
+              << std::lexicographical_compare (a, a+4, c, c+2) << '\n';
 }
 
 int main () {
     
     std::cout << "STL generic algorithms -- "\
-              << "algorithms that produce scalar results" << std::endl;
+              << "algorithms that produce scalar results" << '\n';
 
     count_example ();
     accumulate_example ();
@@ -193,7 +193,7 @@
     equal_example ();
     lexical_comparison_example ();
     
-    std::cout << "End of scalar algorithms test"  << std::endl;
+    std::cout << "End of scalar algorithms test"  << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/tutorial/alg6.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/alg6.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/alg6.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/alg6.cpp Tue Aug 19 20:46:29 2008
@@ -67,7 +67,7 @@
     std::cout << "Original list: ";
     std::copy (aList.begin (), aList.end (), ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Transform elements by squaring, copy into std::vector.
     std::vector<int, std::allocator<int> > aVec (6);
@@ -76,14 +76,14 @@
     std::cout << "After squaring: ";
     std::copy (aVec.begin (), aVec.end (), ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Transform std::vector again, in place, yielding 4th powers.
     std::transform (aVec.begin (), aVec.end (), aVec.begin (), square);
     std::cout << "After squaring again: ";
     std::copy (aVec.begin (), aVec.end (),ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Transform in parallel, yielding cubes.
     std::vector<int, std::allocator<int> > cubes (6);
@@ -93,7 +93,7 @@
     std::cout << "After division: ";
     std::copy (cubes.begin (), cubes.end (), ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 }
 
 
@@ -105,19 +105,19 @@
     std::generate (aVec.begin (), aVec.end (), iotaGen (1));
 
     // Output partial sums.
-    std::cout << "Partial sums examples" << std::endl;
+    std::cout << "Partial sums examples" << '\n';
     std::cout << "Partial sums : ";
     std::partial_sum (aVec.begin (), aVec.end (),
                  ostrm_iter_type (std::cout, " "));
 
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Output partial products.
     std::cout << "Partial products: ";
     std::partial_sum (aVec.begin (), aVec.end (),
                  ostrm_iter_type (std::cout, " "), std::multiplies<int> () );
 
-    std::cout << std::endl;
+    std::cout << '\n';
 }
 
 
@@ -129,11 +129,11 @@
     std::generate (aVec.begin (), aVec.end (), iotaGen (1));
 
     // Output partial sums.
-    std::cout << "Adjacent Differences examples" << std::endl;
+    std::cout << "Adjacent Differences examples" << '\n';
     std::cout << "Adjacent Differences : ";
     std::adjacent_difference
         (aVec.begin (), aVec.end (), ostrm_iter_type (std::cout, " "));
-    std::cout << std::endl;
+    std::cout << '\n';
 
     // Output partial products.
     std::cout << "Adjacent sums: ";
@@ -141,20 +141,20 @@
                               ostrm_iter_type (std::cout, " "),
                               std::plus<int> ());
 
-    std::cout << std::endl;
+    std::cout << '\n';
 }
 
 
 int main () {
 
     std::cout << "STL generic algorithms -- that transform sequences"
-              << std::endl;
+              << '\n';
 
     transform_example ();
     partial_sum_example ();
     adjacent_difference_example ();
 
-    std::cout << "End generic transform algorithms example" << std::endl;
+    std::cout << "End generic transform algorithms example" << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/tutorial/calc.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/calc.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/calc.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/calc.cpp Tue Aug 19 20:46:29 2008
@@ -75,7 +75,7 @@
 {
     std::cout << "Calculator example program, from Chapter 8\n"
               << "Enter a legal RPN expression, end with p q (print and quit)"
-              << std::endl;
+              << '\n';
 
     Calculator calc;
 
@@ -94,10 +94,10 @@
             calc.doOperator (c);
             break;
         case 'p':
-            std::cout << calc.currentMemory () << std::endl;
+            std::cout << calc.currentMemory () << '\n';
             break;
         case 'q':
-            std::cout << "End calculator program" << std::endl;
+            std::cout << "End calculator program" << '\n';
             return 0;   // quit program
         }
     }

Modified: stdcxx/branches/4.2.x/examples/tutorial/complx.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/complx.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/complx.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/complx.cpp Tue Aug 19 20:46:29 2008
@@ -53,7 +53,7 @@
     std::pair<dcomplex, dcomplex> ans = quadratic(a, b, c);
 
     std::cout << "Roots are " << ans.first << " and "
-              << ans.second   << std::endl;
+              << ans.second   << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/tutorial/graph.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/graph.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/graph.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/graph.cpp Tue Aug 19 20:46:29 2008
@@ -94,7 +94,7 @@
     
     std::cout << "Graph example program "
               << " - find shortest path in a directed graph." 
-              << std::endl;
+              << '\n';
 
     static const char pendleton[]  = "Pendleton";
     static const char pensacola[]  = "Pensacola";

Modified: stdcxx/branches/4.2.x/examples/tutorial/radix.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/radix.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/radix.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/radix.cpp Tue Aug 19 20:46:29 2008
@@ -83,14 +83,14 @@
         std::accumulate (buckets.begin (), buckets.end (), values.begin (), copyList);
         divisor *= 10;
         std::copy (values.begin (), values.end (), OstreamIter (std::cout, " "));
-        std::cout << std::endl;
+        std::cout << '\n';
     }
 }
 
 
 int main () {
     
-    std::cout << "Radix sort program"  << std::endl;
+    std::cout << "Radix sort program"  << '\n';
 
     const IntList::value_type data[] = { 624, 852, 426, 987, 269,
                                        146, 415, 301, 730, 78, 593 };
@@ -100,7 +100,7 @@
     radixSort (values);
     std::copy (values.begin (), values.end (), OstreamIter (std::cout, " "));
 
-    std::cout << std::endl << "End radix sort program" << std::endl;
+    std::cout << '\n' << "End radix sort program" << std::endl;
 
     return 0;   
 }

Modified: stdcxx/branches/4.2.x/examples/tutorial/sieve.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/sieve.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/sieve.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/sieve.cpp Tue Aug 19 20:46:29 2008
@@ -34,7 +34,7 @@
 int main ()
 {
 
-    std::cout << "Prime Sieve program, a test of vectors" << std::endl;
+    std::cout << "Prime Sieve program, a test of vectors" << '\n';
 
     // Create a sieve of bits, initially set to 1.
     const int sievesize = 100;
@@ -51,7 +51,7 @@
         if (sieve[j]) 
             std::cout << j << " ";
     
-    std::cout << std::endl << "End of Prime Sieve program" << std::endl;
+    std::cout << '\n' << "End of Prime Sieve program" << std::endl;
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/tutorial/spell.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/spell.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/spell.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/spell.cpp Tue Aug 19 20:46:29 2008
@@ -62,7 +62,7 @@
             misspellings.insert (word);
 
     // Finally, output all misspellings.
-    std::cout << std::endl << "Misspelled words:" << std::endl;
+    std::cout << '\n' << "Misspelled words:" << std::endl;
 
     std::copy (misspellings.begin (), misspellings.end (),
           ostrm_iter (std::cout, "\n"));
@@ -73,6 +73,6 @@
     std::cout << "Enter text:";
     std::ifstream words ("words");
     spellCheck (words, std::cin);
-    std::cout << "End of spell check program" << std::endl;
+    std::cout << "End of spell check program" << '\n';
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/tutorial/tele.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/tele.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/tele.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/tele.cpp Tue Aug 19 20:46:29 2008
@@ -45,13 +45,13 @@
 
 void printEntry (const entry_type & entry) {
     
-    std::cout << entry.first << ":" << entry.second << std::endl;
+    std::cout << entry.first << ":" << entry.second << '\n';
 }
 
 
 void printSortedEntry (const sorted_entry_type & entry) {
     
-    std::cout << entry.first << ":" << entry.second << std::endl;
+    std::cout << entry.first << ":" << entry.second << '\n';
 }
 
 
@@ -99,7 +99,7 @@
 
 void telephoneDirectory::displayPrefix (int pfx) {
     
-    std::cout << "Listing for prefix " << pfx << std::endl;
+    std::cout << "Listing for prefix " << pfx << '\n';
 
     friendMap::iterator
         where = std::find_if (database.begin (), database.end (),
@@ -109,26 +109,26 @@
         where = std::find_if (++where, database.end (), checkPrefix (pfx));
     }
 
-    std::cout << "end of prefix listing" << std::endl;
+    std::cout << "end of prefix listing" << '\n';
 }
 
 
 void telephoneDirectory::displayByPrefix () {
     
-    std::cout << "Display by prefix" << std::endl;
+    std::cout << "Display by prefix" << '\n';
 
     sortedMap sortedData;
     for (friendMap::iterator i = database.begin (); i != database.end (); i++)
         sortedData.insert (sortedMap::value_type ((*i).second, (*i).first));
     std::for_each (sortedData.begin (), sortedData.end (), printSortedEntry);
 
-    std::cout << "end display by prefix" << std::endl;
+    std::cout << "end display by prefix" << '\n';
 }
 
 
 int main () {
     
-    std::cout << "Telephone Directory sample program" << std::endl;
+    std::cout << "Telephone Directory sample program" << '\n';
 
     telephoneDirectory friends;
     friends.addEntry ("Samantha", 6342343);
@@ -139,7 +139,7 @@
     friends.displayPrefix (634);
     friends.displayByPrefix ();
     
-    std::cout << "End of telephone directory sample program" << std::endl;
+    std::cout << "End of telephone directory sample program" << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/tutorial/teller.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/teller.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/teller.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/teller.cpp Tue Aug 19 20:46:29 2008
@@ -68,7 +68,7 @@
     }
 
     std::cout << "average wait: "
-              << (totalWait / numberOfCustomers) << std::endl;
+              << (totalWait / numberOfCustomers) << '\n';
 
     return 0;
 }

Modified: stdcxx/branches/4.2.x/examples/tutorial/widwork.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/examples/tutorial/widwork.cpp?rev=687231&r1=687230&r2=687231&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/examples/tutorial/widwork.cpp (original)
+++ stdcxx/branches/4.2.x/examples/tutorial/widwork.cpp Tue Aug 19 20:46:29 2008
@@ -53,17 +53,17 @@
 
 void inventory::order (int wid) {
     
-    std::cout << "Received order for widget type " << wid << std::endl;
+    std::cout << "Received order for widget type " << wid << '\n';
 
     widgetList::iterator
         wehave = std::find_if (on_hand.begin (), on_hand.end (), 
                                std::bind2nd (WidgetTester (), wid));
     if (wehave != on_hand.end ()) {
-        std::cout << "Ship " << *wehave << std::endl;
+        std::cout << "Ship " << *wehave << '\n';
         on_hand.erase (wehave);
     }
     else {
-        std::cout << "Back order widget of type "  << wid  << std::endl;
+        std::cout << "Back order widget of type "  << wid  << '\n';
         on_order.push_front (wid);
     }
 }
@@ -71,13 +71,13 @@
 
 void inventory::receive (int wid) {
 
-    std::cout << "Received shipment of widget type " << wid << std::endl;
+    std::cout << "Received shipment of widget type " << wid << '\n';
 
     idList::iterator weneed = std::find (on_order.begin (),
                                          on_order.end (), wid);
     if (weneed != on_order.end ()) {
         std::cout << "Ship " << Widget (wid) << " to fill back order"
-                  << std::endl;
+                  << '\n';
         on_order.erase (weneed);
     }
     else
@@ -87,7 +87,7 @@
 
 int main ()
 {
-    std::cout << "Widget Works test program" << std::endl;
+    std::cout << "Widget Works test program" << '\n';
 
     inventory stock;
     stock.receive (1);
@@ -98,7 +98,7 @@
     stock.order (3);
     stock.receive (2);
     
-    std::cout << "End of widget words test program" << std::endl;
+    std::cout << "End of widget words test program" << '\n';
 
     return 0;
 }



Mime
View raw message