'external_string_type' member. Refs #4135.
Using SFINAE, I might add a workaround for compilers that don't support
it, although I'm not sure if there are any that Iostreams supports.
[SVN r61497]
In a recent version, the gzip filter stopped working for array sources,
this is because it started to require them to be peekable, which they
aren't and can't be because the peek interface modifies the source,
which for an array source is immutable.
Looking at the implementation, gzip decompressor has an internal class
to emulate a peekable source, which calls the putback member on the
original source if it runs out of space (requiring the source to be
peekable). It shouldn't really need to do that so I changed it to throw
an exception instead.
If it does need to do that, we could change it to store the character
that was put back at the beginning of the string instead.
[SVN r60415]
Because of the way restrict_test and slice_test were including the
header file they were testing, bjam was missing the dependency on that
files and sometimes, when changing the headers, the test wouldn't get
run. This fixes that.
[SVN r58224]
- Simplified implementation with the help to the C-runtime function _get_osfhandle so that on Windows only a single HANDLE is stored and the POSIX-style implementation is never needed; added the handle_type on POSIX systems (typedef for int) and a function returning the underlying handle as an instance of handle_type
- fixed the bug described in ticket Ticket #1551 (stream_buffer::seekpos ignores openmode parameter)
- fixed test/operation_sequence_test.cpp file description
[SVN r42596]
- added "slice" as an alias for "restrict", for platforms on which "restrict" is a keyword
- attempted to configure file_descriptor for __IBMCPP__
- added better error output to stream_offset_64bit_test.cpp
[SVN r42565]
fix for Visual Age: std::min was passed arguments of different types; replaced std:: min with conditional
detail/streambuf/indirect_streambuf.hpp:
removed trailing comma in enum definition
test/combine_test.cpp:
test/symmetric_filter_test.cpp:
test/compose_test.cpp:
test/close_test.cpp:
test/invert_test.cpp:
test/tee_test.cpp:
test/restrict_test.cpp:
test/Jamfile.v2:
moved tests for close() into the test files for various adapters
[SVN r42544]
- added optimization for win32 (excpet Borland 5.8.2) using mapped files
- replaced SetFilePointerEx with SetFilePointer
- replaced BOOST_CHECK_MESSAGE with BOOST_REQUIRE_MESSAGE in test for file existence
- changed file attributes passed to CreateFile; previous flags were the result of a haphazard attempt to speed up execution
- added docs
[SVN r42381]
and made corresponding changes throughout the iostreams library.
New spec is:
template<typename T>
void close(T& t);
Convenience function for closing a device; calls close(t, in) and
close(t, out).
template<typename T>
void close(T& t, openmode which);
template<typename T, typename Sink>
void close(T& t, Sink& snk, openmode which);
These two functions should only be called by the library implementation
or by advanced users. The openmode parameter must always equal in or
out, never in | out.
There are three cases:
1. If T is not closable and which == out, calls boost::iostreams::flush
2. If T operates on a single sequence, and is NOT a dual-use filter:
a. If which == in and the mode of T is convertible to input but
not to output, calls t.close() (or t.close(snk))
b. If which == out and the mode of T is not convertible to input or
is convertible to input and to output, calls t.close()
(or t.close(snk))
The effect of a. and b. is that for any T in this category,
close() is called exactly once.
3. If T operates on two sequences or is a dual-use filter, calls
t.close(which) (or t.close(snk, which))
If multiple operations that might throw must be called in the course
of closing a filter or device, all of the operations are attempted
and the first exception thrown by any of the operations is rethrown
The new test close_test.cpp contains 95 checks verifying that the operation
behaves as sepcified.
This affects the following files:
chain.hpp
close.hpp
code_converter.hpp
combine.hpp
compose.hpp
copy.hpp
detail/adapter/basic_adapter.hpp [removed]
detail/adapter/device_adapter.hpp [new]
detail/adapter/direct_adapter.hpp
detail/adapter/filter_adapter.hpp [new]
detail/adapter/mode_adapter.hpp
detail/broken_overload_resolution/stream_buffer.hpp
detail/closer.hpp [removed]
detail/config/limits.hpp
detail/execute.hpp [new]
detail/functional.hpp [new]
detail/streambuf/direct_streambuf.hpp
detail/streambuf/indirect_streambuf.hpp
detail/streambuf/linked_streambuf.hpp
detail/vc6/close.hpp
device/null.hpp
filter/aggregate.hpp
filter/bzip2.hpp
filter/gzip.hpp
filter/line.hpp
filter/newline.hpp
filter/symmetric.hpp
filter/test.hpp
invert.hpp
restrict.hpp
tee.hpp
example/finite_state_filter.hpp
test/Jamfile.v2
test/close_test.cpp [new]
test/code_converter_test.cpp
test/execute_test.cpp [new]
test/operation_sequence_test.cpp [new]
II. When exceptions are caught and ignored, we now use catch (...)
uniformly instead of catch (std::exception&). This affects the
following files:
stream_buffer.hpp
src/mapped_file.cpp
III. Unnecessary dependence on Boost.Range has been eliminated. This
affects the following files:
detail/is_iterator_range.hpp
detail/resolve.hpp
traits.hpp
test/Jamfile.v2
test/filtering_stream_test.cpp
test/offset_test.cpp
test/seek_test.hpp
test/seekable_filter_test.cpp
test/sequence_test.cpp [new]
test/wide_stream_test.cpp
IV. There are several fixes to the documentation. This affects the
following files:
doc/classes/symmetric_filter.html
doc/guide/concepts.html
doc/guide/modes.html
doc/tutorial/container_device.html [serious error in algorithm]
doc/tutorial/dictionary_filters.html [unused member variable]
doc/tutorial/multichar_filters.html
V. Other changes include:
stream.hpp [missing include directive]
example/container_device.hpp [serious error in algorithm]
example/container_device_example.cpp [outdated naming]
example/container_sink_example.cpp [outdated naming]
example/container_source_example.cpp [outdated naming]
example/dictionary_filter.hpp [unused member variable]
test/compose_test.cpp [added comments]
test/example_test.cpp [reformatted]
[SVN r42047]
Adjust tests to use always use static linking to Boost.Test, since
linking to the shared version requires test changes.
Patch from Juergen Hunold.
[SVN r35989]