Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84636 - trunk/boost/utility
From: andrey.semashev_at_[hidden]
Date: 2013-06-04 14:41:39


Author: andysem
Date: 2013-06-04 14:41:39 EDT (Tue, 04 Jun 2013)
New Revision: 84636
URL: http://svn.boost.org/trac/boost/changeset/84636

Log:
Avoid using ios_base and streamsize, which are not defined in iosfwd.
Text files modified:
   trunk/boost/utility/string_ref.hpp | 12 ++++++------
   1 files changed, 6 insertions(+), 6 deletions(-)

Modified: trunk/boost/utility/string_ref.hpp
==============================================================================
--- trunk/boost/utility/string_ref.hpp (original)
+++ trunk/boost/utility/string_ref.hpp 2013-06-04 14:41:39 EDT (Tue, 04 Jun 2013)
@@ -410,23 +410,23 @@
             charT fill_chars[chunk_size];
             std::fill_n(fill_chars, static_cast< std::size_t >(chunk_size), os.fill());
             for (; n >= chunk_size && os.good(); n -= chunk_size)
- os.write(fill_chars, static_cast< std::streamsize >(chunk_size));
+ os.write(fill_chars, static_cast< std::size_t >(chunk_size));
             if (n > 0 && os.good())
- os.write(fill_chars, static_cast< std::streamsize >(n));
+ os.write(fill_chars, n);
             }
 
         template<class charT, class traits>
         void insert_aligned(std::basic_ostream<charT, traits>& os, const basic_string_ref<charT,traits>& str) {
             const std::size_t size = str.size();
             const std::size_t alignment_size = static_cast< std::size_t >(os.width()) - size;
- const bool align_left = (os.flags() & std::ios_base::adjustfield) == std::ios_base::left;
+ const bool align_left = (os.flags() & std::basic_ostream<charT, traits>::adjustfield) == std::basic_ostream<charT, traits>::left;
             if (!align_left) {
                 detail::insert_fill_chars(os, alignment_size);
                 if (os.good())
- os.write(str.data(), static_cast< std::streamsize >(size));
+ os.write(str.data(), size);
                 }
             else {
- os.write(str.data(), static_cast< std::streamsize >(size));
+ os.write(str.data(), size);
                 if (os.good())
                     detail::insert_fill_chars(os, alignment_size);
                 }
@@ -442,7 +442,7 @@
             const std::size_t size = str.size();
             const std::size_t w = static_cast< std::size_t >(os.width());
             if (w <= size)
- os.write(str.data(), static_cast< std::streamsize >(size));
+ os.write(str.data(), size);
             else
                 detail::insert_aligned(os, str);
             os.width(0);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk