$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r63794 - in branches/release: . boost boost/algorithm/string boost/bimap boost/config boost/detail boost/format boost/functional/hash boost/fusion boost/gil boost/graph boost/integer boost/interprocess boost/intrusive boost/msm boost/numeric/ublas boost/program_options boost/property_tree boost/python boost/range boost/signals boost/signals2 boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/support boost/statechart boost/system boost/unordered boost/utility boost/uuid boost/variant boost/wave libs libs/array/test libs/bimap libs/config libs/format/doc libs/format/test libs/functional/hash libs/fusion libs/graph_parallel libs/interprocess libs/intrusive libs/mpl/doc/refmanual libs/mpl/doc/src/refmanual libs/msm libs/numeric/ublas libs/numeric/ublas/doc libs/program_options libs/property_tree libs/python libs/range libs/range/doc libs/signals libs/signals2 libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/phoenix libs/spirit/test libs/spirit/test/qi libs/statechart libs/static_assert libs/system libs/timer libs/unordered libs/utility libs/utility/swap/test libs/uuid libs/wave more more/getting_started status tools tools/bcp tools/build/v2 tools/build/v2/tools tools/jam tools/regression tools/release tools/wave
From: steven_at_[hidden]
Date: 2010-07-09 16:27:19
Author: steven_watanabe
Date: 2010-07-09 16:27:18 EDT (Fri, 09 Jul 2010)
New Revision: 63794
URL: http://svn.boost.org/trac/boost/changeset/63794
Log:
Merge format from the trunk.  This should fix the regressions resulting from the partial merge in [63640].
Added:
   branches/release/libs/format/test/format_test_enum.cpp
      - copied unchanged from r57695, /trunk/libs/format/test/format_test_enum.cpp
Properties modified: 
   branches/release/   (props changed)
   branches/release/INSTALL   (props changed)
   branches/release/Jamroot   (props changed)
   branches/release/LICENSE_1_0.txt   (props changed)
   branches/release/boost/   (props changed)
   branches/release/boost-build.jam   (props changed)
   branches/release/boost.css   (props changed)
   branches/release/boost.png   (props changed)
   branches/release/boost/algorithm/string/   (props changed)
   branches/release/boost/bimap/   (props changed)
   branches/release/boost/config/   (props changed)
   branches/release/boost/config.hpp   (props changed)
   branches/release/boost/detail/   (props changed)
   branches/release/boost/detail/endian.hpp   (props changed)
   branches/release/boost/functional/hash/   (props changed)
   branches/release/boost/fusion/   (props changed)
   branches/release/boost/gil/   (props changed)
   branches/release/boost/graph/   (props changed)
   branches/release/boost/integer/   (props changed)
   branches/release/boost/interprocess/   (props changed)
   branches/release/boost/intrusive/   (props changed)
   branches/release/boost/msm/   (props changed)
   branches/release/boost/numeric/ublas/   (props changed)
   branches/release/boost/program_options/   (props changed)
   branches/release/boost/property_tree/   (props changed)
   branches/release/boost/python/   (props changed)
   branches/release/boost/range/   (props changed)
   branches/release/boost/signals/   (props changed)
   branches/release/boost/signals2/   (props changed)
   branches/release/boost/spirit/   (props changed)
   branches/release/boost/spirit/home/   (props changed)
   branches/release/boost/spirit/home/karma/   (props changed)
   branches/release/boost/spirit/home/support/attributes.hpp   (props changed)
   branches/release/boost/statechart/   (props changed)
   branches/release/boost/system/   (props changed)
   branches/release/boost/unordered/   (props changed)
   branches/release/boost/utility/   (props changed)
   branches/release/boost/uuid/   (props changed)
   branches/release/boost/variant/   (props changed)
   branches/release/boost/version.hpp   (props changed)
   branches/release/boost/wave/   (props changed)
   branches/release/bootstrap.bat   (props changed)
   branches/release/bootstrap.sh   (props changed)
   branches/release/index.htm   (props changed)
   branches/release/index.html   (props changed)
   branches/release/libs/   (props changed)
   branches/release/libs/array/test/array0.cpp   (props changed)
   branches/release/libs/array/test/array2.cpp   (props changed)
   branches/release/libs/bimap/   (props changed)
   branches/release/libs/config/   (props changed)
   branches/release/libs/functional/hash/   (props changed)
   branches/release/libs/fusion/   (props changed)
   branches/release/libs/graph_parallel/   (props changed)
   branches/release/libs/interprocess/   (props changed)
   branches/release/libs/intrusive/   (props changed)
   branches/release/libs/mpl/doc/refmanual/broken-compiler-workarounds.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/categorized-index-concepts.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/cfg-no-preprocessed-headers.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/composition-and-argument-binding.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-concepts.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-miscellaneous.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/extensible-associative-sequence.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/inserter-class.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/tag-dispatched-metafunction.html   (props changed)
   branches/release/libs/mpl/doc/refmanual/trivial-metafunctions-summary.html   (props changed)
   branches/release/libs/mpl/doc/src/refmanual/Iterators-Iterator.rst   (props changed)
   branches/release/libs/msm/   (props changed)
   branches/release/libs/numeric/ublas/   (props changed)
   branches/release/libs/numeric/ublas/doc/   (props changed)
   branches/release/libs/program_options/   (props changed)
   branches/release/libs/property_tree/   (props changed)
   branches/release/libs/python/   (props changed)
   branches/release/libs/range/   (props changed)
   branches/release/libs/range/doc/   (props changed)
   branches/release/libs/signals/   (props changed)
   branches/release/libs/signals2/   (props changed)
   branches/release/libs/spirit/   (props changed)
   branches/release/libs/spirit/classic/example/   (props changed)
   branches/release/libs/spirit/doc/   (props changed)
   branches/release/libs/spirit/example/   (props changed)
   branches/release/libs/spirit/phoenix/   (props changed)
   branches/release/libs/spirit/test/   (props changed)
   branches/release/libs/spirit/test/qi/optional.cpp   (props changed)
   branches/release/libs/statechart/   (props changed)
   branches/release/libs/static_assert/   (props changed)
   branches/release/libs/system/   (props changed)
   branches/release/libs/timer/   (props changed)
   branches/release/libs/unordered/   (props changed)
   branches/release/libs/utility/   (props changed)
   branches/release/libs/utility/swap.html   (props changed)
   branches/release/libs/utility/swap/test/std_bitset.cpp   (props changed)
   branches/release/libs/utility/value_init_test.cpp   (props changed)
   branches/release/libs/uuid/   (props changed)
   branches/release/libs/wave/   (props changed)
   branches/release/more/   (props changed)
   branches/release/more/getting_started/   (props changed)
   branches/release/rst.css   (props changed)
   branches/release/status/   (props changed)
   branches/release/tools/   (props changed)
   branches/release/tools/bcp/   (props changed)
   branches/release/tools/build/v2/   (props changed)
   branches/release/tools/build/v2/tools/   (props changed)
   branches/release/tools/jam/   (props changed)
   branches/release/tools/regression/   (props changed)
   branches/release/tools/release/   (props changed)
   branches/release/tools/wave/   (props changed)
Text files modified: 
   branches/release/boost/format/alt_sstream_impl.hpp      |    12 +++++++++++-                            
   branches/release/boost/format/format_class.hpp          |    25 +++++++++++++++++++++++++               
   branches/release/boost/format/format_implementation.hpp |     4 ++--                                    
   branches/release/boost/format/internals.hpp             |     2 +-                                      
   branches/release/libs/format/doc/format.html            |     4 ++--                                    
   branches/release/libs/format/test/Jamfile.v2            |     1 +                                       
   6 files changed, 42 insertions(+), 6 deletions(-)
Modified: branches/release/boost/format/alt_sstream_impl.hpp
==============================================================================
--- branches/release/boost/format/alt_sstream_impl.hpp	(original)
+++ branches/release/boost/format/alt_sstream_impl.hpp	2010-07-09 16:27:18 EDT (Fri, 09 Jul 2010)
@@ -37,7 +37,12 @@
         str (const string_type& s) {
             size_type sz=s.size();
             if(sz != 0 && mode_ & (::std::ios_base::in | ::std::ios_base::out) ) {
+#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
+                void *vd_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0);
+                Ch *new_ptr = static_cast<Ch *>(vd_ptr);
+#else
                 Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0);
+#endif
                 // if this didnt throw, we're safe, update the buffer
                 dealloc();
                 sz = s.copy(new_ptr, sz);
@@ -140,7 +145,7 @@
         typename basic_altstringbuf<Ch, Tr, Alloc>::pos_type 
         basic_altstringbuf<Ch, Tr, Alloc>:: 
         seekpos (pos_type pos, ::std::ios_base::openmode which) {
-            off_type off = off_type(pos); // operation guaranteed by §27.4.3.2 table 88
+            off_type off = off_type(pos); // operation guaranteed by 27.4.3.2 table 88
             if(pptr() != NULL && putend_ < pptr())
                 putend_ = pptr();
             if(off != off_type(-1)) {
@@ -249,7 +254,12 @@
                     add_size /= 2;
                 if(0 < add_size) {
                     new_size += add_size;
+#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
+                    void *vdptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
+                    newptr = static_cast<Ch *>(vdptr);
+#else
                     newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
+#endif
                 }
 
                 if(0 < prev_size)
Modified: branches/release/boost/format/format_class.hpp
==============================================================================
--- branches/release/boost/format/format_class.hpp	(original)
+++ branches/release/boost/format/format_class.hpp	2010-07-09 16:27:18 EDT (Fri, 09 Jul 2010)
@@ -68,6 +68,31 @@
             { return io::detail::feed<CharT, Tr, Alloc, T&>(*this,x); }
 #endif
 
+#if defined(__GNUC__)
+        // GCC can't handle anonymous enums without some help
+        // ** arguments passing ** //
+        basic_format&   operator%(const int& x)
+            { return io::detail::feed<CharT, Tr, Alloc, const int&>(*this,x); }
+
+#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
+        basic_format&   operator%(int& x)
+            { return io::detail::feed<CharT, Tr, Alloc, int&>(*this,x); }
+#endif
+#endif
+
+        // The total number of arguments expected to be passed to the format objectt
+        int expected_args() const
+            { return num_args_; }
+        // The number of arguments currently bound (see bind_arg(..) )
+        int bound_args() const;
+        // The number of arguments currently fed to the format object
+        int fed_args() const;
+        // The index (1-based) of the current argument (i.e. next to be formatted)
+        int cur_arg() const;
+        // The number of arguments still required to be fed
+        int remaining_args() const; // same as expected_args() - bound_args() - fed_args()
+
+
         // ** object modifying **//
         template<class T>
         basic_format&  bind_arg(int argN, const T& val) 
Modified: branches/release/boost/format/format_implementation.hpp
==============================================================================
--- branches/release/boost/format/format_implementation.hpp	(original)
+++ branches/release/boost/format/format_implementation.hpp	2010-07-09 16:27:18 EDT (Fri, 09 Jul 2010)
@@ -67,7 +67,7 @@
     template< class Ch, class Tr, class Alloc> // just don't copy the buf_ member
     basic_format<Ch, Tr, Alloc>:: basic_format(const basic_format& x)
         : items_(x.items_), bound_(x.bound_), style_(x.style_),
-          cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(false),
+          cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(x.dumped_),
           prefix_(x.prefix_), exceptions_(x.exceptions_), loc_(x.loc_)
     {
     }
@@ -302,7 +302,7 @@
             while(self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_])   
                 ++self.cur_arg_;
         }
-        // In any case, we either have all args, or are on a non-binded arg :
+        // In any case, we either have all args, or are on an unbound arg :
         BOOST_ASSERT( self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]);
         return self;
     }
Modified: branches/release/boost/format/internals.hpp
==============================================================================
--- branches/release/boost/format/internals.hpp	(original)
+++ branches/release/boost/format/internals.hpp	2010-07-09 16:27:18 EDT (Fri, 09 Jul 2010)
@@ -148,7 +148,7 @@
 
     template<class Ch, class Tr> inline
     void stream_format_state<Ch,Tr>:: reset(Ch fill) {
-        // set our params to standard's default state.   cf § 27.4.4.1 of the C++ norm
+        // set our params to standard's default state.   cf 27.4.4.1 of the C++ norm
         width_=0; precision_=6; 
         fill_=fill; // default is widen(' '), but we cant compute it without the locale
         flags_ = std::ios_base::dec | std::ios_base::skipws; 
Modified: branches/release/libs/format/doc/format.html
==============================================================================
--- branches/release/libs/format/doc/format.html	(original)
+++ branches/release/libs/format/doc/format.html	2010-07-09 16:27:18 EDT (Fri, 09 Jul 2010)
@@ -298,7 +298,7 @@
 
     <li><b>%|</b><i>spec</i><b>|</b> where <i>spec</i> is a printf format
     specification.<br>
-    The brackets are introduced, to improve the readability of the
+    This pipe-delimited syntax is introduced, to improve the readability of the
     format-string, but primarily, to make the <i>type-conversion
     character</i> optional in <i>spec</i>. This information is not necessary
     with C++ variables, but with direct printf syntax, it is necessary to
@@ -591,7 +591,7 @@
     created so far reaches <i>n</i> characters. (see <a href=
     "#examples">examples</a> )</li>
 
-    <li><b>%{</b><i>n</i><b>T</b><i>X</i><b>}</b> inserts a tabulation in the
+    <li><b>%|</b><i>n</i><b>T</b><i>X</i><b>|</b> inserts a tabulation in the
     same way, but using <i>X</i> as fill character instead of the current
     'fill' char of the stream (which is <i>space</i> for a stream in default
     state)</li>
Modified: branches/release/libs/format/test/Jamfile.v2
==============================================================================
--- branches/release/libs/format/test/Jamfile.v2	(original)
+++ branches/release/libs/format/test/Jamfile.v2	2010-07-09 16:27:18 EDT (Fri, 09 Jul 2010)
@@ -18,6 +18,7 @@
         [ run format_test2.cpp ]
         [ run format_test3.cpp ]
         [ run format_test_wstring.cpp ]
+        [ run format_test_enum.cpp ]
   ;
 }