Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63812 - in branches/release: boost/functional/hash boost/iostreams boost/iostreams/device boost/unordered libs/functional/hash libs/functional/hash/doc libs/functional/hash/test libs/iostreams libs/iostreams/doc libs/iostreams/doc/concepts libs/iostreams/test libs/unordered
From: daniel_james_at_[hidden]
Date: 2010-07-10 10:20:49


Author: danieljames
Date: 2010-07-10 10:20:45 EDT (Sat, 10 Jul 2010)
New Revision: 63812
URL: http://svn.boost.org/trac/boost/changeset/63812

Log:
Merge iostreams, hash.

Including disallowing implicit casts to `hash_value`.

Added:
   branches/release/libs/functional/hash/test/implicit_fail_test.cpp
      - copied, changed from r63716, /trunk/libs/functional/hash/test/implicit_fail_test.cpp
   branches/release/libs/functional/hash/test/shared_ptr_fail_test.cpp
      - copied, changed from r63716, /trunk/libs/functional/hash/test/shared_ptr_fail_test.cpp
Removed:
   branches/release/libs/iostreams/doc/concepts/multi-character.html
Properties modified:
   branches/release/boost/functional/hash/ (props changed)
   branches/release/boost/iostreams/ (props changed)
   branches/release/boost/unordered/ (props changed)
   branches/release/libs/functional/hash/ (props changed)
   branches/release/libs/iostreams/ (props changed)
   branches/release/libs/unordered/ (props changed)
Text files modified:
   branches/release/boost/functional/hash/hash.hpp | 13 ++++
   branches/release/boost/iostreams/device/file_descriptor.hpp | 4
   branches/release/libs/functional/hash/doc/changes.qbk | 8 ++
   branches/release/libs/functional/hash/test/Jamfile.v2 | 2
   branches/release/libs/functional/hash/test/implicit_fail_test.cpp | 7 ++
   branches/release/libs/functional/hash/test/shared_ptr_fail_test.cpp | 7 ++
   branches/release/libs/iostreams/doc/release_notes.html | 116 ++++++++++++++++++++++++++++++++++++++-
   branches/release/libs/iostreams/test/deprecated_file_descriptor_test.cpp | 4 +
   8 files changed, 153 insertions(+), 8 deletions(-)

Modified: branches/release/boost/functional/hash/hash.hpp
==============================================================================
--- branches/release/boost/functional/hash/hash.hpp (original)
+++ branches/release/boost/functional/hash/hash.hpp 2010-07-10 10:20:45 EDT (Sat, 10 Jul 2010)
@@ -15,6 +15,7 @@
 #include <boost/functional/hash/detail/hash_float.hpp>
 #include <string>
 #include <boost/limits.hpp>
+#include <boost/static_assert.hpp>
 
 #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 #include <boost/type_traits/is_pointer.hpp>
@@ -29,6 +30,18 @@
 
 namespace boost
 {
+#if !defined(BOOST_HASH_ALLOW_IMPLICIT_CASTS)
+
+ // If you get a static assertion here, it's because hash_value
+ // isn't declared for your type.
+ template <typename T>
+ std::size_t hash_value(T const&) {
+ BOOST_STATIC_ASSERT((T*) 0 && false);
+ return 0;
+ }
+
+#endif
+
     std::size_t hash_value(bool);
     std::size_t hash_value(char);
     std::size_t hash_value(unsigned char);

Modified: branches/release/boost/iostreams/device/file_descriptor.hpp
==============================================================================
--- branches/release/boost/iostreams/device/file_descriptor.hpp (original)
+++ branches/release/boost/iostreams/device/file_descriptor.hpp 2010-07-10 10:20:45 EDT (Sat, 10 Jul 2010)
@@ -39,8 +39,8 @@
 
 enum file_descriptor_flags
 {
- never_close_handle = 0,
- close_handle = 3
+ never_close_handle = 0,
+ close_handle = 3
 };
 
 class BOOST_IOSTREAMS_DECL file_descriptor {

Modified: branches/release/libs/functional/hash/doc/changes.qbk
==============================================================================
--- branches/release/libs/functional/hash/doc/changes.qbk (original)
+++ branches/release/libs/functional/hash/doc/changes.qbk 2010-07-10 10:20:45 EDT (Sat, 10 Jul 2010)
@@ -106,4 +106,12 @@
   Avoid hashing 0.5 and 0 to the same number.
 * Stop using deprecated `BOOST_HAS_*` macros.
 
+[h2 Boost 1.44.0]
+
+* Prevent implicit conversions when calling `hash_value`. If you find
+ that the new version breaks your code, you can enable the old
+ behaviour by defining `BOOST_HASH_ALLOW_IMPLICIT_CASTS` - although
+ I would recommend that you update your code to work with the new
+ version.
+
 [endsect]

Modified: branches/release/libs/functional/hash/test/Jamfile.v2
==============================================================================
--- branches/release/libs/functional/hash/test/Jamfile.v2 (original)
+++ branches/release/libs/functional/hash/test/Jamfile.v2 2010-07-10 10:20:45 EDT (Sat, 10 Jul 2010)
@@ -50,6 +50,8 @@
         [ run container_no_fwd_test.cpp ]
         [ compile-fail hash_no_ext_fail_test.cpp ]
         [ compile-fail namespace_fail_test.cpp ]
+ [ compile-fail implicit_fail_test.cpp ]
+ [ compile-fail shared_ptr_fail_test.cpp ]
         [ run hash_no_ext_macro_1.cpp ]
         [ run hash_no_ext_macro_2.cpp ]
     ;

Copied: branches/release/libs/functional/hash/test/implicit_fail_test.cpp (from r63716, /trunk/libs/functional/hash/test/implicit_fail_test.cpp)
==============================================================================
--- /trunk/libs/functional/hash/test/implicit_fail_test.cpp (original)
+++ branches/release/libs/functional/hash/test/implicit_fail_test.cpp 2010-07-10 10:20:45 EDT (Sat, 10 Jul 2010)
@@ -1,3 +1,8 @@
+
+// Copyright 2010 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
 #include <boost/functional/hash.hpp>
 
 namespace test
@@ -13,4 +18,4 @@
     test::converts x;
     
     hash(x);
-}
\ No newline at end of file
+}

Copied: branches/release/libs/functional/hash/test/shared_ptr_fail_test.cpp (from r63716, /trunk/libs/functional/hash/test/shared_ptr_fail_test.cpp)
==============================================================================
--- /trunk/libs/functional/hash/test/shared_ptr_fail_test.cpp (original)
+++ branches/release/libs/functional/hash/test/shared_ptr_fail_test.cpp 2010-07-10 10:20:45 EDT (Sat, 10 Jul 2010)
@@ -1,3 +1,8 @@
+
+// Copyright 2010 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
 #include <boost/functional/hash.hpp>
 #include <boost/shared_ptr.hpp>
 
@@ -8,4 +13,4 @@
     boost::shared_ptr<int> x(new int(10));
     
     hash(x);
-}
\ No newline at end of file
+}

Deleted: branches/release/libs/iostreams/doc/concepts/multi-character.html
==============================================================================
--- branches/release/libs/iostreams/doc/concepts/multi-character.html 2010-07-10 10:20:45 EDT (Sat, 10 Jul 2010)
+++ (empty file)
@@ -1,60 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML>
-<HEAD>
- <TITLE>Mutli-Character Filter</TITLE>
- <LINK REL="stylesheet" HREF="../../../../boost.css">
- <LINK REL="stylesheet" HREF="../theme/iostreams.css">
-</HEAD>
-<BODY>
-
-<!-- Begin Banner -->
-
- <H1 CLASS="title">Mutli-Character Filter</H1>
- <HR CLASS="banner">
-
-<!-- End Banner -->
-
-<H2>Description</H2>
-
-<P>Filter which provides access to its controlled sequence or sequences <I>via</I> a socket-like interface rather than one character at a time. The difference between a Filter which is Mutli-Character and one which is not is reflected in the specifications of the various Filter refinements. <I>See</I>, <I>e.g.</I>, InputFilter and OutputFilter.</P>
-
-<H2>Refinement of</H2>
-
-<P>Filter.</P>
-
-<A NAME="types"></A>
-<H2>Associated Types</H2>
-
-<P>Same as Filter, with the following additional requirements:</P>
-
-<TABLE CELLPADDING="5" BORDER="1">
- <TR><TD>Category</TD><TD>A type convertible to filter_tag and to multichar_tag</TD></TR>
-</TABLE>
-
-<A NAME="expressions"></A>
-<H2>Valid Expressions / Semantics</H2>
-
-<P>Same as Filter.</P>
-
-<H2>Models</H2>
-
-<UL>
- <LI>The compression and decompression filters</A>
- <LI>basic_regex_filter
- <LI>aggregate_filter
- <LI>symmetric_filter
-</UL>
-
-<!-- Begin Footer -->
-
-<HR>
-<P CLASS="copyright">Revised 02 Feb 2008</P>
-
-<P CLASS="copyright">&copy; Copyright Jonathan Turkanis, 2004</P>
-<P CLASS="copyright">
- Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-</P>
-
-<!-- End Footer -->
-
-</BODY>
\ No newline at end of file

Modified: branches/release/libs/iostreams/doc/release_notes.html
==============================================================================
--- branches/release/libs/iostreams/doc/release_notes.html (original)
+++ branches/release/libs/iostreams/doc/release_notes.html 2010-07-10 10:20:45 EDT (Sat, 10 Jul 2010)
@@ -16,12 +16,14 @@
 
 <h4>1.44</h4>
 
+<p>Lots of fixes in this version, almost all are by Steven Watanabe.</p>
+
+<p>File descriptor fixes:</p>
+
 <ul>
   <li>
- Lots of fixes, especially for compression and decompression, by Steven Watanabe.
- </li>
- <li>
- New constructors and <code>open</code> methods from file descriptors/handles for
+ <strong>Breaking change:</strong>
+ new constructors and <code>open</code> methods from file descriptors/handles for
     <code>file_descriptor</code>, <code>file_descriptor_source</code>
     and <code>file_descriptor_sink</code>. See
     <a title="File descriptor devices referece" href="classes/file_descriptor.html">the documentation</a>
@@ -29,6 +31,112 @@
     <code>BOOST_IOSTREAMS_USE_DEPRECATED</code>
     (#3517).
   </li>
+ <li>
+ Add <code>BOOST_IOSTREAMS_DECL</code> to
+ <code>file_descriptor_source</code> and
+ <code>file_descriptor_sink</code> fixing their use in dynamic libraries
+ (#4335).
+ </li>
+ <li>
+ Rejigger <code>file_descriptors</code> handling of
+ <code>std::ios_base::openmode</code> to match <code>std::fstream</code>.
+ In particular, truncate existing files, if
+ <code>std::ios_base::trunc</code> is passed
+ (#3323).
+ </li>
+ <li>
+ Open files in append mode on Windows instead of seeking to the end at every
+ write when <code>std::ios_base::app</code> is passed
+ (#3323).
+ </li>
+</ul>
+
+<p>Compression/decompression fixes:</p>
+
+<ul>
+ <li>
+ Don't end the stream produced by a reading through a symmetric_filter
+ prematurely
+ (#2318).
+ </li>
+ <li>
+ Allow building zlib 1.2.4+, using a glob to include only source files that
+ actually exist
+ (#4091).
+ </li>
+ <li>
+ Fix compressing an empty string.
+ </li>
+ <li>
+ Allow bzip2 filters to be closed even if no input has been read
+ (#3348).
+ </li>
+ <li>
+ Throw an exception on an unexpected end of file in
+ <code>bzip2_decompressor</code> instead of going into an infinite loop
+ (#2783).
+ </li>
+ <li>
+ Reset the crc for zlib when we reuse a filter.
+ </li>
+ <li>
+ Make <code>gzip_decompressor</code> a <code>DualUseFilter</code>
+ (#1579).
+ </li>
+ <li>
+ Allow <code>bzip2_decompressor</code> to process multiple concatenated
+ streams
+ (#3853).
+ </li>
+</ul>
+
+<p>Other fixes:</p>
+
+<ul>
+ <li>
+ Make <code>aggregate_filter</code> work with wide characters
+ (#3851).
+ </li>
+ <li>
+ Make <code>symmetric_filter</code> compile with <code>wchar_t</code>
+ (#3279).
+ </li>
+ <li>
+ Fix <code>boost/iostreams/detail/resolve.hpp</code> compilation on xlc.
+ </li>
+ <li>
+ Fix definition of <code>multichar_dual_use_filter_tag</code>
+ (#3689).
+ </li>
+ <li>
+ Make <code>concept_adapter</code> work with custom <code>char_traits</code>
+ (#2356).
+ </li>
+ <li>
+ On windows, open mapped files with just read/write permissions, rather than
+ full control - which might not be available
+ (#2996).
+ </li>
+ <li>
+ Make sure that <code>direct_streambuf</code> and
+ <code>indirect_streambuf</code> are reset correctly on open
+ (#4102).
+ </li>
+ <li>
+ Make <code>basic_file</code> and <code>basic_file_sync</code>
+ <code>Flushable</code>
+ (#2998).
+ </li>
+ <li>
+ Several documentation improvements, including
+ documenting private mapping with <code>mapped_file</code>
+ (#1612).
+ </li>
+ <li>
+ Make the tests more reliable by using Boost.Filesystem's
+ <code>unique_path</code> instead of <code>tmpnam</code>
+ (#2325).
+ </li>
 </ul>
 
 <h4>1.43</h4>

Modified: branches/release/libs/iostreams/test/deprecated_file_descriptor_test.cpp
==============================================================================
--- branches/release/libs/iostreams/test/deprecated_file_descriptor_test.cpp (original)
+++ branches/release/libs/iostreams/test/deprecated_file_descriptor_test.cpp 2010-07-10 10:20:45 EDT (Sat, 10 Jul 2010)
@@ -1,3 +1,7 @@
+// (C) Copyright 2010 Daniel James
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
 #include <boost/iostreams/device/file_descriptor.hpp>
 #include <boost/iostreams/stream.hpp>
 #include <boost/test/unit_test.hpp>


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