aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted
diff options
context:
space:
mode:
authorbugaevskiy <bugaevskiy@yandex-team.com>2022-08-23 11:06:55 +0300
committerbugaevskiy <bugaevskiy@yandex-team.com>2022-08-23 11:06:55 +0300
commitcd3603423481480c0c545ae7b360a3bfd7c797d2 (patch)
tree3f35b1ab81e96232224c8ebe790ff71f59e76d22 /contrib/restricted
parent41e5df041415ca76c8839340ca9c2337ef2e87c1 (diff)
downloadydb-cd3603423481480c0c545ae7b360a3bfd7c797d2.tar.gz
Reimport boost/iostreams as a separate project
Diffstat (limited to 'contrib/restricted')
-rw-r--r--contrib/restricted/boost/boost/iostreams/code_converter.hpp417
-rw-r--r--contrib/restricted/boost/boost/iostreams/combine.hpp260
-rw-r--r--contrib/restricted/boost/boost/iostreams/compose.hpp493
-rw-r--r--contrib/restricted/boost/boost/iostreams/copy.hpp249
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/absolute_path.hpp46
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/adapter/device_adapter.hpp67
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/adapter/direct_adapter.hpp281
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/adapter/filter_adapter.hpp69
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/add_facet.hpp49
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/broken_overload_resolution/stream.hpp184
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/codecvt_helper.hpp214
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/codecvt_holder.hpp63
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/counted_array.hpp74
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/current_directory.hpp65
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/newline.hpp32
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/param_type.hpp27
-rw-r--r--contrib/restricted/boost/boost/iostreams/detail/restrict_impl.hpp481
-rw-r--r--contrib/restricted/boost/boost/iostreams/filter/aggregate.hpp168
-rw-r--r--contrib/restricted/boost/boost/iostreams/filter/counter.hpp82
-rw-r--r--contrib/restricted/boost/boost/iostreams/filter/grep.hpp109
-rw-r--r--contrib/restricted/boost/boost/iostreams/filter/line.hpp221
-rw-r--r--contrib/restricted/boost/boost/iostreams/filter/newline.hpp441
-rw-r--r--contrib/restricted/boost/boost/iostreams/filter/regex.hpp98
-rw-r--r--contrib/restricted/boost/boost/iostreams/filter/stdio.hpp84
-rw-r--r--contrib/restricted/boost/boost/iostreams/filter/test.hpp319
-rw-r--r--contrib/restricted/boost/boost/iostreams/invert.hpp167
-rw-r--r--contrib/restricted/boost/boost/iostreams/restrict.hpp26
-rw-r--r--contrib/restricted/boost/boost/iostreams/skip.hpp112
-rw-r--r--contrib/restricted/boost/boost/iostreams/slice.hpp28
-rw-r--r--contrib/restricted/boost/boost/iostreams/stream.hpp171
-rw-r--r--contrib/restricted/boost/boost/iostreams/tee.hpp232
-rw-r--r--contrib/restricted/boost/iostreams/CMakeLists.txt53
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/categories.hpp (renamed from contrib/restricted/boost/boost/iostreams/categories.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/chain.hpp (renamed from contrib/restricted/boost/boost/iostreams/chain.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/char_traits.hpp (renamed from contrib/restricted/boost/boost/iostreams/char_traits.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/checked_operations.hpp (renamed from contrib/restricted/boost/boost/iostreams/checked_operations.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/close.hpp (renamed from contrib/restricted/boost/boost/iostreams/close.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/concepts.hpp (renamed from contrib/restricted/boost/boost/iostreams/concepts.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/constants.hpp (renamed from contrib/restricted/boost/boost/iostreams/constants.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/access_control.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/access_control.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/concept_adapter.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/adapter/concept_adapter.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/mode_adapter.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/adapter/mode_adapter.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/non_blocking_adapter.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/adapter/non_blocking_adapter.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/output_iterator_adapter.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/adapter/output_iterator_adapter.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/range_adapter.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/adapter/range_adapter.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/bool_trait_def.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/bool_trait_def.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/broken_overload_resolution/forward.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/broken_overload_resolution/forward.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/buffer.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/buffer.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/call_traits.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/call_traits.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/char_traits.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/char_traits.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/auto_link.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/auto_link.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/bzip2.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/bzip2.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/codecvt.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/codecvt.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/disable_warnings.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/disable_warnings.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/dyn_link.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/dyn_link.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/enable_warnings.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/enable_warnings.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/fpos.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/fpos.hpp)10
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/gcc.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/gcc.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/limits.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/limits.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/overload_resolution.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/overload_resolution.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/rtl.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/rtl.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/unreachable_return.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/unreachable_return.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/wide_streams.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/wide_streams.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/windows_posix.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/windows_posix.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/zlib.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/config/zlib.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/default_arg.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/default_arg.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/dispatch.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/dispatch.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/double_object.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/double_object.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/enable_if_stream.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/enable_if_stream.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/error.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/error.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/execute.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/execute.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/file_handle.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/file_handle.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/forward.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/forward.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/fstream.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/fstream.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/functional.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/functional.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/ios.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/ios.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/iostream.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/iostream.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/is_dereferenceable.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/is_dereferenceable.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/is_iterator_range.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/is_iterator_range.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/optional.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/optional.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/path.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/path.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/push.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/push.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/push_params.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/push_params.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/resolve.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/resolve.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/select.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/select.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/select_by_size.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/select_by_size.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/streambuf.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/chainbuf.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/streambuf/chainbuf.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/direct_streambuf.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/streambuf/direct_streambuf.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/streambuf/indirect_streambuf.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/linked_streambuf.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/streambuf/linked_streambuf.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/system_failure.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/system_failure.hpp)4
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/template_params.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/template_params.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/translate_int_type.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/translate_int_type.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/detail/wrap_unwrap.hpp (renamed from contrib/restricted/boost/boost/iostreams/detail/wrap_unwrap.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/device/array.hpp (renamed from contrib/restricted/boost/boost/iostreams/device/array.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/device/back_inserter.hpp (renamed from contrib/restricted/boost/boost/iostreams/device/back_inserter.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/device/file.hpp (renamed from contrib/restricted/boost/boost/iostreams/device/file.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/device/file_descriptor.hpp (renamed from contrib/restricted/boost/boost/iostreams/device/file_descriptor.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/device/mapped_file.hpp (renamed from contrib/restricted/boost/boost/iostreams/device/mapped_file.hpp)2
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/device/null.hpp (renamed from contrib/restricted/boost/boost/iostreams/device/null.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/filter/bzip2.hpp (renamed from contrib/restricted/boost/boost/iostreams/filter/bzip2.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/filter/gzip.hpp (renamed from contrib/restricted/boost/boost/iostreams/filter/gzip.hpp)4
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/filter/lzma.hpp (renamed from contrib/restricted/boost/boost/iostreams/filter/lzma.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/filter/symmetric.hpp (renamed from contrib/restricted/boost/boost/iostreams/filter/symmetric.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/filter/zlib.hpp (renamed from contrib/restricted/boost/boost/iostreams/filter/zlib.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/filtering_stream.hpp (renamed from contrib/restricted/boost/boost/iostreams/filtering_stream.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/filtering_streambuf.hpp (renamed from contrib/restricted/boost/boost/iostreams/filtering_streambuf.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/flush.hpp (renamed from contrib/restricted/boost/boost/iostreams/flush.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/get.hpp (renamed from contrib/restricted/boost/boost/iostreams/get.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/imbue.hpp (renamed from contrib/restricted/boost/boost/iostreams/imbue.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/input_sequence.hpp (renamed from contrib/restricted/boost/boost/iostreams/input_sequence.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/operations.hpp (renamed from contrib/restricted/boost/boost/iostreams/operations.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/operations_fwd.hpp (renamed from contrib/restricted/boost/boost/iostreams/operations_fwd.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/optimal_buffer_size.hpp (renamed from contrib/restricted/boost/boost/iostreams/optimal_buffer_size.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/output_sequence.hpp (renamed from contrib/restricted/boost/boost/iostreams/output_sequence.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/pipeline.hpp (renamed from contrib/restricted/boost/boost/iostreams/pipeline.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/positioning.hpp (renamed from contrib/restricted/boost/boost/iostreams/positioning.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/put.hpp (renamed from contrib/restricted/boost/boost/iostreams/put.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/putback.hpp (renamed from contrib/restricted/boost/boost/iostreams/putback.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/read.hpp (renamed from contrib/restricted/boost/boost/iostreams/read.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/seek.hpp (renamed from contrib/restricted/boost/boost/iostreams/seek.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/stream_buffer.hpp (renamed from contrib/restricted/boost/boost/iostreams/stream_buffer.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/traits.hpp (renamed from contrib/restricted/boost/boost/iostreams/traits.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/traits_fwd.hpp (renamed from contrib/restricted/boost/boost/iostreams/traits_fwd.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/include/boost/iostreams/write.hpp (renamed from contrib/restricted/boost/boost/iostreams/write.hpp)0
-rw-r--r--contrib/restricted/boost/iostreams/src/bzip2.cpp168
-rw-r--r--contrib/restricted/boost/iostreams/src/file_descriptor.cpp (renamed from contrib/restricted/boost/libs/iostreams/src/file_descriptor.cpp)0
-rw-r--r--contrib/restricted/boost/iostreams/src/gzip.cpp (renamed from contrib/restricted/boost/libs/iostreams/src/gzip.cpp)0
-rw-r--r--contrib/restricted/boost/iostreams/src/lzma.cpp147
-rw-r--r--contrib/restricted/boost/iostreams/src/mapped_file.cpp (renamed from contrib/restricted/boost/libs/iostreams/src/mapped_file.cpp)4
-rw-r--r--contrib/restricted/boost/iostreams/src/zlib.cpp (renamed from contrib/restricted/boost/libs/iostreams/src/zlib.cpp)0
-rw-r--r--contrib/restricted/boost/libs/iostreams/CMakeLists.darwin.txt46
-rw-r--r--contrib/restricted/boost/libs/iostreams/CMakeLists.linux.txt45
-rw-r--r--contrib/restricted/boost/libs/iostreams/CMakeLists.txt13
136 files changed, 380 insertions, 5445 deletions
diff --git a/contrib/restricted/boost/boost/iostreams/code_converter.hpp b/contrib/restricted/boost/boost/iostreams/code_converter.hpp
deleted file mode 100644
index 0bac461d44..0000000000
--- a/contrib/restricted/boost/boost/iostreams/code_converter.hpp
+++ /dev/null
@@ -1,417 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// Contains machinery for performing code conversion.
-
-#ifndef BOOST_IOSTREAMS_CODE_CONVERTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_CODE_CONVERTER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/iostreams/detail/config/wide_streams.hpp>
-#if defined(BOOST_IOSTREAMS_NO_WIDE_STREAMS) || \
- defined(BOOST_IOSTREAMS_NO_LOCALE) \
- /**/
-# error code conversion not supported on this platform
-#endif
-
-#include <algorithm> // max.
-#include <cstring> // memcpy.
-#include <exception>
-#include <boost/config.hpp> // DEDUCED_TYPENAME,
-#include <boost/iostreams/char_traits.hpp>
-#include <boost/iostreams/constants.hpp> // default_filter_buffer_size.
-#include <boost/iostreams/detail/adapter/concept_adapter.hpp>
-#include <boost/iostreams/detail/adapter/direct_adapter.hpp>
-#include <boost/iostreams/detail/buffer.hpp>
-#include <boost/iostreams/detail/call_traits.hpp>
-#include <boost/iostreams/detail/codecvt_holder.hpp>
-#include <boost/iostreams/detail/codecvt_helper.hpp>
-#include <boost/iostreams/detail/double_object.hpp>
-#include <boost/iostreams/detail/execute.hpp>
-#include <boost/iostreams/detail/forward.hpp>
-#include <boost/iostreams/detail/functional.hpp>
-#include <boost/iostreams/detail/ios.hpp> // failure, openmode, int types, streamsize.
-#include <boost/iostreams/detail/optional.hpp>
-#include <boost/iostreams/detail/select.hpp>
-#include <boost/iostreams/traits.hpp>
-#include <boost/iostreams/operations.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // Borland 5.x
-
-namespace boost { namespace iostreams {
-
-struct code_conversion_error : BOOST_IOSTREAMS_FAILURE {
- code_conversion_error()
- : BOOST_IOSTREAMS_FAILURE("code conversion error")
- { }
-};
-
-namespace detail {
-
-//--------------Definition of strncpy_if_same---------------------------------//
-
-// Helper template for strncpy_if_same, below.
-template<bool B>
-struct strncpy_if_same_impl;
-
-template<>
-struct strncpy_if_same_impl<true> {
- template<typename Ch>
- static Ch* copy(Ch* tgt, const Ch* src, std::streamsize n)
- { return BOOST_IOSTREAMS_CHAR_TRAITS(Ch)::copy(tgt, src, n); }
-};
-
-template<>
-struct strncpy_if_same_impl<false> {
- template<typename Src, typename Tgt>
- static Tgt* copy(Tgt* tgt, const Src*, std::streamsize) { return tgt; }
-};
-
-template<typename Src, typename Tgt>
-Tgt* strncpy_if_same(Tgt* tgt, const Src* src, std::streamsize n)
-{
- typedef strncpy_if_same_impl<is_same<Src, Tgt>::value> impl;
- return impl::copy(tgt, src, n);
-}
-
-//--------------Definition of conversion_buffer-------------------------------//
-
-// Buffer and conversion state for reading.
-template<typename Codecvt, typename Alloc>
-class conversion_buffer
- : public buffer<
- BOOST_DEDUCED_TYPENAME detail::codecvt_extern<Codecvt>::type,
- Alloc
- >
-{
-public:
- typedef typename Codecvt::state_type state_type;
- conversion_buffer()
- : buffer<
- BOOST_DEDUCED_TYPENAME detail::codecvt_extern<Codecvt>::type,
- Alloc
- >(0)
- {
- reset();
- }
- state_type& state() { return state_; }
- void reset()
- {
- if (this->size())
- this->set(0, 0);
- state_ = state_type();
- }
-private:
- state_type state_;
-};
-
-//--------------Definition of converter_impl----------------------------------//
-
-// Contains member data, open/is_open/close and buffer management functions.
-template<typename Device, typename Codecvt, typename Alloc>
-struct code_converter_impl {
- typedef typename codecvt_extern<Codecvt>::type extern_type;
- typedef typename category_of<Device>::type device_category;
- typedef is_convertible<device_category, input> can_read;
- typedef is_convertible<device_category, output> can_write;
- typedef is_convertible<device_category, bidirectional> is_bidir;
- typedef typename
- iostreams::select< // Disambiguation for Tru64.
- is_bidir, bidirectional,
- can_read, input,
- can_write, output
- >::type mode;
- typedef typename
- mpl::if_<
- is_direct<Device>,
- direct_adapter<Device>,
- Device
- >::type device_type;
- typedef optional< concept_adapter<device_type> > storage_type;
- typedef is_convertible<device_category, two_sequence> is_double;
- typedef conversion_buffer<Codecvt, Alloc> buffer_type;
-
- code_converter_impl() : cvt_(), flags_(0) { }
-
- ~code_converter_impl()
- {
- try {
- if (flags_ & f_open) close();
- } catch (...) { /* */ }
- }
-
- template <class T>
- void open(const T& dev, std::streamsize buffer_size)
- {
- if (flags_ & f_open)
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("already open"));
- if (buffer_size == -1)
- buffer_size = default_filter_buffer_size;
- std::streamsize max_length = cvt_.get().max_length();
- buffer_size = (std::max)(buffer_size, 2 * max_length);
- if (can_read::value) {
- buf_.first().resize(buffer_size);
- buf_.first().set(0, 0);
- }
- if (can_write::value && !is_double::value) {
- buf_.second().resize(buffer_size);
- buf_.second().set(0, 0);
- }
- dev_.reset(concept_adapter<device_type>(dev));
- flags_ = f_open;
- }
-
- void close()
- {
- detail::execute_all(
- detail::call_member_close(*this, BOOST_IOS::in),
- detail::call_member_close(*this, BOOST_IOS::out)
- );
- }
-
- void close(BOOST_IOS::openmode which)
- {
- if (which == BOOST_IOS::in && (flags_ & f_input_closed) == 0) {
- flags_ |= f_input_closed;
- iostreams::close(dev(), BOOST_IOS::in);
- }
- if (which == BOOST_IOS::out && (flags_ & f_output_closed) == 0) {
- flags_ |= f_output_closed;
- detail::execute_all(
- detail::flush_buffer(buf_.second(), dev(), can_write::value),
- detail::call_close(dev(), BOOST_IOS::out),
- detail::call_reset(dev_),
- detail::call_reset(buf_.first()),
- detail::call_reset(buf_.second())
- );
- }
- }
-
- bool is_open() const { return (flags_ & f_open) != 0;}
-
- device_type& dev() { return **dev_; }
-
- enum flag_type {
- f_open = 1,
- f_input_closed = f_open << 1,
- f_output_closed = f_input_closed << 1
- };
-
- codecvt_holder<Codecvt> cvt_;
- storage_type dev_;
- double_object<
- buffer_type,
- is_double
- > buf_;
- int flags_;
-};
-
-} // End namespace detail.
-
-//--------------Definition of converter---------------------------------------//
-
-#define BOOST_IOSTREAMS_CONVERTER_PARAMS() , std::streamsize buffer_size = -1
-#define BOOST_IOSTREAMS_CONVERTER_ARGS() , buffer_size
-
-template<typename Device, typename Codecvt, typename Alloc>
-struct code_converter_base {
- typedef detail::code_converter_impl<
- Device, Codecvt, Alloc
- > impl_type;
- code_converter_base() : pimpl_(new impl_type) { }
- shared_ptr<impl_type> pimpl_;
-};
-
-template< typename Device,
- typename Codecvt = detail::default_codecvt,
- typename Alloc = std::allocator<char> >
-class code_converter
- : protected code_converter_base<Device, Codecvt, Alloc>
-{
-private:
- typedef detail::code_converter_impl<
- Device, Codecvt, Alloc
- > impl_type;
- typedef typename impl_type::device_type device_type;
- typedef typename impl_type::buffer_type buffer_type;
- typedef typename detail::codecvt_holder<Codecvt>::codecvt_type codecvt_type;
- typedef typename detail::codecvt_intern<Codecvt>::type intern_type;
- typedef typename detail::codecvt_extern<Codecvt>::type extern_type;
- typedef typename detail::codecvt_state<Codecvt>::type state_type;
-public:
- typedef intern_type char_type;
- struct category
- : impl_type::mode, device_tag, closable_tag, localizable_tag
- { };
- BOOST_STATIC_ASSERT((
- is_same<
- extern_type,
- BOOST_DEDUCED_TYPENAME char_type_of<Device>::type
- >::value
- ));
-public:
- code_converter() { }
- BOOST_IOSTREAMS_FORWARD( code_converter, open_impl, Device,
- BOOST_IOSTREAMS_CONVERTER_PARAMS,
- BOOST_IOSTREAMS_CONVERTER_ARGS )
-
- // fstream-like interface.
-
- bool is_open() const { return this->pimpl_->is_open(); }
- void close(BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out )
- { impl().close(which); }
-
- // Device interface.
-
- std::streamsize read(char_type*, std::streamsize);
- std::streamsize write(const char_type*, std::streamsize);
- void imbue(const std::locale& loc) { impl().cvt_.imbue(loc); }
-
- // Direct device access.
-
- Device& operator*() { return detail::unwrap_direct(dev()); }
- Device* operator->() { return &detail::unwrap_direct(dev()); }
-private:
- template<typename T> // Used for forwarding.
- void open_impl(const T& t BOOST_IOSTREAMS_CONVERTER_PARAMS())
- {
- impl().open(t BOOST_IOSTREAMS_CONVERTER_ARGS());
- }
-
- const codecvt_type& cvt() { return impl().cvt_.get(); }
- device_type& dev() { return impl().dev(); }
- buffer_type& in() { return impl().buf_.first(); }
- buffer_type& out() { return impl().buf_.second(); }
- impl_type& impl() { return *this->pimpl_; }
-};
-
-//--------------Implementation of converter-----------------------------------//
-
-// Implementation note: if end of stream contains a partial character,
-// it is ignored.
-template<typename Device, typename Codevt, typename Alloc>
-std::streamsize code_converter<Device, Codevt, Alloc>::read
- (char_type* s, std::streamsize n)
-{
- const extern_type* next; // Next external char.
- intern_type* nint; // Next internal char.
- std::streamsize total = 0; // Characters read.
- int status = iostreams::char_traits<char>::good();
- bool partial = false;
- buffer_type& buf = in();
-
- do {
-
- // Fill buffer.
- if (buf.ptr() == buf.eptr() || partial) {
- status = buf.fill(dev());
- if (buf.ptr() == buf.eptr())
- break;
- partial = false;
- }
-
- // Convert.
- std::codecvt_base::result result =
- cvt().in( buf.state(),
- buf.ptr(), buf.eptr(), next,
- s + total, s + n, nint );
- buf.ptr() += next - buf.ptr();
- total = static_cast<std::streamsize>(nint - s);
-
- switch (result) {
- case std::codecvt_base::partial:
- partial = true;
- break;
- case std::codecvt_base::ok:
- break;
- case std::codecvt_base::noconv:
- {
- std::streamsize amt =
- std::min<std::streamsize>(next - buf.ptr(), n - total);
- detail::strncpy_if_same(s + total, buf.ptr(), amt);
- total += amt;
- }
- break;
- case std::codecvt_base::error:
- default:
- buf.state() = state_type();
- boost::throw_exception(code_conversion_error());
- }
-
- } while (total < n && status != EOF && status != WOULD_BLOCK);
-
- return total == 0 && status == EOF ? -1 : total;
-}
-
-template<typename Device, typename Codevt, typename Alloc>
-std::streamsize code_converter<Device, Codevt, Alloc>::write
- (const char_type* s, std::streamsize n)
-{
- buffer_type& buf = out();
- extern_type* next; // Next external char.
- const intern_type* nint; // Next internal char.
- std::streamsize total = 0; // Characters written.
- bool partial = false;
-
- while (total < n) {
-
- // Empty buffer.
- if (buf.eptr() == buf.end() || partial) {
- if (!buf.flush(dev()))
- break;
- partial = false;
- }
-
- // Convert.
- std::codecvt_base::result result =
- cvt().out( buf.state(),
- s + total, s + n, nint,
- buf.eptr(), buf.end(), next );
- int progress = (int) (next - buf.eptr());
- buf.eptr() += progress;
-
- switch (result) {
- case std::codecvt_base::partial:
- partial = true;
- BOOST_FALLTHROUGH;
- case std::codecvt_base::ok:
- total = static_cast<std::streamsize>(nint - s);
- break;
- case std::codecvt_base::noconv:
- {
- std::streamsize amt =
- std::min<std::streamsize>( nint - total - s,
- buf.end() - buf.eptr() );
- detail::strncpy_if_same(buf.eptr(), s + total, amt);
- total += amt;
- }
- break;
- case std::codecvt_base::error:
- default:
- buf.state() = state_type();
- boost::throw_exception(code_conversion_error());
- }
- }
- return total;
-}
-
-//----------------------------------------------------------------------------//
-
-} } // End namespaces iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp> // Borland 5.x
-
-#endif // #ifndef BOOST_IOSTREAMS_CODE_CONVERTER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/combine.hpp b/contrib/restricted/boost/boost/iostreams/combine.hpp
deleted file mode 100644
index 107122a97b..0000000000
--- a/contrib/restricted/boost/boost/iostreams/combine.hpp
+++ /dev/null
@@ -1,260 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// To do: add support for random-access.
-
-#ifndef BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED
-#define BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/config.hpp> // NO_STD_LOCALE, DEDUCED_TYPENAME.
-#ifndef BOOST_NO_STD_LOCALE
-# include <locale>
-#endif
-#include <boost/iostreams/detail/ios.hpp>
-#include <boost/iostreams/detail/wrap_unwrap.hpp>
-#include <boost/iostreams/traits.hpp>
-#include <boost/iostreams/operations.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp>
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-//
-// Template name: combined_device.
-// Description: Model of Device defined in terms of a Source/Sink pair.
-// Template parameters:
-// Source - A model of Source, with the same char_type and traits_type
-// as Sink.
-// Sink - A model of Sink, with the same char_type and traits_type
-// as Source.
-//
-template<typename Source, typename Sink>
-class combined_device {
-private:
- typedef typename category_of<Source>::type in_category;
- typedef typename category_of<Sink>::type out_category;
- typedef typename char_type_of<Sink>::type sink_char_type;
-public:
- typedef typename char_type_of<Source>::type char_type;
- struct category
- : bidirectional,
- device_tag,
- closable_tag,
- localizable_tag
- { };
- BOOST_STATIC_ASSERT(is_device<Source>::value);
- BOOST_STATIC_ASSERT(is_device<Sink>::value);
- BOOST_STATIC_ASSERT((is_convertible<in_category, input>::value));
- BOOST_STATIC_ASSERT((is_convertible<out_category, output>::value));
- BOOST_STATIC_ASSERT((is_same<char_type, sink_char_type>::value));
- combined_device(const Source& src, const Sink& snk);
- std::streamsize read(char_type* s, std::streamsize n);
- std::streamsize write(const char_type* s, std::streamsize n);
- void close(BOOST_IOS::openmode);
- #ifndef BOOST_NO_STD_LOCALE
- void imbue(const std::locale& loc);
- #endif
-private:
- Source src_;
- Sink sink_;
-};
-
-//
-// Template name: combined_filter.
-// Description: Model of Device defined in terms of a Source/Sink pair.
-// Template parameters:
-// InputFilter - A model of InputFilter, with the same char_type as
-// OutputFilter.
-// OutputFilter - A model of OutputFilter, with the same char_type as
-// InputFilter.
-//
-template<typename InputFilter, typename OutputFilter>
-class combined_filter {
-private:
- typedef typename category_of<InputFilter>::type in_category;
- typedef typename category_of<OutputFilter>::type out_category;
- typedef typename char_type_of<OutputFilter>::type output_char_type;
-public:
- typedef typename char_type_of<InputFilter>::type char_type;
- struct category
- : multichar_bidirectional_filter_tag,
- closable_tag,
- localizable_tag
- { };
- BOOST_STATIC_ASSERT(is_filter<InputFilter>::value);
- BOOST_STATIC_ASSERT(is_filter<OutputFilter>::value);
- BOOST_STATIC_ASSERT((is_convertible<in_category, input>::value));
- BOOST_STATIC_ASSERT((is_convertible<out_category, output>::value));
- BOOST_STATIC_ASSERT((is_same<char_type, output_char_type>::value));
- combined_filter(const InputFilter& in, const OutputFilter& out);
-
- template<typename Source>
- std::streamsize read(Source& src, char_type* s, std::streamsize n)
- { return boost::iostreams::read(in_, src, s, n); }
-
- template<typename Sink>
- std::streamsize write(Sink& snk, const char_type* s, std::streamsize n)
- { return boost::iostreams::write(out_, snk, s, n); }
-
- template<typename Sink>
- void close(Sink& snk, BOOST_IOS::openmode which)
- {
- if (which == BOOST_IOS::in) {
- if (is_convertible<in_category, dual_use>::value) {
- iostreams::close(in_, snk, BOOST_IOS::in);
- } else {
- detail::close_all(in_, snk);
- }
- }
- if (which == BOOST_IOS::out) {
- if (is_convertible<out_category, dual_use>::value) {
- iostreams::close(out_, snk, BOOST_IOS::out);
- } else {
- detail::close_all(out_, snk);
- }
- }
- }
- #ifndef BOOST_NO_STD_LOCALE
- void imbue(const std::locale& loc);
- #endif
-private:
- InputFilter in_;
- OutputFilter out_;
-};
-
-template<typename In, typename Out>
-struct combination_traits
- : mpl::if_<
- is_device<In>,
- combined_device<
- typename wrapped_type<In>::type,
- typename wrapped_type<Out>::type
- >,
- combined_filter<
- typename wrapped_type<In>::type,
- typename wrapped_type<Out>::type
- >
- >
- { };
-
-} // End namespace detail.
-
-template<typename In, typename Out>
-struct combination : detail::combination_traits<In, Out>::type {
- typedef typename detail::combination_traits<In, Out>::type base_type;
- typedef typename detail::wrapped_type<In>::type in_type;
- typedef typename detail::wrapped_type<Out>::type out_type;
- combination(const in_type& in, const out_type& out)
- : base_type(in, out) { }
-};
-
-namespace detail {
-
-// Workaround for VC6 ETI bug.
-template<typename In, typename Out>
-struct combine_traits {
- typedef combination<
- BOOST_DEDUCED_TYPENAME detail::unwrapped_type<In>::type,
- BOOST_DEDUCED_TYPENAME detail::unwrapped_type<Out>::type
- > type;
-};
-
-} // End namespace detail.
-
-//
-// Template name: combine.
-// Description: Takes a Source/Sink pair or InputFilter/OutputFilter pair and
-// returns a Source or Filter which performs input using the first member
-// of the pair and output using the second member of the pair.
-// Template parameters:
-// In - A model of Source or InputFilter, with the same char_type as Out.
-// Out - A model of Sink or OutputFilter, with the same char_type as In.
-//
-template<typename In, typename Out>
-typename detail::combine_traits<In, Out>::type
-combine(const In& in, const Out& out)
-{
- typedef typename detail::combine_traits<In, Out>::type return_type;
- return return_type(in, out);
-}
-
-//----------------------------------------------------------------------------//
-
-namespace detail {
-
-//--------------Implementation of combined_device-----------------------------//
-
-template<typename Source, typename Sink>
-inline combined_device<Source, Sink>::combined_device
- (const Source& src, const Sink& snk)
- : src_(src), sink_(snk) { }
-
-template<typename Source, typename Sink>
-inline std::streamsize
-combined_device<Source, Sink>::read(char_type* s, std::streamsize n)
-{ return iostreams::read(src_, s, n); }
-
-template<typename Source, typename Sink>
-inline std::streamsize
-combined_device<Source, Sink>::write(const char_type* s, std::streamsize n)
-{ return iostreams::write(sink_, s, n); }
-
-template<typename Source, typename Sink>
-inline void
-combined_device<Source, Sink>::close(BOOST_IOS::openmode which)
-{
- if (which == BOOST_IOS::in)
- detail::close_all(src_);
- if (which == BOOST_IOS::out)
- detail::close_all(sink_);
-}
-
-#ifndef BOOST_NO_STD_LOCALE
- template<typename Source, typename Sink>
- void combined_device<Source, Sink>::imbue(const std::locale& loc)
- {
- iostreams::imbue(src_, loc);
- iostreams::imbue(sink_, loc);
- }
-#endif
-
-//--------------Implementation of filter_pair---------------------------------//
-
-template<typename InputFilter, typename OutputFilter>
-inline combined_filter<InputFilter, OutputFilter>::combined_filter
- (const InputFilter& in, const OutputFilter& out) : in_(in), out_(out)
- { }
-
-#ifndef BOOST_NO_STD_LOCALE
- template<typename InputFilter, typename OutputFilter>
- void combined_filter<InputFilter, OutputFilter>::imbue
- (const std::locale& loc)
- {
- iostreams::imbue(in_, loc);
- iostreams::imbue(out_, loc);
- }
-#endif
-
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp>
-
-#endif // #ifndef BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/compose.hpp b/contrib/restricted/boost/boost/iostreams/compose.hpp
deleted file mode 100644
index 6d62721f33..0000000000
--- a/contrib/restricted/boost/boost/iostreams/compose.hpp
+++ /dev/null
@@ -1,493 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// Note: bidirectional streams are not supported.
-
-#ifndef BOOST_IOSTREAMS_COMPOSE_HPP_INCLUDED
-#define BOOST_IOSTREAMS_COMPOSE_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <algorithm> // min.
-#include <utility> // pair.
-#include <boost/config.hpp> // DEDUCED_TYPENAME.
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/detail/adapter/direct_adapter.hpp>
-#include <boost/iostreams/detail/call_traits.hpp>
-#include <boost/iostreams/detail/enable_if_stream.hpp>
-#include <boost/iostreams/detail/execute.hpp>
-#include <boost/iostreams/detail/functional.hpp>
-#include <boost/iostreams/operations.hpp>
-#include <boost/iostreams/traits.hpp> // mode_of, is_direct.
-#include <boost/mpl/if.hpp>
-#include <boost/ref.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC.
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-template< typename First,
- typename Second,
- typename FirstMode =
- BOOST_DEDUCED_TYPENAME mode_of<First>::type,
- typename SecondMode =
- BOOST_DEDUCED_TYPENAME mode_of<Second>::type >
-struct composite_mode
- : select<
- is_convertible<SecondMode, FirstMode>, FirstMode,
- is_convertible<FirstMode, SecondMode>, SecondMode,
- is_convertible<SecondMode, input>, input,
- else_, output
- >
- { };
-
-//
-// Template name: composite_device.
-// Description: Provides a Device view of a Filter, Device pair.
-// Template parameters:
-// Filter - A model of Filter.
-// Device - An indirect model of Device.
-//
-template< typename Filter,
- typename Device,
- typename Mode =
- BOOST_DEDUCED_TYPENAME composite_mode<Filter, Device>::type >
-class composite_device {
-private:
- typedef typename detail::param_type<Device>::type param_type;
- typedef typename mode_of<Filter>::type filter_mode;
- typedef typename mode_of<Device>::type device_mode;
- typedef typename
- iostreams::select< // Disambiguation for Tru64.
- is_direct<Device>, direct_adapter<Device>,
- is_std_io<Device>, Device&,
- else_, Device
- >::type value_type;
- BOOST_STATIC_ASSERT(is_filter<Filter>::value);
- BOOST_STATIC_ASSERT(is_device<Device>::value);
-public:
- typedef typename char_type_of<Filter>::type char_type;
- struct category
- : Mode,
- device_tag,
- closable_tag,
- flushable_tag,
- localizable_tag,
- optimally_buffered_tag
- { };
- composite_device(const Filter& flt, param_type dev);
- std::streamsize read(char_type* s, std::streamsize n);
- std::streamsize write(const char_type* s, std::streamsize n);
- std::streampos seek( stream_offset off, BOOST_IOS::seekdir way,
- BOOST_IOS::openmode which =
- BOOST_IOS::in | BOOST_IOS::out );
-
- void close();
- void close(BOOST_IOS::openmode which);
- bool flush();
- std::streamsize optimal_buffer_size() const;
-
- template<typename Locale> // Avoid dependency on <locale>
- void imbue(const Locale& loc)
- {
- iostreams::imbue(filter_, loc);
- iostreams::imbue(device_, loc);
- }
-
- Filter& first() { return filter_; }
- Device& second() { return device_; }
-private:
- Filter filter_;
- value_type device_;
-};
-
-//
-// Template name: composite_device.
-// Description: Provides a Device view of a Filter, Device pair.
-// Template parameters:
-// Filter - A model of Filter.
-// Device - An indirect model of Device.
-//
-template< typename Filter1,
- typename Filter2,
- typename Mode =
- BOOST_DEDUCED_TYPENAME composite_mode<Filter1, Filter2>::type >
-class composite_filter {
-private:
- typedef reference_wrapper<Filter2> filter_ref;
- typedef typename mode_of<Filter1>::type first_mode;
- typedef typename mode_of<Filter2>::type second_mode;
-
- // A dual-use filter cannot be composed with a read-write filter
- BOOST_STATIC_ASSERT(
- !(is_convertible<first_mode, dual_use>::value) ||
- !(is_convertible<second_mode, input>::value) ||
- !(is_convertible<second_mode, output>::value) ||
- (is_convertible<second_mode, dual_use>::value)
- );
- BOOST_STATIC_ASSERT(
- !(is_convertible<second_mode, dual_use>::value) ||
- !(is_convertible<first_mode, input>::value) ||
- !(is_convertible<first_mode, output>::value) ||
- (is_convertible<first_mode, dual_use>::value)
- );
- BOOST_STATIC_ASSERT(is_filter<Filter1>::value);
- BOOST_STATIC_ASSERT(is_filter<Filter2>::value);
-public:
- typedef typename char_type_of<Filter1>::type char_type;
- struct category
- : Mode,
- filter_tag,
- multichar_tag,
- closable_tag,
- flushable_tag,
- localizable_tag,
- optimally_buffered_tag
- { };
- composite_filter(const Filter1& filter1, const Filter2& filter2)
- : filter1_(filter1), filter2_(filter2)
- { }
-
- template<typename Source>
- std::streamsize read(Source& src, char_type* s, std::streamsize n)
- {
- composite_device<filter_ref, Source> cmp(boost::ref(filter2_), src);
- return iostreams::read(filter1_, cmp, s, n);
- }
-
- template<typename Sink>
- std::streamsize write(Sink& snk, const char_type* s, std::streamsize n)
- {
- composite_device<filter_ref, Sink> cmp(boost::ref(filter2_), snk);
- return iostreams::write(filter1_, cmp, s, n);
- }
-
- template<typename Device>
- std::streampos seek( Device& dev, stream_offset off, BOOST_IOS::seekdir way,
- BOOST_IOS::openmode which =
- BOOST_IOS::in | BOOST_IOS::out )
- {
- composite_device<filter_ref, Device> cmp(boost::ref(filter2_), dev);
- return iostreams::seek(filter1_, cmp, off, way, which);
- }
-
- template<typename Device>
- void close(Device& dev)
- {
- BOOST_STATIC_ASSERT((!is_convertible<category, two_sequence>::value));
- BOOST_STATIC_ASSERT((!is_convertible<category, dual_use>::value));
-
- // Create a new device by composing the second filter2_ with dev.
- composite_device<filter_ref, Device> cmp(boost::ref(filter2_), dev);
-
- // Close input sequences in reverse order and output sequences in
- // forward order
- if (!is_convertible<first_mode, dual_use>::value) {
- detail::execute_all(
- detail::call_close(filter2_, dev, BOOST_IOS::in),
- detail::call_close(filter1_, cmp, BOOST_IOS::in),
- detail::call_close(filter1_, cmp, BOOST_IOS::out),
- detail::call_close(filter2_, dev, BOOST_IOS::out)
- );
- } else if (is_convertible<second_mode, input>::value) {
- detail::execute_all(
- detail::call_close(filter2_, dev, BOOST_IOS::in),
- detail::call_close(filter1_, cmp, BOOST_IOS::in)
- );
- } else {
- detail::execute_all(
- detail::call_close(filter1_, cmp, BOOST_IOS::out),
- detail::call_close(filter2_, dev, BOOST_IOS::out)
- );
- }
- }
-
- template<typename Device>
- void close(Device& dev, BOOST_IOS::openmode which)
- {
- BOOST_STATIC_ASSERT(
- (is_convertible<category, two_sequence>::value) ||
- (is_convertible<category, dual_use>::value)
- );
-
- // Create a new device by composing the second filter2_ with dev.
- composite_device<filter_ref, Device> cmp(boost::ref(filter2_), dev);
-
- // Close input sequences in reverse order
- if ( which == BOOST_IOS::in &&
- ( !is_convertible<first_mode, dual_use>::value ||
- is_convertible<second_mode, input>::value ) )
- {
- detail::execute_all(
- detail::call_close(filter2_, dev, BOOST_IOS::in),
- detail::call_close(filter1_, cmp, BOOST_IOS::in)
- );
- }
-
- // Close output sequences in forward order
- if ( which == BOOST_IOS::out &&
- ( !is_convertible<first_mode, dual_use>::value ||
- is_convertible<second_mode, output>::value ) )
- {
- detail::execute_all(
- detail::call_close(filter1_, cmp, BOOST_IOS::out),
- detail::call_close(filter2_, dev, BOOST_IOS::out)
- );
- }
- }
-
- template<typename Device>
- bool flush(Device& dev)
- {
- composite_device<Filter2, Device> cmp(filter2_, dev);
- return iostreams::flush(filter1_, cmp);
- }
-
- std::streamsize optimal_buffer_size() const
- {
- std::streamsize first = iostreams::optimal_buffer_size(filter1_);
- std::streamsize second = iostreams::optimal_buffer_size(filter2_);
- return first < second ? second : first;
- }
-
- template<typename Locale> // Avoid dependency on <locale>
- void imbue(const Locale& loc)
- { // To do: consider using RAII.
- iostreams::imbue(filter1_, loc);
- iostreams::imbue(filter2_, loc);
- }
-
- Filter1& first() { return filter1_; }
- Filter2& second() { return filter2_; }
-private:
- Filter1 filter1_;
- Filter2 filter2_;
-};
-
-template<typename Filter, typename FilterOrDevice>
-struct composite_traits
- : mpl::if_<
- is_device<FilterOrDevice>,
- composite_device<Filter, FilterOrDevice>,
- composite_filter<Filter, FilterOrDevice>
- >
- { };
-
-} // End namespace detail.
-
-template<typename Filter, typename FilterOrDevice>
-struct composite : detail::composite_traits<Filter, FilterOrDevice>::type {
- typedef typename detail::param_type<FilterOrDevice>::type param_type;
- typedef typename detail::composite_traits<Filter, FilterOrDevice>::type base;
- composite(const Filter& flt, param_type dev)
- : base(flt, dev)
- { }
-};
-
-//--------------Implementation of compose-------------------------------------//
-
-// Note: The following workarounds are patterned after resolve.hpp. It has not
-// yet been confirmed that they are necessary.
-
-#ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //-------------------------//
-# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-------------------------------//
-
-template<typename Filter, typename FilterOrDevice>
-composite<Filter, FilterOrDevice>
-compose( const Filter& filter, const FilterOrDevice& fod
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(FilterOrDevice) )
-{ return composite<Filter, FilterOrDevice>(filter, fod); }
-
-template<typename Filter, typename Ch, typename Tr>
-composite< Filter, std::basic_streambuf<Ch, Tr> >
-compose(const Filter& filter, std::basic_streambuf<Ch, Tr>& sb)
-{ return composite< Filter, std::basic_streambuf<Ch, Tr> >(filter, sb); }
-
-template<typename Filter, typename Ch, typename Tr>
-composite< Filter, std::basic_istream<Ch, Tr> >
-compose(const Filter& filter, std::basic_istream<Ch, Tr>& is)
-{ return composite< Filter, std::basic_istream<Ch, Tr> >(filter, is); }
-
-template<typename Filter, typename Ch, typename Tr>
-composite< Filter, std::basic_ostream<Ch, Tr> >
-compose(const Filter& filter, std::basic_ostream<Ch, Tr>& os)
-{ return composite< Filter, std::basic_ostream<Ch, Tr> >(filter, os); }
-
-template<typename Filter, typename Ch, typename Tr>
-composite< Filter, std::basic_iostream<Ch, Tr> >
-compose(const Filter& filter, std::basic_iostream<Ch, Tr>& io)
-{ return composite< Filter, std::basic_iostream<Ch, Tr> >(filter, io); }
-
-# else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //---------------------//
-
-template<typename Filter, typename FilterOrDevice>
-composite<Filter, FilterOrDevice>
-compose( const Filter& filter, const FilterOrDevice& fod
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(FilterOrDevice) )
-{ return composite<Filter, FilterOrDevice>(filter, fod); }
-
-template<typename Filter>
-composite<Filter, std::streambuf>
-compose(const Filter& filter, std::streambuf& sb)
-{ return composite<Filter, std::streambuf>(filter, sb); }
-
-template<typename Filter>
-composite<Filter, std::istream>
-compose(const Filter& filter, std::istream& is)
-{ return composite<Filter, std::istream>(filter, is); }
-
-template<typename Filter>
-composite<Filter, std::ostream>
-compose(const Filter& filter, std::ostream& os)
-{ return composite<Filter, std::ostream>(filter, os); }
-
-template<typename Filter>
-composite<Filter, std::iostream>
-compose(const Filter& filter, std::iostream& io)
-{ return composite<Filter, std::iostream>(filter, io); }
-
-# endif // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------//
-#else // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //----------------//
-
-template<typename Filter, typename Stream>
-composite<Filter, Stream>
-compose(const Filter& flt, const Stream& strm, mpl::true_)
-{ // Bad overload resolution.
- return composite<Filter, Stream>(flt, const_cast<Stream&>(strm));
-}
-
-template<typename Filter, typename FilterOrDevice>
-composite<Filter, FilterOrDevice>
-compose(const Filter& flt, const FilterOrDevice& fod, mpl::false_)
-{ return composite<Filter, FilterOrDevice>(flt, fod); }
-
-template<typename Filter, typename FilterOrDevice>
-composite<Filter, FilterOrDevice>
-compose( const Filter& flt, const FilterOrDevice& fod
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) )
-{ return compose(flt, fod, is_std_io<FilterOrDevice>()); }
-
-# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- !defined(__GNUC__) // ---------------------------------------------------//
-
-template<typename Filter, typename FilterOrDevice>
-composite<Filter, FilterOrDevice>
-compose (const Filter& filter, FilterOrDevice& fod)
-{ return composite<Filter, FilterOrDevice>(filter, fod); }
-
-# endif // Borland 5.x or GCC //--------------------------------//
-#endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //---------------//
-
-//----------------------------------------------------------------------------//
-
-namespace detail {
-
-//--------------Implementation of composite_device---------------------------//
-
-template<typename Filter, typename Device, typename Mode>
-composite_device<Filter, Device, Mode>::composite_device
- (const Filter& flt, param_type dev)
- : filter_(flt), device_(dev)
- { }
-
-template<typename Filter, typename Device, typename Mode>
-inline std::streamsize composite_device<Filter, Device, Mode>::read
- (char_type* s, std::streamsize n)
-{ return iostreams::read(filter_, device_, s, n); }
-
-template<typename Filter, typename Device, typename Mode>
-inline std::streamsize composite_device<Filter, Device, Mode>::write
- (const char_type* s, std::streamsize n)
-{ return iostreams::write(filter_, device_, s, n); }
-
-template<typename Filter, typename Device, typename Mode>
-std::streampos composite_device<Filter, Device, Mode>::seek
- (stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
-{ return iostreams::seek(filter_, device_, off, way, which); }
-
-template<typename Filter, typename Device, typename Mode>
-void composite_device<Filter, Device, Mode>::close()
-{
- BOOST_STATIC_ASSERT((!is_convertible<Mode, two_sequence>::value));
- BOOST_STATIC_ASSERT(
- !(is_convertible<filter_mode, dual_use>::value) ||
- !(is_convertible<device_mode, input>::value) ||
- !(is_convertible<device_mode, output>::value)
- );
-
- // Close input sequences in reverse order and output sequences
- // in forward order
- if (!is_convertible<filter_mode, dual_use>::value) {
- detail::execute_all(
- detail::call_close(device_, BOOST_IOS::in),
- detail::call_close(filter_, device_, BOOST_IOS::in),
- detail::call_close(filter_, device_, BOOST_IOS::out),
- detail::call_close(device_, BOOST_IOS::out)
- );
- } else if (is_convertible<device_mode, input>::value) {
- detail::execute_all(
- detail::call_close(device_, BOOST_IOS::in),
- detail::call_close(filter_, device_, BOOST_IOS::in)
- );
- } else {
- detail::execute_all(
- detail::call_close(filter_, device_, BOOST_IOS::out),
- detail::call_close(device_, BOOST_IOS::out)
- );
- }
-}
-
-template<typename Filter, typename Device, typename Mode>
-void composite_device<Filter, Device, Mode>::close(BOOST_IOS::openmode which)
-{
- BOOST_STATIC_ASSERT((is_convertible<Mode, two_sequence>::value));
- BOOST_STATIC_ASSERT(!(is_convertible<filter_mode, dual_use>::value));
-
- // Close input sequences in reverse order
- if (which == BOOST_IOS::in) {
- detail::execute_all(
- detail::call_close(device_, BOOST_IOS::in),
- detail::call_close(filter_, device_, BOOST_IOS::in)
- );
- }
-
- // Close output sequences in forward order
- if (which == BOOST_IOS::out) {
- detail::execute_all(
- detail::call_close(filter_, device_, BOOST_IOS::out),
- detail::call_close(device_, BOOST_IOS::out)
- );
- }
-}
-
-template<typename Filter, typename Device, typename Mode>
-bool composite_device<Filter, Device, Mode>::flush()
-{
- bool r1 = iostreams::flush(filter_, device_);
- bool r2 = iostreams::flush(device_);
- return r1 && r2;
-}
-
-template<typename Filter, typename Device, typename Mode>
-std::streamsize
-composite_device<Filter, Device, Mode>::optimal_buffer_size() const
-{ return iostreams::optimal_buffer_size(device_); }
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp>
-
-#endif // #ifndef BOOST_IOSTREAMS_COMPOSE_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/copy.hpp b/contrib/restricted/boost/boost/iostreams/copy.hpp
deleted file mode 100644
index 3fae275b87..0000000000
--- a/contrib/restricted/boost/boost/iostreams/copy.hpp
+++ /dev/null
@@ -1,249 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// Contains: The function template copy, which reads data from a Source
-// and writes it to a Sink until the end of the sequence is reached, returning
-// the number of characters transfered.
-
-// The implementation is complicated by the need to handle smart adapters
-// and direct devices.
-
-#ifndef BOOST_IOSTREAMS_COPY_HPP_INCLUDED
-#define BOOST_IOSTREAMS_COPY_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/config.hpp> // Make sure ptrdiff_t is in std.
-#include <algorithm> // copy, min.
-#include <cstddef> // ptrdiff_t.
-#include <utility> // pair.
-#include <boost/bind.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/iostreams/chain.hpp>
-#include <boost/iostreams/constants.hpp>
-#include <boost/iostreams/detail/adapter/non_blocking_adapter.hpp>
-#include <boost/iostreams/detail/buffer.hpp>
-#include <boost/iostreams/detail/enable_if_stream.hpp>
-#include <boost/iostreams/detail/execute.hpp>
-#include <boost/iostreams/detail/functional.hpp>
-#include <boost/iostreams/detail/ios.hpp> // failure, streamsize.
-#include <boost/iostreams/detail/resolve.hpp>
-#include <boost/iostreams/detail/wrap_unwrap.hpp>
-#include <boost/iostreams/operations.hpp> // read, write, close.
-#include <boost/iostreams/pipeline.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
- // The following four overloads of copy_impl() optimize
- // copying in the case that one or both of the two devices
- // models Direct (see
- // http://www.boost.org/libs/iostreams/doc/index.html?path=4.1.1.4)
-
-// Copy from a direct source to a direct sink
-template<typename Source, typename Sink>
-std::streamsize copy_impl( Source& src, Sink& snk,
- std::streamsize /* buffer_size */,
- mpl::true_, mpl::true_ )
-{
- using namespace std;
- typedef typename char_type_of<Source>::type char_type;
- typedef std::pair<char_type*, char_type*> pair_type;
- pair_type p1 = iostreams::input_sequence(src);
- pair_type p2 = iostreams::output_sequence(snk);
- std::streamsize total =
- static_cast<std::streamsize>(
- (std::min)(p1.second - p1.first, p2.second - p2.first)
- );
- std::copy(p1.first, p1.first + total, p2.first);
- return total;
-}
-
-// Copy from a direct source to an indirect sink
-template<typename Source, typename Sink>
-std::streamsize copy_impl( Source& src, Sink& snk,
- std::streamsize /* buffer_size */,
- mpl::true_, mpl::false_ )
-{
- using namespace std;
- typedef typename char_type_of<Source>::type char_type;
- typedef std::pair<char_type*, char_type*> pair_type;
- pair_type p = iostreams::input_sequence(src);
- std::streamsize size, total;
- for ( total = 0, size = static_cast<std::streamsize>(p.second - p.first);
- total < size; )
- {
- std::streamsize amt =
- iostreams::write(snk, p.first + total, size - total);
- total += amt;
- }
- return total;
-}
-
-// Copy from an indirect source to a direct sink
-template<typename Source, typename Sink>
-std::streamsize copy_impl( Source& src, Sink& snk,
- std::streamsize buffer_size,
- mpl::false_, mpl::true_ )
-{
- typedef typename char_type_of<Source>::type char_type;
- typedef std::pair<char_type*, char_type*> pair_type;
- detail::basic_buffer<char_type> buf(buffer_size);
- pair_type p = snk.output_sequence();
- std::streamsize total = 0;
- std::ptrdiff_t capacity = p.second - p.first;
- while (true) {
- std::streamsize amt =
- iostreams::read(
- src,
- buf.data(),
- buffer_size < capacity - total ?
- buffer_size :
- static_cast<std::streamsize>(capacity - total)
- );
- if (amt == -1)
- break;
- std::copy(buf.data(), buf.data() + amt, p.first + total);
- total += amt;
- }
- return total;
-}
-
-// Copy from an indirect source to an indirect sink
-template<typename Source, typename Sink>
-std::streamsize copy_impl( Source& src, Sink& snk,
- std::streamsize buffer_size,
- mpl::false_, mpl::false_ )
-{
- typedef typename char_type_of<Source>::type char_type;
- detail::basic_buffer<char_type> buf(buffer_size);
- non_blocking_adapter<Sink> nb(snk);
- std::streamsize total = 0;
- bool done = false;
- while (!done) {
- std::streamsize amt;
- done = (amt = iostreams::read(src, buf.data(), buffer_size)) == -1;
- if (amt != -1) {
- iostreams::write(nb, buf.data(), amt);
- total += amt;
- }
- }
- return total;
-}
-
- // The following function object is used with
- // boost::iostreams::detail::execute() in the primary
- // overload of copy_impl(), below
-
-// Function object that delegates to one of the above four
-// overloads of compl_impl()
-template<typename Source, typename Sink>
-class copy_operation {
-public:
- typedef std::streamsize result_type;
- copy_operation(Source& src, Sink& snk, std::streamsize buffer_size)
- : src_(src), snk_(snk), buffer_size_(buffer_size)
- { }
- std::streamsize operator()()
- {
- return copy_impl( src_, snk_, buffer_size_,
- is_direct<Source>(), is_direct<Sink>() );
- }
- copy_operation(copy_operation const& other) = default;
-private:
- BOOST_DELETED_FUNCTION(copy_operation& operator=(const copy_operation&));
- Source& src_;
- Sink& snk_;
- std::streamsize buffer_size_;
-};
-
-// Primary overload of copy_impl. Delegates to one of the above four
-// overloads of compl_impl(), depending on which of the two given
-// devices, if any, models Direct (see
-// http://www.boost.org/libs/iostreams/doc/index.html?path=4.1.1.4)
-template<typename Source, typename Sink>
-std::streamsize copy_impl(Source src, Sink snk, std::streamsize buffer_size)
-{
- using namespace std;
- typedef typename char_type_of<Source>::type src_char;
- typedef typename char_type_of<Sink>::type snk_char;
- BOOST_STATIC_ASSERT((is_same<src_char, snk_char>::value));
- return detail::execute_all(
- copy_operation<Source, Sink>(src, snk, buffer_size),
- detail::call_close_all(src),
- detail::call_close_all(snk)
- );
-}
-
-} // End namespace detail.
-
-//------------------Definition of copy----------------------------------------//
-
-// Overload of copy() for the case where neither the source nor the sink is
-// a standard stream or stream buffer
-template<typename Source, typename Sink>
-std::streamsize
-copy( const Source& src, const Sink& snk,
- std::streamsize buffer_size = default_device_buffer_size
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(Source)
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(Sink) )
-{
- typedef typename char_type_of<Source>::type char_type;
- return detail::copy_impl( detail::resolve<input, char_type>(src),
- detail::resolve<output, char_type>(snk),
- buffer_size );
-}
-
-// Overload of copy() for the case where the source, but not the sink, is
-// a standard stream or stream buffer
-template<typename Source, typename Sink>
-std::streamsize
-copy( Source& src, const Sink& snk,
- std::streamsize buffer_size = default_device_buffer_size
- BOOST_IOSTREAMS_ENABLE_IF_STREAM(Source)
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(Sink) )
-{
- typedef typename char_type_of<Source>::type char_type;
- return detail::copy_impl( detail::wrap(src),
- detail::resolve<output, char_type>(snk),
- buffer_size );
-}
-
-// Overload of copy() for the case where the sink, but not the source, is
-// a standard stream or stream buffer
-template<typename Source, typename Sink>
-std::streamsize
-copy( const Source& src, Sink& snk,
- std::streamsize buffer_size = default_device_buffer_size
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(Source)
- BOOST_IOSTREAMS_ENABLE_IF_STREAM(Sink) )
-{
- typedef typename char_type_of<Source>::type char_type;
- return detail::copy_impl( detail::resolve<input, char_type>(src),
- detail::wrap(snk), buffer_size );
-}
-
-// Overload of copy() for the case where neither the source nor the sink is
-// a standard stream or stream buffer
-template<typename Source, typename Sink>
-std::streamsize
-copy( Source& src, Sink& snk,
- std::streamsize buffer_size = default_device_buffer_size
- BOOST_IOSTREAMS_ENABLE_IF_STREAM(Source)
- BOOST_IOSTREAMS_ENABLE_IF_STREAM(Sink) )
-{
- return detail::copy_impl(detail::wrap(src), detail::wrap(snk), buffer_size);
-}
-
-} } // End namespaces iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_COPY_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/absolute_path.hpp b/contrib/restricted/boost/boost/iostreams/detail/absolute_path.hpp
deleted file mode 100644
index 090958a95e..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/absolute_path.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.)
- *
- * See http://www.boost.org/libs/iostreams for documentation.
-
- * File: boost/iostreams/detail/execute.hpp
- * Date: Thu Dec 06 13:21:54 MST 2007
- * Copyright: 2007-2008 CodeRage, LLC
- * Author: Jonathan Turkanis
- * Contact: turkanis at coderage dot com
- *
- * Defines the function boost::iostreams::detail::absolute_path, used for
- * debug output for mapped files.
- */
-
-#ifndef BOOST_IOSTREAMS_DETAIL_ABSOLUTE_PATH_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_ABSOLUTE_PATH_HPP_INCLUDED
-
-#include <string>
-#include <boost/iostreams/detail/config/windows_posix.hpp>
-#ifdef BOOST_IOSTREAMS_WINDOWS
-# include <cctype>
-#endif
-#include <boost/iostreams/detail/current_directory.hpp>
-
-namespace boost { namespace iostreams { namespace detail {
-
-// Resolves the given path relative to the current working directory
-inline std::string absolute_path(const std::string& path)
-{
-#ifdef BOOST_IOSTREAMS_WINDOWS
- return path.size() && (path[0] == '/' || path[0] == '\\') ||
- path.size() > 1 && std::isalpha(path[0]) && path[1] == ':' ?
- path :
- current_directory() + '\\' + path;
-#else // #ifdef BOOST_IOSTREAMS_WINDOWS
- return path.size() && (path[0] == '/') ?
- path :
- current_directory() + '/' + path;
-#endif // #ifdef BOOST_IOSTREAMS_WINDOWS
-}
-
-} } } // End namespaces detail, iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_ABSOLUTE_PATH_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/adapter/device_adapter.hpp b/contrib/restricted/boost/boost/iostreams/detail/adapter/device_adapter.hpp
deleted file mode 100644
index 9dd723a0fd..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/adapter/device_adapter.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Defines the class template boost::iostreams::detail::device_adapter,
- * a convenience base class for device adapters.
- *
- * File: boost/iostreams/detail/adapter/filter_adapter.hpp
- * Date: Mon Nov 26 14:35:48 MST 2007
- *
- * Copyright: 2007-2008 CodeRage, LLC
- * Author: Jonathan Turkanis
- * Contact: turkanis at coderage dot com
- *
- * 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.)
- *
- * See http://www.boost.org/libs/iostreams for documentation.
- */
-
-#ifndef BOOST_IOSTREAMS_DETAIL_DEVICE_ADAPTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_DEVICE_ADAPTER_HPP_INCLUDED
-
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/detail/call_traits.hpp>
-#include <boost/iostreams/detail/ios.hpp>
-#include <boost/iostreams/operations.hpp>
-#include <boost/iostreams/traits.hpp>
-#include <boost/static_assert.hpp>
-
-namespace boost { namespace iostreams { namespace detail {
-
-template<typename T>
-class device_adapter {
-private:
- typedef typename detail::value_type<T>::type value_type;
- typedef typename detail::param_type<T>::type param_type;
-public:
- explicit device_adapter(param_type t) : t_(t) { }
- T& component() { return t_; }
-
- void close()
- {
- detail::close_all(t_);
- }
-
- void close(BOOST_IOS::openmode which)
- {
- iostreams::close(t_, which);
- }
-
- bool flush()
- {
- return iostreams::flush(t_);
- }
-
- template<typename Locale> // Avoid dependency on <locale>
- void imbue(const Locale& loc) { iostreams::imbue(t_, loc); }
-
- std::streamsize optimal_buffer_size() const
- { return iostreams::optimal_buffer_size(t_); }
-public:
- value_type t_;
-};
-
-//----------------------------------------------------------------------------//
-
-} } } // End namespaces detail, iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DEVICE_ADAPTER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/adapter/direct_adapter.hpp b/contrib/restricted/boost/boost/iostreams/detail/adapter/direct_adapter.hpp
deleted file mode 100644
index 243b4b0abf..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/adapter/direct_adapter.hpp
+++ /dev/null
@@ -1,281 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/config.hpp> // SFINAE, MSVC, put ptrdiff_t in std.
-#include <algorithm> // copy, min.
-#include <cstddef> // ptrdiff_t.
-#include <boost/detail/workaround.hpp>
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/detail/config/limits.hpp> // forwarding.
-#include <boost/iostreams/detail/config/wide_streams.hpp> // locale.
-#include <boost/iostreams/detail/double_object.hpp>
-#include <boost/iostreams/detail/error.hpp>
-#include <boost/iostreams/detail/ios.hpp> // openmode, seekdir, int types.
-#include <boost/iostreams/traits.hpp> // mode_of, is_direct.
-#include <boost/iostreams/operations.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/or.hpp>
-#include <boost/preprocessor/iteration/local.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // VC7.1
-
-namespace boost { namespace iostreams { namespace detail {
-
-//------------------Definition of direct_adapter_base-------------------------//
-
-// Put all initialization in base class to faciliate forwarding.
-template<typename Direct>
-class direct_adapter_base {
-public:
- typedef typename char_type_of<Direct>::type char_type;
- typedef typename mode_of<Direct>::type mode_type;
- struct category
- : mode_type,
- device_tag,
- closable_tag
- #ifndef BOOST_IOSTREAMS_NO_LOCALE
- , localizable_tag
- #endif
- { };
-protected:
- explicit direct_adapter_base(const Direct& d);
- typedef is_convertible<category, two_sequence> is_double;
- struct pointers {
- char_type *beg, *ptr, *end;
- };
- void init_input(mpl::true_);
- void init_input(mpl::false_) { }
- void init_output(mpl::true_);
- void init_output(mpl::false_) { }
- double_object<pointers, is_double> ptrs_;
- Direct d_;
-};
-
-template<typename Direct>
-class direct_adapter : private direct_adapter_base<Direct> {
-private:
- typedef direct_adapter_base<Direct> base_type;
- typedef typename base_type::pointers pointers;
- typedef typename base_type::is_double is_double;
- using base_type::ptrs_;
- using base_type::d_;
-public:
- typedef typename base_type::char_type char_type;
- typedef typename base_type::category category;
-
- // Constructors
-
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
- direct_adapter(const Direct& d) : base_type(d) { }
- direct_adapter(const direct_adapter& d) : base_type(d) { }
-# define BOOST_PP_LOCAL_LIMITS (1, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY)
-#else
- template<typename U>
- struct is_direct
- : mpl::or_<
- is_same<U, direct_adapter<Direct> >,
- is_same<U, Direct>
- >
- { };
- template<typename U>
- direct_adapter(const U& u)
- : base_type(forward(u, is_direct<U>()))
- { }
-# define BOOST_PP_LOCAL_LIMITS (2, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY)
-#endif
-
-#define BOOST_PP_LOCAL_MACRO(n) \
- template<BOOST_PP_ENUM_PARAMS(n, typename P)> \
- direct_adapter(BOOST_PP_ENUM_BINARY_PARAMS(n, const P, &p)) \
- : base_type(Direct(BOOST_PP_ENUM_PARAMS(n, p))) \
- { } \
- /**/
-#include BOOST_PP_LOCAL_ITERATE()
-#undef BOOST_PP_LOCAL_MACRO
-
- // Device interface.
-
- std::streamsize read(char_type* s, std::streamsize n);
- std::streamsize write(const char_type* s, std::streamsize n);
- std::streampos seek( stream_offset, BOOST_IOS::seekdir,
- BOOST_IOS::openmode = BOOST_IOS::in | BOOST_IOS::out );
- void close();
- void close(BOOST_IOS::openmode which);
-#ifndef BOOST_IOSTREAMS_NO_LOCALE
- void imbue(const std::locale&);
-#endif
-
- // Direct device access.
-
- Direct& operator*() { return d_; }
- Direct* operator->() { return &d_; }
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
-private:
- template<typename U>
- static Direct forward(const U& u, mpl::true_) { return u; }
- template<typename U>
- static Direct forward(const U& u, mpl::false_) { return Direct(u); }
-#endif
-};
-
-//--------------Definition of wrap_direct and unwrap_direct-------------------//
-
-template<typename Device>
-struct wrap_direct_traits
- : mpl::if_<
- is_direct<Device>,
- direct_adapter<Device>,
- Device
- >
- { };
-
-template<typename Device>
-typename wrap_direct_traits<Device>::type
-inline wrap_direct(Device dev)
-{
- typedef typename wrap_direct_traits<Device>::type type;
- return type(dev);
-}
-
-template<typename Device>
-inline Device& unwrap_direct(Device& d) { return d; }
-
-template<typename Device>
-inline Device& unwrap_direct(direct_adapter<Device>& d) { return *d; }
-
-//--------------Implementation of direct_adapter_base-------------------------//
-
-template<typename Direct>
-direct_adapter_base<Direct>::direct_adapter_base(const Direct& d) : d_(d)
-{
- init_input(is_convertible<category, input>());
- init_output(is_convertible<category, output>());
-}
-
-template<typename Direct>
-void direct_adapter_base<Direct>::init_input(mpl::true_)
-{
- std::pair<char_type*, char_type*> seq = iostreams::input_sequence(d_);
- ptrs_.first().beg = seq.first;
- ptrs_.first().ptr = seq.first;
- ptrs_.first().end = seq.second;
-}
-
-template<typename Direct>
-void direct_adapter_base<Direct>::init_output(mpl::true_)
-{
- std::pair<char_type*, char_type*> seq = iostreams::output_sequence(d_);
- ptrs_.second().beg = seq.first;
- ptrs_.second().ptr = seq.first;
- ptrs_.second().end = seq.second;
-}
-
-//--------------Implementation of direct_adapter------------------------------//
-
-template<typename Direct>
-inline std::streamsize direct_adapter<Direct>::read
- (char_type* s, std::streamsize n)
-{
- using namespace std;
- pointers& get = ptrs_.first();
- std::streamsize avail =
- static_cast<std::streamsize>(get.end - get.ptr);
- std::streamsize result = (std::min)(n, avail);
- std::copy(get.ptr, get.ptr + result, s);
- get.ptr += result;
- return result != 0 ? result : -1;
-}
-
-template<typename Direct>
-inline std::streamsize direct_adapter<Direct>::write
- (const char_type* s, std::streamsize n)
-{
- using namespace std;
- pointers& put = ptrs_.second();
- if (n > static_cast<std::streamsize>(put.end - put.ptr))
- boost::throw_exception(write_area_exhausted());
- std::copy(s, s + n, put.ptr);
- put.ptr += n;
- return n;
-}
-
-template<typename Direct>
-inline std::streampos direct_adapter<Direct>::seek
- ( stream_offset off, BOOST_IOS::seekdir way,
- BOOST_IOS::openmode which )
-{
- using namespace std;
- pointers& get = ptrs_.first();
- pointers& put = ptrs_.second();
- if (way == BOOST_IOS::cur && get.ptr != put.ptr)
- boost::throw_exception(bad_seek());
- ptrdiff_t next = 0;
- if ((which & BOOST_IOS::in) || !is_double::value) {
- if (way == BOOST_IOS::beg)
- next = off;
- else if (way == BOOST_IOS::cur)
- next = get.ptr - get.beg + off;
- else
- next = get.end - get.beg + off;
- if (next >= 0 && next <= get.end - get.beg)
- get.ptr = get.beg + next;
- else
- boost::throw_exception(bad_seek());
- }
- if ((which & BOOST_IOS::out) && is_double::value) {
- if (way == BOOST_IOS::beg)
- next = off;
- else if (way == BOOST_IOS::cur)
- next = put.ptr - put.beg + off;
- else
- next = put.end - put.beg + off;
- if (next >= 0 && next <= put.end - put.beg)
- put.ptr = put.beg + next;
- else
- boost::throw_exception(bad_seek());
- }
- return offset_to_position(next);
-}
-
-template<typename Direct>
-void direct_adapter<Direct>::close()
-{
- BOOST_STATIC_ASSERT((!is_convertible<category, two_sequence>::value));
- detail::close_all(d_);
-}
-
-template<typename Direct>
-void direct_adapter<Direct>::close(BOOST_IOS::openmode which)
-{
- BOOST_STATIC_ASSERT((is_convertible<category, two_sequence>::value));
- boost::iostreams::close(d_, which);
-}
-
-#ifndef BOOST_IOSTREAMS_NO_LOCALE
- template<typename Direct>
- void direct_adapter<Direct>::imbue(const std::locale& loc)
- { boost::iostreams::imbue(d_, loc); }
-#endif
-
-} } } // End namespaces detail, iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp>
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/adapter/filter_adapter.hpp b/contrib/restricted/boost/boost/iostreams/detail/adapter/filter_adapter.hpp
deleted file mode 100644
index a2ab49250b..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/adapter/filter_adapter.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Defines the class template boost::iostreams::detail::filter_adapter,
- * a convenience base class for filter adapters.
- *
- * File: boost/iostreams/detail/adapter/filter_adapter.hpp
- * Date: Mon Nov 26 14:35:48 MST 2007
- * Copyright: 2007-2008 CodeRage, LLC
- * Author: Jonathan Turkanis
- * Contact: turkanis at coderage dot com
- *
- * 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.)
- *
- * See http://www.boost.org/libs/iostreams for documentation.
- */
-
-#ifndef BOOST_IOSTREAMS_DETAIL_FILTER_ADAPTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_FILTER_ADAPTER_HPP_INCLUDED
-
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/detail/call_traits.hpp>
-#include <boost/iostreams/detail/ios.hpp>
-#include <boost/iostreams/operations.hpp>
-#include <boost/iostreams/traits.hpp>
-#include <boost/static_assert.hpp>
-
-namespace boost { namespace iostreams { namespace detail {
-
-template<typename T>
-class filter_adapter {
-private:
- typedef typename detail::value_type<T>::type value_type;
- typedef typename detail::param_type<T>::type param_type;
-public:
- explicit filter_adapter(param_type t) : t_(t) { }
- T& component() { return t_; }
-
- template<typename Device>
- void close(Device& dev)
- {
- detail::close_all(t_, dev);
- }
-
- template<typename Device>
- void close(Device& dev, BOOST_IOS::openmode which)
- {
- iostreams::close(t_, dev, which);
- }
-
- template<typename Device>
- void flush(Device& dev)
- {
- return iostreams::flush(t_, dev);
- }
-
- template<typename Locale> // Avoid dependency on <locale>
- void imbue(const Locale& loc) { iostreams::imbue(t_, loc); }
-
- std::streamsize optimal_buffer_size() const
- { return iostreams::optimal_buffer_size(t_); }
-public:
- value_type t_;
-};
-
-//----------------------------------------------------------------------------//
-
-} } } // End namespaces detail, iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_FILTER_ADAPTER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/add_facet.hpp b/contrib/restricted/boost/boost/iostreams/detail/add_facet.hpp
deleted file mode 100644
index 6033d4f8a1..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/add_facet.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// Borrowed from <boost/archive/add_facet.hpp>
-
-#ifndef BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/config.hpp> // BOOST_DINKUMWARE_STDLIB.
-#include <boost/detail/workaround.hpp>
-
-//------------------Definition of add_facet-----------------------------------//
-
-// Does STLport uses old Dinkumware locale?
-#if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && \
- defined(_STLP_NO_OWN_IOSTREAMS) \
- /**/
-# if (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
-# define BOOST_IOSTREMS_STLPORT_WITH_OLD_DINKUMWARE
-# endif
-#endif
-
-namespace boost { namespace iostreams { namespace detail {
-
-template<class Facet>
-inline std::locale add_facet(const std::locale &l, Facet * f)
-{
- return
- #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) || \
- defined(BOOST_IOSTREMS_STLPORT_WITH_OLD_DINKUMWARE) \
- /**/
- std::locale(std::_Addfac(l, f));
- #else
- // standard compatible
- std::locale(l, f);
- #endif
-}
-
-} } } // End namespaces detail, iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/broken_overload_resolution/stream.hpp b/contrib/restricted/boost/boost/iostreams/detail/broken_overload_resolution/stream.hpp
deleted file mode 100644
index 834f996f40..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/broken_overload_resolution/stream.hpp
+++ /dev/null
@@ -1,184 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_STREAM_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_STREAM_HPP_INCLUDED
-
-#include <boost/iostreams/detail/broken_overload_resolution/forward.hpp>
-
-namespace boost { namespace iostreams {
-
-template< typename Device,
- typename Tr =
- BOOST_IOSTREAMS_CHAR_TRAITS(
- BOOST_DEDUCED_TYPENAME char_type_of<Device>::type
- ),
- typename Alloc =
- std::allocator<
- BOOST_DEDUCED_TYPENAME char_type_of<Device>::type
- > >
-struct stream : detail::stream_base<Device, Tr, Alloc> {
-public:
- typedef typename char_type_of<Device>::type char_type;
- struct category
- : mode_of<Device>::type,
- closable_tag,
- detail::stream_traits<Device, Tr>::stream_tag
- { };
- BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr)
-private:
- typedef typename
- detail::stream_traits<
- Device, Tr
- >::stream_type stream_type;
-public:
- stream() { }
- template<typename U0>
- stream(const U0& u0)
- {
- open_impl(detail::forward<Device, U0>(), u0);
- }
- template<typename U0, typename U1>
- stream(const U0& u0, const U1& u1)
- {
- open_impl(detail::forward<Device, U0>(), u0, u1);
- }
- template<typename U0, typename U1, typename U2>
- stream(const U0& u0, const U1& u1, const U2& u2)
- {
- open_impl(detail::forward<Device, U0>(), u0, u1, u2);
- }
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------//
- template<typename U0>
- stream(U0& u0)
- {
- open_impl(detail::forward<Device, U0>(), u0);
- }
- template<typename U0, typename U1>
- stream(U0& u0, const U1& u1)
- {
- open_impl(detail::forward<Device, U0>(), u0, u1);
- }
- template<typename U0, typename U1, typename U2>
- stream(U0& u0, const U1& u1, const U2& u2)
- {
- open_impl(detail::forward<Device, U0>(), u0, u1, u2);
- }
-#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------//
- template<typename U0>
- void open(const U0& u0)
- {
- open_impl(detail::forward<Device, U0>(), u0);
- }
- template<typename U0, typename U1>
- void open(const U0& u0, const U1& u1)
- {
- open_impl(detail::forward<Device, U0>(), u0, u1);
- }
- template<typename U0, typename U1, typename U2>
- void open(const U0& u0, const U1& u1, const U2& u2)
- {
- open_impl(detail::forward<Device, U0>(), u0, u1, u2);
- }
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------//
- template<typename U0>
- void open(U0& u0)
- {
- open_impl(detail::forward<Device, U0>(), u0);
- }
- template<typename U0, typename U1>
- void open(U0& u0, const U1& u1)
- {
- open_impl(detail::forward<Device, U0>(), u0, u1);
- }
- template<typename U0, typename U1, typename U2>
- void open(U0& u0, const U1& u1, const U2& u2)
- {
- open_impl(detail::forward<Device, U0>(), u0, u1, u2);
- }
-#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------//
- bool is_open() const { return this->member.is_open(); }
- void close() { this->member.close(); }
- bool auto_close() const { return this->member.auto_close(); }
- void set_auto_close(bool close) { this->member.set_auto_close(close); }
- bool strict_sync() { return this->member.strict_sync(); }
- Device& operator*() { return *this->member; }
- Device* operator->() { return &*this->member; }
-private:
- template<typename U0>
- void open_impl(mpl::false_, const U0& u0)
- {
- this->clear();
- this->member.open(u0);
- }
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------//
- template<typename U0>
- void open_impl(mpl::false_, U0& u0)
- {
- this->clear();
- this->member.open(detail::wrap(u0));
- }
-#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------//
- template<typename U0>
- void open_impl(mpl::true_, const U0& u0)
- {
- this->clear();
- this->member.open(Device(const_cast<U0&>(u0)));
- }
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------//
- template<typename U0>
- void open_impl(mpl::true_, U0& u0)
- {
- this->clear();
- this->member.open(Device(u0));
- }
-#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------//
- template<typename U0, typename U1>
- void open_impl(mpl::false_, const U0& u0, const U1& u1)
- {
- this->clear();
- this->member.open(u0, u1);
- }
- template<typename U0, typename U1>
- void open_impl(mpl::true_, const U0& u0, const U1& u1)
- {
- this->clear();
- this->member.open(Device(const_cast<U0&>(u0), u1));
- }
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------//
- template<typename U0, typename U1>
- void open_impl(mpl::true_, U0& u0, const U1& u1)
- {
- this->clear();
- this->member.open(Device(u0, u1));
- }
-#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------//
- template<typename U0, typename U1, typename U2>
- void open_impl(mpl::false_, const U0& u0, const U1& u1, const U2& u2)
- {
- this->clear();
- this->member.open(u0, u1, u2);
- }
- template<typename U0, typename U1, typename U2>
- void open_impl(mpl::true_, const U0& u0, const U1& u1, const U2& u2)
- {
- this->clear();
- this->member.open(Device(const_cast<U0&>(u0), u1, u2));
- }
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------//
- template<typename U0, typename U1, typename U2>
- void open_impl(mpl::true_, U0& u0, const U1& u1, const U2& u2)
- {
- this->clear();
- this->member.open(Device(u0, u1, u2));
- }
-#endif
-};
-
-} } // End namespaces iostreams, boost.
-
-#endif BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_STREAM_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/codecvt_helper.hpp b/contrib/restricted/boost/boost/iostreams/detail/codecvt_helper.hpp
deleted file mode 100644
index 79e9544ac0..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/codecvt_helper.hpp
+++ /dev/null
@@ -1,214 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// Contains the definition of the template codecvt_helper, useful for
-// defining specializations of std::codecvt where state_type != mbstate_t.
-// Compensates for the fact that some standard library implementations
-// do not derive the primiary codecvt template from locale::facet or
-// provide the correct member types and functions.
-
-// Usage:
-//
-// // In global namespace:
-// BOOST_IOSTREAMS_CODECVT_SPEC(mystate)
-//
-// // In user namespace:
-// template<typename Intern, typename Extern>
-// struct mycodecvt : codecvt_helper<Intern, Extern, State> { ... };
-//
-// // Or:
-// struct mycodecvt : codecvt_helper<wchar_t, char, State> { ... };
-//
-// Etc.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HELPER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_CODECVT_HELPER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/config.hpp> // Put size_t in std, BOOST_MSVC, Dinkum.
-#include <boost/detail/workaround.hpp>
-#include <algorithm> // min.
-#include <cstddef> // size_t.
-#include <locale> // locale, codecvt_base, codecvt.
-#include <boost/iostreams/detail/config/codecvt.hpp>
-
-//------------------Definition of traits--------------------------------------//
-
-namespace boost { namespace iostreams { namespace detail {
-
-#if !BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) //-----------------------//
-
-template<typename T>
-struct codecvt_intern { typedef typename T::intern_type type; };
-
-template<typename T>
-struct codecvt_extern { typedef typename T::extern_type type; };
-
-#else // #if !BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) //--------------//
-
-template<typename T>
-struct codecvt_intern { typedef typename T::from_type type; };
-
-template<typename T>
-struct codecvt_extern { typedef typename T::to_type type; };
-
-#endif // #if !BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) //-------------//
-
-template<typename T>
-struct codecvt_state { typedef typename T::state_type type; };
-
-} } } // End namespaces detail, iostreams, boost.
-
-//------------------Definition of codecvt_impl--------------------------------//
-
-#if defined(BOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION) || \
- defined(BOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION) || \
- defined(BOOST_IOSTREAMS_NO_LOCALE) \
- /**/
-
-namespace boost { namespace iostreams { namespace detail {
-
-template<typename Intern, typename Extern, typename State>
-struct codecvt_impl : std::locale::facet, std::codecvt_base {
-public:
- typedef Intern intern_type;
- typedef Extern extern_type;
- typedef State state_type;
-
- codecvt_impl(std::size_t refs = 0) : std::locale::facet(refs) { }
-
- std::codecvt_base::result
- in( State& state, const Extern* first1, const Extern* last1,
- const Extern*& next1, Intern* first2, Intern* last2,
- Intern*& next2 ) const
- {
- return do_in(state, first1, last1, next1, first2, last2, next2);
- }
-
- std::codecvt_base::result
- out( State& state, const Intern* first1, const Intern* last1,
- const Intern*& next1, Extern* first2, Extern* last2,
- Extern*& next2 ) const
- {
- return do_out(state, first1, last1, next1, first2, last2, next2);
- }
-
- std::codecvt_base::result
- unshift(State& state, Extern* first2, Extern* last2, Extern*& next2) const
- {
- return do_unshift(state, first2, last2, next2);
- }
-
- bool always_noconv() const noexcept { return do_always_noconv(); }
-
- int max_length() const noexcept { return do_max_length(); }
-
- int encoding() const noexcept { return do_encoding(); }
-
- int length( BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER State& state,
- const Extern* first1, const Extern* last1,
- std::size_t len2 ) const noexcept
- {
- return do_length(state, first1, last1, len2);
- }
-protected:
- std::codecvt_base::result
- virtual do_in( State&, const Extern*, const Extern*, const Extern*&,
- Intern*, Intern*, Intern*& ) const
- {
- return std::codecvt_base::noconv;
- }
-
- std::codecvt_base::result
- virtual do_out( State&, const Intern*, const Intern*, const Intern*&,
- Extern*, Extern*, Extern*& ) const
- {
- return std::codecvt_base::noconv;
- }
-
- std::codecvt_base::result
- virtual do_unshift(State&, Extern*, Extern*, Extern*&) const
- {
- return std::codecvt_base::ok;
- }
-
- virtual bool do_always_noconv() const noexcept { return true; }
-
- virtual int do_max_length() const noexcept { return 1; }
-
- virtual int do_encoding() const noexcept { return 1; }
-
- virtual int do_length( BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER State&,
- const Extern* first1, const Extern* last1,
- std::size_t len2 ) const noexcept
- {
- return (std::min)(static_cast<std::size_t>(last1 - first1), len2);
- }
-};
-
-} } } // End namespaces detail, iostreams, boost.
-
-#endif // no primary codecvt definition, empty definition.
-
-//------------------Definition of BOOST_IOSTREAMS_CODECVT_SPEC----------------//
-
-#if defined(BOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION) || \
- defined(BOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION) \
- /**/
-# define BOOST_IOSTREAMS_CODECVT_SPEC(state) \
- namespace std { \
- template<typename Intern, typename Extern> \
- class codecvt<Intern, Extern, state> \
- : public ::boost::iostreams::detail::codecvt_impl< \
- Intern, Extern, state \
- > \
- { \
- public: \
- codecvt(std::size_t refs = 0) \
- : ::boost::iostreams::detail::codecvt_impl< \
- Intern, Extern, state \
- >(refs) \
- { } \
- static std::locale::id id; \
- }; \
- template<typename Intern, typename Extern> \
- std::locale::id codecvt<Intern, Extern, state>::id; \
- } \
- /**/
-#else
-# define BOOST_IOSTREAMS_CODECVT_SPEC(state)
-#endif // no primary codecvt definition, or empty definition.
-
-namespace boost { namespace iostreams { namespace detail {
-
-//------------------Definition of codecvt_helper------------------------------//
-
-template<typename Intern, typename Extern, typename State>
-struct codecvt_helper : std::codecvt<Intern, Extern, State> {
- typedef Intern intern_type;
- typedef Extern extern_type;
- typedef State state_type;
- codecvt_helper(std::size_t refs = 0)
- #if !defined(BOOST_IOSTREAMS_NO_CODECVT_CTOR_FROM_SIZE_T)
- : std::codecvt<Intern, Extern, State>(refs)
- #else
- : std::codecvt<Intern, Extern, State>()
- #endif
- { }
-#ifdef BOOST_IOSTREAMS_NO_CODECVT_MAX_LENGTH
- int max_length() const noexcept { return do_max_length(); }
-protected:
- virtual int do_max_length() const noexcept { return 1; }
-#endif
-};
-
-} } } // End namespaces detail, iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HELPER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/codecvt_holder.hpp b/contrib/restricted/boost/boost/iostreams/detail/codecvt_holder.hpp
deleted file mode 100644
index 13a93334eb..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/codecvt_holder.hpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// Contains machinery for performing code conversion.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HOLDER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_CODECVT_HOLDER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <cwchar> // mbstate_t.
-#include <locale> // codecvt, locale.
-#include <boost/config.hpp> // HAS_MACRO_USE_FACET.
-#include <boost/iostreams/detail/config/codecvt.hpp>
-
-namespace boost { namespace iostreams { namespace detail {
-
-struct default_codecvt {
- typedef wchar_t intern_type, from_type;
- typedef char extern_type, to_type;
- typedef std::mbstate_t state_type;
-};
-
-template<typename Codecvt>
-struct codecvt_holder {
- typedef Codecvt codecvt_type;
- const codecvt_type& get() const { return codecvt_; }
- void imbue(const std::locale&) { }
- Codecvt codecvt_;
-};
-
-template<>
-struct codecvt_holder<default_codecvt> {
- typedef std::codecvt<wchar_t, char, std::mbstate_t> codecvt_type;
- codecvt_holder() { reset_codecvt(); }
- const codecvt_type& get() const { return *codecvt_; }
- void imbue(const std::locale& loc)
- {
- loc_ = loc;
- reset_codecvt();
- }
- void reset_codecvt()
- {
- using namespace std;
- #ifndef BOOST_HAS_MACRO_USE_FACET
- codecvt_ = & use_facet< codecvt_type >(loc_);
- #else
- codecvt_ = & _USE(loc_, codecvt_type);
- #endif
- }
- std::locale loc_; // Prevent codecvt_ from being freed.
- const codecvt_type* codecvt_;
-};
-
-} } } // End namespaces detail, iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HOLDER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/counted_array.hpp b/contrib/restricted/boost/boost/iostreams/detail/counted_array.hpp
deleted file mode 100644
index c0cd8a1765..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/counted_array.hpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_COUNTED_ARRAY_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_COUNTED_ARRAY_HPP_INCLUDED
-
-#include <algorithm> // min.
-#include <cstddef> // size_t
-#include <string> // char_traits
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/detail/char_traits.hpp>
-#include <boost/iostreams/detail/ios.hpp> // streamsize.
-
-namespace boost { namespace iostreams { namespace detail {
-
-template<typename Ch>
-class counted_array_source {
-public:
- typedef Ch char_type;
- typedef source_tag category;
- counted_array_source(const Ch* buf, std::streamsize size)
- : buf_(buf), ptr_(0), end_(size)
- { }
- std::streamsize read(Ch* s, std::streamsize n)
- {
- using namespace std;
- streamsize result = (std::min)(n, end_ - ptr_);
- char_traits<char_type>::copy(
- s,
- buf_ + ptr_,
- static_cast<size_t>(result)
- );
- ptr_ += result;
- return result;
- }
- std::streamsize count() const { return ptr_; }
-private:
- const Ch* buf_;
- std::streamsize ptr_, end_;
-};
-
-template<typename Ch>
-struct counted_array_sink {
-public:
- typedef Ch char_type;
- typedef sink_tag category;
- counted_array_sink(Ch* buf, std::streamsize size)
- : buf_(buf), ptr_(0), end_(size)
- { }
- std::streamsize write(const Ch* s, std::streamsize n)
- {
- using namespace std;
- std::streamsize result = (std::min)(n, end_ - ptr_);
- char_traits<char_type>::copy(
- buf_ + ptr_,
- s,
- static_cast<size_t>(result)
- );
- ptr_ += result;
- return result;
- }
- std::streamsize count() const { return ptr_; }
-private:
- Ch* buf_;
- std::streamsize ptr_, end_;
-};
-
-} } } // End namespaces iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_COUNTED_ARRAY_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/current_directory.hpp b/contrib/restricted/boost/boost/iostreams/detail/current_directory.hpp
deleted file mode 100644
index 374444c59f..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/current_directory.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.)
- *
- * See http://www.boost.org/libs/iostreams for documentation.
-
- * File: boost/iostreams/detail/execute.hpp
- * Date: Thu Dec 06 13:21:54 MST 2007
- * Copyright: 2007-2008 CodeRage, LLC
- * Author: Jonathan Turkanis
- * Contact: turkanis at coderage dot com
- *
- * Defines the function boost::iostreams::detail::current_directory, used by
- * boost::iostreams::detail::absolute_path.
- */
-
-#ifndef BOOST_IOSTREAMS_DETAIL_CURRENT_DIRECTORY_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_CURRENT_DIRECTORY_HPP_INCLUDED
-
-#include <boost/config.hpp> // make sure size_t is in std.
-#include <cstddef> // size_t
-#include <string>
-#include <boost/iostreams/detail/buffer.hpp>
-#include <boost/iostreams/detail/config/windows_posix.hpp>
-#include <boost/iostreams/detail/system_failure.hpp>
-#ifdef BOOST_IOSTREAMS_WINDOWS
-# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-# include <windows.h>
-#else
-# include <unistd.h> // sysconf.
-#endif
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp>
-
-namespace boost { namespace iostreams { namespace detail {
-
-// Returns the current working directory
-inline std::string current_directory()
-{
-#ifdef BOOST_IOSTREAMS_WINDOWS
- DWORD length;
- basic_buffer<char> buf(MAX_PATH);
- while (true) {
- length = ::GetCurrentDirectoryA(buf.size(), buf.data());
- if (!length)
- throw_system_failure("failed determining current directory");
- if (length < static_cast<DWORD>(buf.size()))
- break;
- buf.resize(buf.size() * 2);
- }
- return std::string(buf.data(), length);
-#else // #ifdef BOOST_IOSTREAMS_WINDOWS
- basic_buffer<char> buf(pathconf(".", _PC_PATH_MAX));
- if (!getcwd(buf.data(), static_cast<size_t>(buf.size())))
- throw_system_failure("failed determining current directory");
- return std::string(buf.data());
-#endif // #ifdef BOOST_IOSTREAMS_WINDOWS
-}
-
-} } } // End namespaces detail, iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp>
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CURRENT_DIRECTORY_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/newline.hpp b/contrib/restricted/boost/boost/iostreams/detail/newline.hpp
deleted file mode 100644
index d6fceb04b0..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/newline.hpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_NEWLINE_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_NEWLINE_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-namespace boost { namespace iostreams { namespace detail {
-
-template<typename Ch>
-struct newline;
-
-template<>
-struct newline<char> {
- BOOST_STATIC_CONSTANT(char, value = '\n');
-};
-
-template<>
-struct newline<wchar_t> {
- BOOST_STATIC_CONSTANT(wchar_t, value = L'\n');
-};
-
-} } } // End namespaces detaill, iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_NEWLINE_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/param_type.hpp b/contrib/restricted/boost/boost/iostreams/detail/param_type.hpp
deleted file mode 100644
index 3a9949348c..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/param_type.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_PARAM_TYPE_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_PARAM_TYPE_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/iostreams/traits.hpp>
-#include <boost/mpl/if.hpp>
-
-namespace boost { namespace iostreams { namespace detail {
-
-template<typename T>
-struct param_type {
- typedef typename mpl::if_<is_std_io<T>, T&, const T&>::type type;
-};
-
-} } } // End namespaces detail, iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_PARAM_TYPE_HPP_INCLUDED //-----------//
diff --git a/contrib/restricted/boost/boost/iostreams/detail/restrict_impl.hpp b/contrib/restricted/boost/boost/iostreams/detail/restrict_impl.hpp
deleted file mode 100644
index 8278db5a6a..0000000000
--- a/contrib/restricted/boost/boost/iostreams/detail/restrict_impl.hpp
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * 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.)
- *
- * See http://www.boost.org/libs/iostreams for documentation.
-
- * File: boost/iostreams/detail/restrict_impl.hpp
- * Date: Sun Jan 06 12:57:30 MST 2008
- * Copyright: 2007-2008 CodeRage, LLC
- * Author: Jonathan Turkanis
- * Contact: turkanis at coderage dot com
- *
- * If included with the macro BOOST_IOSTREAMS_RESTRICT undefined, defines the
- * class template boost::iostreams::restriction. If included with the macro
- * BOOST_IOSTREAMS_RESTRICT defined as an identifier, defines the overloaded
- * function template boost::iostreams::BOOST_IOSTREAMS_RESTRICT, and object
- * generator for boost::iostreams::restriction.
- *
- * This design allows <boost/iostreams/restrict.hpp> and
- * <boost/iostreams/slice.hpp> to share an implementation.
- */
-
-#if !defined(BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED) && \
- !defined(BOOST_IOSTREAMS_RESTRICT)
-# define BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED
-
-//------------------Implementation of restriction-----------------------------//
-
-# include <algorithm> // min.
-# include <utility> // pair.
-# include <boost/cstdint.hpp> // intmax_t.
-# include <boost/config.hpp> // DEDUCED_TYPENAME.
-# include <boost/iostreams/categories.hpp>
-# include <boost/iostreams/char_traits.hpp>
-# include <boost/iostreams/detail/adapter/device_adapter.hpp>
-# include <boost/iostreams/detail/adapter/filter_adapter.hpp>
-# include <boost/iostreams/detail/call_traits.hpp>
-# include <boost/iostreams/detail/enable_if_stream.hpp>
-# include <boost/iostreams/detail/error.hpp>
-# include <boost/iostreams/detail/ios.hpp> // failure.
-# include <boost/iostreams/detail/select.hpp>
-# include <boost/iostreams/operations.hpp>
-# include <boost/iostreams/skip.hpp>
-# include <boost/iostreams/traits.hpp> // mode_of, is_direct.
-# include <boost/mpl/bool.hpp>
-# include <boost/static_assert.hpp>
-# include <boost/throw_exception.hpp>
-# include <boost/type_traits/is_convertible.hpp>
-
-# include <boost/iostreams/detail/config/disable_warnings.hpp>
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-//
-// Template name: restricted_indirect_device.
-// Description: Provides an restricted view of an indirect Device.
-// Template parameters:
-// Device - An indirect model of Device that models either Source or
-// SeekableDevice.
-//
-template<typename Device>
-class restricted_indirect_device : public device_adapter<Device> {
-private:
- typedef typename detail::param_type<Device>::type param_type;
-public:
- typedef typename char_type_of<Device>::type char_type;
- typedef typename mode_of<Device>::type mode;
- BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
- struct category
- : mode,
- device_tag,
- closable_tag,
- flushable_tag,
- localizable_tag,
- optimally_buffered_tag
- { };
- restricted_indirect_device( param_type dev, stream_offset off,
- stream_offset len = -1 );
- std::streamsize read(char_type* s, std::streamsize n);
- std::streamsize write(const char_type* s, std::streamsize n);
- std::streampos seek(stream_offset off, BOOST_IOS::seekdir way);
-private:
- stream_offset beg_, pos_, end_;
-};
-
-//
-// Template name: restricted_direct_device.
-// Description: Provides an restricted view of a Direct Device.
-// Template parameters:
-// Device - A model of Direct and Device.
-//
-template<typename Device>
-class restricted_direct_device : public device_adapter<Device> {
-public:
- typedef typename char_type_of<Device>::type char_type;
- typedef std::pair<char_type*, char_type*> pair_type;
- typedef typename mode_of<Device>::type mode;
- BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
- struct category
- : mode_of<Device>::type,
- device_tag,
- direct_tag,
- closable_tag,
- localizable_tag
- { };
- restricted_direct_device( const Device& dev, stream_offset off,
- stream_offset len = -1 );
- pair_type input_sequence();
- pair_type output_sequence();
-private:
- pair_type sequence(mpl::true_);
- pair_type sequence(mpl::false_);
- char_type *beg_, *end_;
-};
-
-//
-// Template name: restricted_filter.
-// Description: Provides an restricted view of a Filter.
-// Template parameters:
-// Filter - An indirect model of Filter.
-//
-template<typename Filter>
-class restricted_filter : public filter_adapter<Filter> {
-public:
- typedef typename char_type_of<Filter>::type char_type;
- typedef typename mode_of<Filter>::type mode;
- BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
- struct category
- : mode,
- filter_tag,
- multichar_tag,
- closable_tag,
- localizable_tag,
- optimally_buffered_tag
- { };
- restricted_filter( const Filter& flt, stream_offset off,
- stream_offset len = -1 );
-
- template<typename Source>
- std::streamsize read(Source& src, char_type* s, std::streamsize n)
- {
- using namespace std;
- if (!open_)
- open(src, BOOST_IOS::in);
- std::streamsize amt =
- end_ != -1 ?
- (std::min) (n, static_cast<std::streamsize>(end_ - pos_)) :
- n;
- std::streamsize result =
- iostreams::read(this->component(), src, s, amt);
- if (result != -1)
- pos_ += result;
- return result;
- }
-
- template<typename Sink>
- std::streamsize write(Sink& snk, const char_type* s, std::streamsize n)
- {
- if (!open_)
- open(snk, BOOST_IOS::out);
- if (end_ != -1 && pos_ + n >= end_) {
- if(pos_ < end_)
- pos_ += iostreams::write(this->component(),
- snk, s, end_ - pos_);
- boost::throw_exception(bad_write());
- }
- std::streamsize result =
- iostreams::write(this->component(), snk, s, n);
- pos_ += result;
- return result;
- }
-
- template<typename Device>
- std::streampos seek(Device& dev, stream_offset off, BOOST_IOS::seekdir way)
- {
- stream_offset next;
- if (way == BOOST_IOS::beg) {
- next = beg_ + off;
- } else if (way == BOOST_IOS::cur) {
- next = pos_ + off;
- } else if (end_ != -1) {
- next = end_ + off;
- } else {
- // Restriction is half-open; seek relative to the actual end.
- pos_ = this->component().seek(dev, off, BOOST_IOS::end);
- if (pos_ < beg_)
- boost::throw_exception(bad_seek());
- return offset_to_position(pos_ - beg_);
- }
- if (next < beg_ || (end_ != -1 && next >= end_))
- boost::throw_exception(bad_seek());
- pos_ = this->component().seek(dev, next, BOOST_IOS::cur);
- return offset_to_position(pos_ - beg_);
- }
-
- template<typename Device>
- void close(Device& dev)
- {
- open_ = false;
- detail::close_all(this->component(), dev);
- }
-
- template<typename Device>
- void close(Device& dev, BOOST_IOS::openmode which)
- {
- open_ = false;
- iostreams::close(this->component(), dev, which);
- }
-private:
- template<typename Device>
- void open(Device& dev, BOOST_IOS::openmode which)
- {
- typedef typename is_convertible<mode, dual_use>::type is_dual_use;
- open_ = true;
- which = is_dual_use() ? which : (BOOST_IOS::in | BOOST_IOS::out);
- iostreams::skip(this->component(), dev, beg_, which);
- }
-
- stream_offset beg_, pos_, end_;
- bool open_;
-};
-
-template<typename T>
-struct restriction_traits
- : iostreams::select< // Disambiguation for Tru64.
- is_filter<T>, restricted_filter<T>,
- is_direct<T>, restricted_direct_device<T>,
- else_, restricted_indirect_device<T>
- >
- { };
-
-} // End namespace detail.
-
-template<typename T>
-struct restriction : public detail::restriction_traits<T>::type {
- typedef typename detail::param_type<T>::type param_type;
- typedef typename detail::restriction_traits<T>::type base_type;
- restriction(param_type t, stream_offset off, stream_offset len = -1)
- : base_type(t, off, len)
- { }
-};
-
-namespace detail {
-
-//--------------Implementation of restricted_indirect_device------------------//
-
-template<typename Device>
-restricted_indirect_device<Device>::restricted_indirect_device
- (param_type dev, stream_offset off, stream_offset len)
- : device_adapter<Device>(dev), beg_(off), pos_(off),
- end_(len != -1 ? off + len : -1)
-{
- if (len < -1 || off < 0)
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
- iostreams::skip(this->component(), off);
-}
-
-template<typename Device>
-inline std::streamsize restricted_indirect_device<Device>::read
- (char_type* s, std::streamsize n)
-{
- using namespace std;
- std::streamsize amt =
- end_ != -1 ?
- (std::min) (n, static_cast<std::streamsize>(end_ - pos_)) :
- n;
- std::streamsize result = iostreams::read(this->component(), s, amt);
- if (result != -1)
- pos_ += result;
- return result;
-}
-
-template<typename Device>
-inline std::streamsize restricted_indirect_device<Device>::write
- (const char_type* s, std::streamsize n)
-{
- if (end_ != -1 && pos_ + n >= end_) {
- if(pos_ < end_)
- pos_ += iostreams::write(this->component(), s, end_ - pos_);
- boost::throw_exception(bad_write());
- }
- std::streamsize result = iostreams::write(this->component(), s, n);
- pos_ += result;
- return result;
-}
-
-template<typename Device>
-std::streampos restricted_indirect_device<Device>::seek
- (stream_offset off, BOOST_IOS::seekdir way)
-{
- stream_offset next;
- if (way == BOOST_IOS::beg) {
- next = beg_ + off;
- } else if (way == BOOST_IOS::cur) {
- next = pos_ + off;
- } else if (end_ != -1) {
- next = end_ + off;
- } else {
- // Restriction is half-open; seek relative to the actual end.
- pos_ = iostreams::seek(this->component(), off, BOOST_IOS::end);
- if (pos_ < beg_)
- boost::throw_exception(bad_seek());
- return offset_to_position(pos_ - beg_);
- }
- if (next < beg_ || (end_ != -1 && next > end_))
- boost::throw_exception(bad_seek());
- pos_ = iostreams::seek(this->component(), next - pos_, BOOST_IOS::cur);
- return offset_to_position(pos_ - beg_);
-}
-
-//--------------Implementation of restricted_direct_device--------------------//
-
-template<typename Device>
-restricted_direct_device<Device>::restricted_direct_device
- (const Device& dev, stream_offset off, stream_offset len)
- : device_adapter<Device>(dev), beg_(0), end_(0)
-{
- std::pair<char_type*, char_type*> seq =
- sequence(is_convertible<category, input>());
- if ( off < 0 || len < -1 ||
- (len != -1 && off + len > seq.second - seq.first) )
- {
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
- }
- beg_ = seq.first + off;
- end_ = len != -1 ?
- seq.first + off + len :
- seq.second;
-}
-
-template<typename Device>
-typename restricted_direct_device<Device>::pair_type
-restricted_direct_device<Device>::input_sequence()
-{
- BOOST_STATIC_ASSERT((is_convertible<category, input>::value));
- return std::make_pair(beg_, end_);
-}
-
-template<typename Device>
-typename restricted_direct_device<Device>::pair_type
-restricted_direct_device<Device>::output_sequence()
-{
- BOOST_STATIC_ASSERT((is_convertible<category, output>::value));
- return std::make_pair(beg_, end_);
-}
-
-template<typename Device>
-typename restricted_direct_device<Device>::pair_type
-restricted_direct_device<Device>::sequence(mpl::true_)
-{ return iostreams::input_sequence(this->component()); }
-
-template<typename Device>
-typename restricted_direct_device<Device>::pair_type
-restricted_direct_device<Device>::sequence(mpl::false_)
-{ return iostreams::output_sequence(this->component()); }
-
-//--------------Implementation of restricted_filter---------------------------//
-
-template<typename Filter>
-restricted_filter<Filter>::restricted_filter
- (const Filter& flt, stream_offset off, stream_offset len)
- : filter_adapter<Filter>(flt), beg_(off),
- pos_(off), end_(len != -1 ? off + len : -1), open_(false)
-{
- if (len < -1 || off < 0)
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
-}
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
-
-#elif defined(BOOST_IOSTREAMS_RESTRICT)
-
-namespace boost { namespace iostreams {
-
-//--------------Implementation of restrict/slice------------------------------//
-
-// Note: The following workarounds are patterned after resolve.hpp. It has not
-// yet been confirmed that they are necessary.
-
-# ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //------------------------//
-# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //------------------------------//
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) )
-{ return restriction<T>(t, off, len); }
-
-template<typename Ch, typename Tr>
-restriction< std::basic_streambuf<Ch, Tr> >
-BOOST_IOSTREAMS_RESTRICT( std::basic_streambuf<Ch, Tr>& sb, stream_offset off,
- stream_offset len = -1 )
-{ return restriction< std::basic_streambuf<Ch, Tr> >(sb, off, len); }
-
-template<typename Ch, typename Tr>
-restriction< std::basic_istream<Ch, Tr> >
-BOOST_IOSTREAMS_RESTRICT
- (std::basic_istream<Ch, Tr>& is, stream_offset off, stream_offset len = -1)
-{ return restriction< std::basic_istream<Ch, Tr> >(is, off, len); }
-
-template<typename Ch, typename Tr>
-restriction< std::basic_ostream<Ch, Tr> >
-BOOST_IOSTREAMS_RESTRICT
- (std::basic_ostream<Ch, Tr>& os, stream_offset off, stream_offset len = -1)
-{ return restriction< std::basic_ostream<Ch, Tr> >(os, off, len); }
-
-template<typename Ch, typename Tr>
-restriction< std::basic_iostream<Ch, Tr> >
-BOOST_IOSTREAMS_RESTRICT
- (std::basic_iostream<Ch, Tr>& io, stream_offset off, stream_offset len = -1)
-{ return restriction< std::basic_iostream<Ch, Tr> >(io, off, len); }
-
-# else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------//
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) )
-{ return restriction<T>(t, off, len); }
-
-restriction<std::streambuf>
-BOOST_IOSTREAMS_RESTRICT
- (std::streambuf& sb, stream_offset off, stream_offset len = -1)
-{ return restriction<std::streambuf>(sb, off, len); }
-
-restriction<std::istream>
-BOOST_IOSTREAMS_RESTRICT
- (std::istream<Ch, Tr>& is, stream_offset off, stream_offset len = -1)
-{ return restriction<std::istream>(is, off, len); }
-
-restriction<std::ostream>
-BOOST_IOSTREAMS_RESTRICT
- (std::ostream<Ch, Tr>& os, stream_offset off, stream_offset len = -1)
-{ return restriction<std::ostream>(os, off, len); }
-
-restriction<std::iostream>
-BOOST_IOSTREAMS_RESTRICT
- (std::iostream<Ch, Tr>& io, stream_offset off, stream_offset len = -1)
-{ return restriction<std::iostream>(io, off, len); }
-
-# endif // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-------------------//
-# else // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //---------------//
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT
- (const T& t, stream_offset off, stream_offset len, mpl::true_)
-{ // Bad overload resolution.
- return restriction<T>(const_cast<T&>(t, off, len));
-}
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT
- (const T& t, stream_offset off, stream_offset len, mpl::false_)
-{ return restriction<T>(t, off, len); }
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) )
-{ return BOOST_IOSTREAMS_RESTRICT(t, off, len, is_std_io<T>()); }
-
-# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- !defined(__GNUC__) // ---------------------------------------------------//
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT(T& t, stream_offset off, stream_offset len = -1)
-{ return restriction<T>(t, off, len); }
-
-# endif // Borland 5.x or GCC //-------------------------------//
-# endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //--------------//
-
-} } // End namespaces iostreams, boost.
-
-#endif // #if !defined(BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED) ...
diff --git a/contrib/restricted/boost/boost/iostreams/filter/aggregate.hpp b/contrib/restricted/boost/boost/iostreams/filter/aggregate.hpp
deleted file mode 100644
index a645a75a2e..0000000000
--- a/contrib/restricted/boost/boost/iostreams/filter/aggregate.hpp
+++ /dev/null
@@ -1,168 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_AGGREGATE_FILTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_AGGREGATE_FILTER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <algorithm> // copy, min.
-#include <boost/assert.hpp>
-#include <iterator> // back_inserter
-#include <vector>
-#include <boost/iostreams/constants.hpp> // default_device_buffer_size
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/detail/char_traits.hpp>
-#include <boost/iostreams/detail/ios.hpp> // openmode, streamsize.
-#include <boost/iostreams/pipeline.hpp>
-#include <boost/iostreams/read.hpp> // check_eof
-#include <boost/iostreams/write.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC.
-
-namespace boost { namespace iostreams {
-
-//
-// Template name: aggregate_filter.
-// Template parameters:
-// Ch - The character type.
-// Alloc - The allocator type.
-// Description: Utility for defining DualUseFilters which filter an
-// entire stream at once. To use, override the protected virtual
-// member do_filter.
-// Note: This filter should not be copied while it is in use.
-//
-template<typename Ch, typename Alloc = std::allocator<Ch> >
-class aggregate_filter {
-public:
- typedef Ch char_type;
- struct category
- : dual_use,
- filter_tag,
- multichar_tag,
- closable_tag
- { };
- aggregate_filter() : ptr_(0), state_(0) { }
- virtual ~aggregate_filter() { }
-
- template<typename Source>
- std::streamsize read(Source& src, char_type* s, std::streamsize n)
- {
- using namespace std;
- BOOST_ASSERT(!(state_ & f_write));
- state_ |= f_read;
- if (!(state_ & f_eof))
- do_read(src);
- std::streamsize amt =
- (std::min)(n, static_cast<std::streamsize>(data_.size() - ptr_));
- if (amt) {
- BOOST_IOSTREAMS_CHAR_TRAITS(char_type)::copy(s, &data_[ptr_], amt);
- ptr_ += amt;
- }
- return detail::check_eof(amt);
- }
-
- template<typename Sink>
- std::streamsize write(Sink&, const char_type* s, std::streamsize n)
- {
- BOOST_ASSERT(!(state_ & f_read));
- state_ |= f_write;
- data_.insert(data_.end(), s, s + n);
- return n;
- }
-
- template<typename Sink>
- void close(Sink& sink, BOOST_IOS::openmode which)
- {
- if ((state_ & f_read) != 0 && which == BOOST_IOS::in)
- close_impl();
- if ((state_ & f_write) != 0 && which == BOOST_IOS::out) {
- try {
- vector_type filtered;
- do_filter(data_, filtered);
- do_write(
- sink, &filtered[0],
- static_cast<std::streamsize>(filtered.size())
- );
- } catch (...) {
- close_impl();
- throw;
- }
- close_impl();
- }
- }
-
-protected:
- typedef std::vector<Ch, Alloc> vector_type;
- typedef typename vector_type::size_type size_type;
-private:
- virtual void do_filter(const vector_type& src, vector_type& dest) = 0;
- virtual void do_close() { }
-
- template<typename Source>
- void do_read(Source& src)
- {
- using std::streamsize;
- vector_type data;
- while (true) {
- const std::streamsize size = default_device_buffer_size;
- Ch buf[size];
- std::streamsize amt;
- if ((amt = boost::iostreams::read(src, buf, size)) == -1)
- break;
- data.insert(data.end(), buf, buf + amt);
- }
- do_filter(data, data_);
- state_ |= f_eof;
- }
-
- template<typename Sink>
- void do_write(Sink& sink, const char_type* s, std::streamsize n)
- {
- typedef typename iostreams::category_of<Sink>::type category;
- typedef is_convertible<category, output> can_write;
- do_write(sink, s, n, can_write());
- }
-
- template<typename Sink>
- void do_write(Sink& sink, const char_type* s, std::streamsize n, mpl::true_)
- { iostreams::write(sink, s, n); }
-
- template<typename Sink>
- void do_write(Sink&, const char_type*, std::streamsize, mpl::false_) { }
-
- void close_impl()
- {
- data_.clear();
- ptr_ = 0;
- state_ = 0;
- do_close();
- }
-
- enum flag_type {
- f_read = 1,
- f_write = f_read << 1,
- f_eof = f_write << 1
- };
-
- // Note: typically will not be copied while vector contains data.
- vector_type data_;
- size_type ptr_;
- int state_;
-};
-BOOST_IOSTREAMS_PIPABLE(aggregate_filter, 1)
-
-} } // End namespaces iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp> // MSVC.
-
-#endif // #ifndef BOOST_IOSTREAMS_AGGREGATE_FILTER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/filter/counter.hpp b/contrib/restricted/boost/boost/iostreams/filter/counter.hpp
deleted file mode 100644
index 8cf775e703..0000000000
--- a/contrib/restricted/boost/boost/iostreams/filter/counter.hpp
+++ /dev/null
@@ -1,82 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_COUNTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_COUNTER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <algorithm> // count.
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/char_traits.hpp>
-#include <boost/iostreams/operations.hpp>
-#include <boost/iostreams/pipeline.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // VC7.1 C4244.
-
-namespace boost { namespace iostreams {
-
-//
-// Template name: basic_counter.
-// Template parameters:
-// Ch - The character type.
-// Description: Filter which counts lines and characters.
-//
-template<typename Ch>
-class basic_counter {
-public:
- typedef Ch char_type;
- struct category
- : dual_use,
- filter_tag,
- multichar_tag,
- optimally_buffered_tag
- { };
- explicit basic_counter(int first_line = 0, int first_char = 0)
- : lines_(first_line), chars_(first_char)
- { }
- int lines() const { return lines_; }
- int characters() const { return chars_; }
- std::streamsize optimal_buffer_size() const { return 0; }
-
- template<typename Source>
- std::streamsize read(Source& src, char_type* s, std::streamsize n)
- {
- std::streamsize result = iostreams::read(src, s, n);
- if (result == -1)
- return -1;
- lines_ += std::count(s, s + result, char_traits<Ch>::newline());
- chars_ += result;
- return result;
- }
-
- template<typename Sink>
- std::streamsize write(Sink& snk, const char_type* s, std::streamsize n)
- {
- std::streamsize result = iostreams::write(snk, s, n);
- lines_ += std::count(s, s + result, char_traits<Ch>::newline());
- chars_ += result;
- return result;
- }
-private:
- int lines_;
- int chars_;
-};
-BOOST_IOSTREAMS_PIPABLE(basic_counter, 1)
-
-
-typedef basic_counter<char> counter;
-typedef basic_counter<wchar_t> wcounter;
-
-} } // End namespaces iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp>
-
-#endif // #ifndef BOOST_IOSTREAMS_COUNTER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/filter/grep.hpp b/contrib/restricted/boost/boost/iostreams/filter/grep.hpp
deleted file mode 100644
index b30309734e..0000000000
--- a/contrib/restricted/boost/boost/iostreams/filter/grep.hpp
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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.)
- *
- * See http://www.boost.org/libs/iostreams for documentation.
-
- * File: boost/iostreams/filter/grep.hpp
- * Date: Mon May 26 17:48:45 MDT 2008
- * Copyright: 2008 CodeRage, LLC
- * Author: Jonathan Turkanis
- * Contact: turkanis at coderage dot com
- *
- * Defines the class template basic_grep_filter and its specializations
- * grep_filter and wgrep_filter.
- */
-
-#ifndef BOOST_IOSTREAMS_GREP_FILTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_GREP_FILTER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <iostream>
-
-#include <memory> // allocator.
-#include <boost/iostreams/char_traits.hpp>
-#include <boost/iostreams/filter/line.hpp>
-#include <boost/iostreams/pipeline.hpp>
-#include <boost/regex.hpp>
-
-namespace boost { namespace iostreams {
-
-namespace grep {
-
-const int invert = 1;
-const int whole_line = invert << 1;
-
-} // End namespace grep.
-
-template< typename Ch,
- typename Tr = regex_traits<Ch>,
- typename Alloc = std::allocator<Ch> >
-class basic_grep_filter : public basic_line_filter<Ch, Alloc> {
-private:
- typedef basic_line_filter<Ch, Alloc> base_type;
-public:
- typedef typename base_type::char_type char_type;
- typedef typename base_type::category category;
- typedef char_traits<char_type> traits_type;
- typedef typename base_type::string_type string_type;
- typedef basic_regex<Ch, Tr> regex_type;
- typedef regex_constants::match_flag_type match_flag_type;
- basic_grep_filter( const regex_type& re,
- match_flag_type match_flags =
- regex_constants::match_default,
- int options = 0 );
- int count() const { return count_; }
-
- template<typename Sink>
- void close(Sink& snk, BOOST_IOS::openmode which)
- {
- base_type::close(snk, which);
- options_ &= ~f_initialized;
- }
-private:
- virtual string_type do_filter(const string_type& line)
- {
- if ((options_ & f_initialized) == 0) {
- options_ |= f_initialized;
- count_ = 0;
- }
- bool matches = (options_ & grep::whole_line) ?
- regex_match(line, re_, match_flags_) :
- regex_search(line, re_, match_flags_);
- if (options_ & grep::invert)
- matches = !matches;
- if (matches)
- ++count_;
- return matches ? line + traits_type::newline() : string_type();
- }
-
- // Private flags bitwise OR'd with constants from namespace grep
- enum flags_ {
- f_initialized = 65536
- };
-
- regex_type re_;
- match_flag_type match_flags_;
- int options_;
- int count_;
-};
-BOOST_IOSTREAMS_PIPABLE(basic_grep_filter, 3)
-
-typedef basic_grep_filter<char> grep_filter;
-typedef basic_grep_filter<wchar_t> wgrep_filter;
-
-//------------------Implementation of basic_grep_filter-----------------------//
-
-template<typename Ch, typename Tr, typename Alloc>
-basic_grep_filter<Ch, Tr, Alloc>::basic_grep_filter
- (const regex_type& re, match_flag_type match_flags, int options)
- : base_type(true), re_(re), match_flags_(match_flags),
- options_(options), count_(0)
- { }
-
-} } // End namespaces iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_REGEX_FILTER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/filter/line.hpp b/contrib/restricted/boost/boost/iostreams/filter/line.hpp
deleted file mode 100644
index 2c66f0ed91..0000000000
--- a/contrib/restricted/boost/boost/iostreams/filter/line.hpp
+++ /dev/null
@@ -1,221 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_LINE_FILTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_LINE_FILTER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <algorithm> // min.
-#include <boost/assert.hpp>
-#include <memory> // allocator.
-#include <string>
-#include <boost/config.hpp> // BOOST_STATIC_CONSTANT.
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/checked_operations.hpp>
-#include <boost/iostreams/detail/ios.hpp> // openmode, streamsize.
-#include <boost/iostreams/read.hpp> // check_eof
-#include <boost/iostreams/pipeline.hpp>
-#include <boost/iostreams/write.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // VC7.1 C4244.
-
-namespace boost { namespace iostreams {
-
-//
-// Template name: line_filter.
-// Template parameters:
-// Ch - The character type.
-// Alloc - The allocator type.
-// Description: Filter which processes data one line at a time.
-//
-template< typename Ch,
- typename Alloc = std::allocator<Ch> >
-class basic_line_filter {
-private:
- typedef typename std::basic_string<Ch>::traits_type string_traits;
-public:
- typedef Ch char_type;
- typedef char_traits<char_type> traits_type;
- typedef std::basic_string<
- Ch,
- string_traits,
- Alloc
- > string_type;
- struct category
- : dual_use,
- filter_tag,
- multichar_tag,
- closable_tag
- { };
-protected:
- basic_line_filter(bool suppress_newlines = false)
- : pos_(string_type::npos),
- flags_(suppress_newlines ? f_suppress : 0)
- { }
-public:
- virtual ~basic_line_filter() { }
-
- template<typename Source>
- std::streamsize read(Source& src, char_type* s, std::streamsize n)
- {
- using namespace std;
- BOOST_ASSERT(!(flags_ & f_write));
- flags_ |= f_read;
-
- // Handle unfinished business.
- std::streamsize result = 0;
- if (!cur_line_.empty() && (result = read_line(s, n)) == n)
- return n;
-
- typename traits_type::int_type status = traits_type::good();
- while (result < n && !traits_type::is_eof(status)) {
-
- // Call next_line() to retrieve a line of filtered text, and
- // read_line() to copy it into buffer s.
- if (traits_type::would_block(status = next_line(src)))
- return result;
- result += read_line(s + result, n - result);
- }
-
- return detail::check_eof(result);
- }
-
- template<typename Sink>
- std::streamsize write(Sink& snk, const char_type* s, std::streamsize n)
- {
- using namespace std;
- BOOST_ASSERT(!(flags_ & f_read));
- flags_ |= f_write;
-
- // Handle unfinished business.
- if (pos_ != string_type::npos && !write_line(snk))
- return 0;
-
- const char_type *cur = s, *next;
- while (true) {
-
- // Search for the next full line in [cur, s + n), filter it
- // and write it to snk.
- typename string_type::size_type rest = n - (cur - s);
- if ((next = traits_type::find(cur, rest, traits_type::newline()))) {
- cur_line_.append(cur, next - cur);
- cur = next + 1;
- if (!write_line(snk))
- return static_cast<std::streamsize>(cur - s);
- } else {
- cur_line_.append(cur, rest);
- return n;
- }
- }
- }
-
- template<typename Sink>
- void close(Sink& snk, BOOST_IOS::openmode which)
- {
- if ((flags_ & f_read) && which == BOOST_IOS::in)
- close_impl();
-
- if ((flags_ & f_write) && which == BOOST_IOS::out) {
- try {
- if (!cur_line_.empty())
- write_line(snk);
- } catch (...) {
- try {
- close_impl();
- } catch (...) { }
- throw;
- }
- close_impl();
- }
- }
-private:
- virtual string_type do_filter(const string_type& line) = 0;
-
- // Copies filtered characters fron the current line into
- // the given buffer.
- std::streamsize read_line(char_type* s, std::streamsize n)
- {
- using namespace std;
- std::streamsize result =
- (std::min) (n, static_cast<std::streamsize>(cur_line_.size()));
- traits_type::copy(s, cur_line_.data(), result);
- cur_line_.erase(0, result);
- return result;
- }
-
- // Attempts to retrieve a line of text from the given source; returns
- // an int_type as a good/eof/would_block status code.
- template<typename Source>
- typename traits_type::int_type next_line(Source& src)
- {
- using namespace std;
- typename traits_type::int_type c;
- while ( traits_type::is_good(c = iostreams::get(src)) &&
- c != traits_type::newline() )
- {
- cur_line_ += traits_type::to_int_type(c);
- }
- if (!traits_type::would_block(c)) {
- if (!cur_line_.empty() || c == traits_type::newline())
- cur_line_ = do_filter(cur_line_);
- if (c == traits_type::newline() && (flags_ & f_suppress) == 0)
- cur_line_ += c;
- }
- return c; // status indicator.
- }
-
- // Filters the current line and attemps to write it to the given sink.
- // Returns true for success.
- template<typename Sink>
- bool write_line(Sink& snk)
- {
- string_type line = do_filter(cur_line_);
- if ((flags_ & f_suppress) == 0)
- line += traits_type::newline();
- std::streamsize amt = static_cast<std::streamsize>(line.size());
- bool result = iostreams::write_if(snk, line.data(), amt) == amt;
- if (result)
- clear();
- return result;
- }
-
- void close_impl()
- {
- clear();
- flags_ &= f_suppress;
- }
-
- void clear()
- {
- cur_line_.erase();
- pos_ = string_type::npos;
- }
-
- enum flag_type {
- f_read = 1,
- f_write = f_read << 1,
- f_suppress = f_write << 1
- };
-
- string_type cur_line_;
- typename string_type::size_type pos_;
- int flags_;
-};
-BOOST_IOSTREAMS_PIPABLE(basic_line_filter, 2)
-
-typedef basic_line_filter<char> line_filter;
-typedef basic_line_filter<wchar_t> wline_filter;
-
-} } // End namespaces iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp>
-
-#endif // #ifndef BOOST_IOSTREAMS_LINE_FILTER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/filter/newline.hpp b/contrib/restricted/boost/boost/iostreams/filter/newline.hpp
deleted file mode 100644
index 57a36395ed..0000000000
--- a/contrib/restricted/boost/boost/iostreams/filter/newline.hpp
+++ /dev/null
@@ -1,441 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// NOTE: I hope to replace the current implementation with a much simpler
-// one.
-
-#ifndef BOOST_IOSTREAMS_NEWLINE_FILTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_NEWLINE_FILTER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/assert.hpp>
-#include <cstdio>
-#include <stdexcept> // logic_error.
-#include <boost/config.hpp> // BOOST_STATIC_CONSTANT.
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/detail/char_traits.hpp>
-#include <boost/iostreams/detail/ios.hpp> // BOOST_IOSTREAMS_FAILURE
-#include <boost/iostreams/read.hpp> // get
-#include <boost/iostreams/write.hpp> // put
-#include <boost/iostreams/pipeline.hpp>
-#include <boost/iostreams/putback.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp>
-
-#define BOOST_IOSTREAMS_ASSERT_UNREACHABLE(val) \
- (BOOST_ASSERT("unreachable code" == 0), val) \
- /**/
-
-namespace boost { namespace iostreams {
-
-namespace newline {
-
-const char CR = 0x0D;
-const char LF = 0x0A;
-
- // Flags for configuring newline_filter.
-
-// Exactly one of the following three flags must be present.
-
-const int posix = 1; // Use CR as line separator.
-const int mac = 2; // Use LF as line separator.
-const int dos = 4; // Use CRLF as line separator.
-const int mixed = 8; // Mixed line endings.
-const int final_newline = 16;
-const int platform_mask = posix | dos | mac;
-
-} // End namespace newline.
-
-namespace detail {
-
-class newline_base {
-public:
- bool is_posix() const
- {
- return !is_mixed() && (flags_ & newline::posix) != 0;
- }
- bool is_dos() const
- {
- return !is_mixed() && (flags_ & newline::dos) != 0;
- }
- bool is_mac() const
- {
- return !is_mixed() && (flags_ & newline::mac) != 0;
- }
- bool is_mixed_posix() const { return (flags_ & newline::posix) != 0; }
- bool is_mixed_dos() const { return (flags_ & newline::dos) != 0; }
- bool is_mixed_mac() const { return (flags_ & newline::mac) != 0; }
- bool is_mixed() const
- {
- int platform =
- (flags_ & newline::posix) != 0 ?
- newline::posix :
- (flags_ & newline::dos) != 0 ?
- newline::dos :
- (flags_ & newline::mac) != 0 ?
- newline::mac :
- 0;
- return (flags_ & ~platform & newline::platform_mask) != 0;
- }
- bool has_final_newline() const
- {
- return (flags_ & newline::final_newline) != 0;
- }
-protected:
- newline_base(int flags) : flags_(flags) { }
- int flags_;
-};
-
-} // End namespace detail.
-
-class newline_error
- : public BOOST_IOSTREAMS_FAILURE, public detail::newline_base
-{
-private:
- friend class newline_checker;
- newline_error(int flags)
- : BOOST_IOSTREAMS_FAILURE("bad line endings"),
- detail::newline_base(flags)
- { }
-};
-
-class newline_filter {
-public:
- typedef char char_type;
- struct category
- : dual_use,
- filter_tag,
- closable_tag
- { };
-
- explicit newline_filter(int target) : flags_(target)
- {
- if ( target != iostreams::newline::posix &&
- target != iostreams::newline::dos &&
- target != iostreams::newline::mac )
- {
- boost::throw_exception(std::logic_error("bad flags"));
- }
- }
-
- template<typename Source>
- int get(Source& src)
- {
- using iostreams::newline::CR;
- using iostreams::newline::LF;
-
- BOOST_ASSERT((flags_ & f_write) == 0);
- flags_ |= f_read;
-
- if (flags_ & (f_has_LF | f_has_EOF)) {
- if (flags_ & f_has_LF)
- return newline();
- else
- return EOF;
- }
-
- int c =
- (flags_ & f_has_CR) == 0 ?
- iostreams::get(src) :
- CR;
-
- if (c == WOULD_BLOCK )
- return WOULD_BLOCK;
-
- if (c == CR) {
- flags_ |= f_has_CR;
-
- int d;
- if ((d = iostreams::get(src)) == WOULD_BLOCK)
- return WOULD_BLOCK;
-
- if (d == LF) {
- flags_ &= ~f_has_CR;
- return newline();
- }
-
- if (d == EOF) {
- flags_ |= f_has_EOF;
- } else {
- iostreams::putback(src, d);
- }
-
- flags_ &= ~f_has_CR;
- return newline();
- }
-
- if (c == LF)
- return newline();
-
- return c;
- }
-
- template<typename Sink>
- bool put(Sink& dest, char c)
- {
- using iostreams::newline::CR;
- using iostreams::newline::LF;
-
- BOOST_ASSERT((flags_ & f_read) == 0);
- flags_ |= f_write;
-
- if ((flags_ & f_has_LF) != 0)
- return c == LF ?
- newline(dest) :
- newline(dest) && this->put(dest, c);
-
- if (c == LF)
- return newline(dest);
-
- if ((flags_ & f_has_CR) != 0)
- return newline(dest) ?
- this->put(dest, c) :
- false;
-
- if (c == CR) {
- flags_ |= f_has_CR;
- return true;
- }
-
- return iostreams::put(dest, c);
- }
-
- template<typename Sink>
- void close(Sink& dest, BOOST_IOS::openmode)
- {
- if ((flags_ & f_write) != 0 && (flags_ & f_has_CR) != 0)
- newline_if_sink(dest);
- flags_ &= ~f_has_LF; // Restore original flags.
- }
-private:
-
- // Returns the appropriate element of a newline sequence.
- int newline()
- {
- using iostreams::newline::CR;
- using iostreams::newline::LF;
-
- switch (flags_ & iostreams::newline::platform_mask) {
- case iostreams::newline::posix:
- return LF;
- case iostreams::newline::mac:
- return CR;
- case iostreams::newline::dos:
- if (flags_ & f_has_LF) {
- flags_ &= ~f_has_LF;
- return LF;
- } else {
- flags_ |= f_has_LF;
- return CR;
- }
- }
- return BOOST_IOSTREAMS_ASSERT_UNREACHABLE(0);
- }
-
- // Writes a newline sequence.
- template<typename Sink>
- bool newline(Sink& dest)
- {
- using iostreams::newline::CR;
- using iostreams::newline::LF;
-
- bool success = false;
- switch (flags_ & iostreams::newline::platform_mask) {
- case iostreams::newline::posix:
- success = boost::iostreams::put(dest, LF);
- break;
- case iostreams::newline::mac:
- success = boost::iostreams::put(dest, CR);
- break;
- case iostreams::newline::dos:
- if ((flags_ & f_has_LF) != 0) {
- if ((success = boost::iostreams::put(dest, LF)))
- flags_ &= ~f_has_LF;
- } else if (boost::iostreams::put(dest, CR)) {
- if (!(success = boost::iostreams::put(dest, LF)))
- flags_ |= f_has_LF;
- }
- break;
- }
- if (success)
- flags_ &= ~f_has_CR;
- return success;
- }
-
- // Writes a newline sequence if the given device is a Sink.
- template<typename Device>
- void newline_if_sink(Device& dest)
- {
- typedef typename iostreams::category_of<Device>::type category;
- newline_if_sink(dest, is_convertible<category, output>());
- }
-
- template<typename Sink>
- void newline_if_sink(Sink& dest, mpl::true_) { newline(dest); }
-
- template<typename Source>
- void newline_if_sink(Source&, mpl::false_) { }
-
- enum flags {
- f_has_LF = 32768,
- f_has_CR = f_has_LF << 1,
- f_has_newline = f_has_CR << 1,
- f_has_EOF = f_has_newline << 1,
- f_read = f_has_EOF << 1,
- f_write = f_read << 1
- };
- int flags_;
-};
-BOOST_IOSTREAMS_PIPABLE(newline_filter, 0)
-
-class newline_checker : public detail::newline_base {
-public:
- typedef char char_type;
- struct category
- : dual_use_filter_tag,
- closable_tag
- { };
- explicit newline_checker(int target = newline::mixed)
- : detail::newline_base(0), target_(target), open_(false)
- { }
- template<typename Source>
- int get(Source& src)
- {
- using newline::CR;
- using newline::LF;
-
- if (!open_) {
- open_ = true;
- source() = 0;
- }
-
- int c;
- if ((c = iostreams::get(src)) == WOULD_BLOCK)
- return WOULD_BLOCK;
-
- // Update source flags.
- if (c != EOF)
- source() &= ~f_line_complete;
- if ((source() & f_has_CR) != 0) {
- if (c == LF) {
- source() |= newline::dos;
- source() |= f_line_complete;
- } else {
- source() |= newline::mac;
- if (c == EOF)
- source() |= f_line_complete;
- }
- } else if (c == LF) {
- source() |= newline::posix;
- source() |= f_line_complete;
- }
- source() = (source() & ~f_has_CR) | (c == CR ? f_has_CR : 0);
-
- // Check for errors.
- if ( c == EOF &&
- (target_ & newline::final_newline) != 0 &&
- (source() & f_line_complete) == 0 )
- {
- fail();
- }
- if ( (target_ & newline::platform_mask) != 0 &&
- (source() & ~target_ & newline::platform_mask) != 0 )
- {
- fail();
- }
-
- return c;
- }
-
- template<typename Sink>
- bool put(Sink& dest, int c)
- {
- using iostreams::newline::CR;
- using iostreams::newline::LF;
-
- if (!open_) {
- open_ = true;
- source() = 0;
- }
-
- if (!iostreams::put(dest, c))
- return false;
-
- // Update source flags.
- source() &= ~f_line_complete;
- if ((source() & f_has_CR) != 0) {
- if (c == LF) {
- source() |= newline::dos;
- source() |= f_line_complete;
- } else {
- source() |= newline::mac;
- }
- } else if (c == LF) {
- source() |= newline::posix;
- source() |= f_line_complete;
- }
- source() = (source() & ~f_has_CR) | (c == CR ? f_has_CR : 0);
-
- // Check for errors.
- if ( (target_ & newline::platform_mask) != 0 &&
- (source() & ~target_ & newline::platform_mask) != 0 )
- {
- fail();
- }
-
- return true;
- }
-
- template<typename Sink>
- void close(Sink&, BOOST_IOS::openmode)
- {
- using iostreams::newline::final_newline;
-
- // Update final_newline flag.
- if ( (source() & f_has_CR) != 0 ||
- (source() & f_line_complete) != 0 )
- {
- source() |= final_newline;
- }
-
- // Clear non-sticky flags.
- source() &= ~(f_has_CR | f_line_complete);
-
- // Check for errors.
- if ( (target_ & final_newline) != 0 &&
- (source() & final_newline) == 0 )
- {
- fail();
- }
- }
-private:
- void fail() { boost::throw_exception(newline_error(source())); }
- int& source() { return flags_; }
- int source() const { return flags_; }
-
- enum flags {
- f_has_CR = 32768,
- f_line_complete = f_has_CR << 1
- };
-
- int target_; // Represents expected input.
- bool open_;
-};
-BOOST_IOSTREAMS_PIPABLE(newline_checker, 0)
-
-} } // End namespaces iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp>
-
-#endif // #ifndef BOOST_IOSTREAMS_NEWLINE_FILTER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/filter/regex.hpp b/contrib/restricted/boost/boost/iostreams/filter/regex.hpp
deleted file mode 100644
index e943553c61..0000000000
--- a/contrib/restricted/boost/boost/iostreams/filter/regex.hpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_REGEX_FILTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_REGEX_FILTER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <memory> // allocator.
-#include <boost/function.hpp>
-#include <boost/iostreams/filter/aggregate.hpp>
-#include <boost/iostreams/pipeline.hpp>
-#include <boost/regex.hpp>
-
-namespace boost { namespace iostreams {
-
-template< typename Ch,
- typename Tr = regex_traits<Ch>,
- typename Alloc = std::allocator<Ch> >
-class basic_regex_filter : public aggregate_filter<Ch, Alloc> {
-private:
- typedef aggregate_filter<Ch, Alloc> base_type;
-public:
- typedef typename base_type::char_type char_type;
- typedef typename base_type::category category;
- typedef std::basic_string<Ch> string_type;
- typedef basic_regex<Ch, Tr> regex_type;
- typedef regex_constants::match_flag_type flag_type;
- typedef match_results<const Ch*> match_type;
- typedef function1<string_type, const match_type&> formatter;
-
- basic_regex_filter( const regex_type& re,
- const formatter& replace,
- flag_type flags = regex_constants::match_default )
- : re_(re), replace_(replace), flags_(flags) { }
- basic_regex_filter( const regex_type& re,
- const string_type& fmt,
- flag_type flags = regex_constants::match_default,
- flag_type fmt_flags = regex_constants::format_default )
- : re_(re), replace_(simple_formatter(fmt, fmt_flags)), flags_(flags) { }
- basic_regex_filter( const regex_type& re,
- const char_type* fmt,
- flag_type flags = regex_constants::match_default,
- flag_type fmt_flags = regex_constants::format_default )
- : re_(re), replace_(simple_formatter(fmt, fmt_flags)), flags_(flags) { }
-private:
- typedef typename base_type::vector_type vector_type;
- void do_filter(const vector_type& src, vector_type& dest)
- {
- typedef regex_iterator<const Ch*, Ch, Tr> iterator;
- if (src.empty())
- return;
- iterator first(&src[0], &src[0] + src.size(), re_, flags_);
- iterator last;
- const Ch* suffix = 0;
- for (; first != last; ++first) {
- dest.insert( dest.end(),
- first->prefix().first,
- first->prefix().second );
- string_type replacement = replace_(*first);
- dest.insert( dest.end(),
- replacement.begin(),
- replacement.end() );
- suffix = first->suffix().first;
- }
- if (suffix) {
- dest.insert(dest.end(), suffix, &src[0] + src.size());
- } else {
- dest.insert(dest.end(), &src[0], &src[0] + src.size());
- }
- }
- struct simple_formatter {
- simple_formatter(const string_type& fmt, flag_type fmt_flags)
- : fmt_(fmt), fmt_flags_(fmt_flags) { }
- string_type operator() (const match_type& match) const
- { return match.format(fmt_, fmt_flags_); }
- string_type fmt_;
- flag_type fmt_flags_;
- };
- regex_type re_;
- formatter replace_;
- flag_type flags_;
-};
-BOOST_IOSTREAMS_PIPABLE(basic_regex_filter, 3)
-
-typedef basic_regex_filter<char> regex_filter;
-typedef basic_regex_filter<wchar_t> wregex_filter;
-
-
-} } // End namespaces iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_REGEX_FILTER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/filter/stdio.hpp b/contrib/restricted/boost/boost/iostreams/filter/stdio.hpp
deleted file mode 100644
index 5ad921b2ce..0000000000
--- a/contrib/restricted/boost/boost/iostreams/filter/stdio.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// Based on the work of Christopher Diggins.
-
-#ifndef BOOST_IOSTREAMS_STDIO_FILTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_STDIO_FILTER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <iostream>
-#include <memory> // allocator.
-#include <vector>
-#include <boost/iostreams/detail/config/wide_streams.hpp>
-#include <boost/iostreams/detail/char_traits.hpp>
-#include <boost/iostreams/detail/ios.hpp>
-#include <boost/iostreams/device/array.hpp>
-#include <boost/iostreams/device/back_inserter.hpp>
-#include <boost/iostreams/filter/aggregate.hpp>
-#include <boost/iostreams/pipeline.hpp>
-#include <boost/iostreams/stream_buffer.hpp>
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-} // End namespace detail.
-
-template<typename Ch, typename Alloc = std::allocator<Ch> >
-class basic_stdio_filter : public aggregate_filter<Ch, Alloc> {
-private:
- typedef aggregate_filter<Ch, Alloc> base_type;
-public:
- typedef typename base_type::char_type char_type;
- typedef typename base_type::category category;
- typedef typename base_type::vector_type vector_type;
-private:
- static std::istream& standard_input(char*) { return std::cin; }
- static std::ostream& standard_output(char*) { return std::cout; }
-#ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS
- static std::wistream& standard_input(wchar_t*) { return std::wcin; }
- static std::wostream& standard_output(wchar_t*) { return std::wcout; }
-#endif // BOOST_IOSTREAMS_NO_WIDE_STREAMS
-
- struct scoped_redirector { // Thanks to Maxim Egorushkin.
- typedef BOOST_IOSTREAMS_CHAR_TRAITS(Ch) traits_type;
- typedef BOOST_IOSTREAMS_BASIC_IOS(Ch, traits_type) ios_type;
- typedef BOOST_IOSTREAMS_BASIC_STREAMBUF(Ch, traits_type) streambuf_type;
- scoped_redirector( ios_type& ios,
- streambuf_type* newbuf )
- : ios_(ios), old_(ios.rdbuf(newbuf))
- { }
- ~scoped_redirector() { ios_.rdbuf(old_); }
- scoped_redirector& operator=(const scoped_redirector&);
- ios_type& ios_;
- streambuf_type* old_;
- };
-
- virtual void do_filter() = 0;
- virtual void do_filter(const vector_type& src, vector_type& dest)
- {
- stream_buffer< basic_array_source<Ch> >
- srcbuf(&src[0], &src[0] + src.size());
- stream_buffer< back_insert_device<vector_type> >
- destbuf(iostreams::back_inserter(dest));
- scoped_redirector redirect_input(standard_input((Ch*)0), &srcbuf);
- scoped_redirector redirect_output(standard_output((Ch*)0), &destbuf);
- do_filter();
- }
-};
-BOOST_IOSTREAMS_PIPABLE(basic_stdio_filter, 2)
-
-typedef basic_stdio_filter<char> stdio_filter;
-typedef basic_stdio_filter<wchar_t> wstdio_wfilter;
-
-} } // End namespaces iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_STDIO_FILTER_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/filter/test.hpp b/contrib/restricted/boost/boost/iostreams/filter/test.hpp
deleted file mode 100644
index 00e2dffd4c..0000000000
--- a/contrib/restricted/boost/boost/iostreams/filter/test.hpp
+++ /dev/null
@@ -1,319 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_FILTER_TEST_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/config.hpp> // BOOST_MSVC,put size_t in std.
-#include <boost/detail/workaround.hpp>
-#include <algorithm> // min.
-#include <cstddef> // size_t.
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \
- BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
- /**/
-# include <cstdlib> // rand.
-#endif
-#include <cstring> // memcpy, strlen.
-#include <iterator>
-#include <string>
-#include <vector>
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
- !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
- /**/
-# include <boost/random/linear_congruential.hpp>
-# include <boost/random/uniform_smallint.hpp>
-#endif
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/compose.hpp>
-#include <boost/iostreams/copy.hpp>
-#include <boost/iostreams/detail/bool_trait_def.hpp>
-#include <boost/iostreams/detail/ios.hpp>
-#include <boost/iostreams/device/array.hpp>
-#include <boost/iostreams/device/back_inserter.hpp>
-#include <boost/iostreams/operations.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/type_traits/is_array.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-#undef memcpy
-#undef rand
-#undef strlen
-
-#if defined(BOOST_NO_STDC_NAMESPACE) && !defined(__LIBCOMO__)
-namespace std {
- using ::memcpy;
- using ::strlen;
- #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \
- BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
- /**/
- using ::rand;
- #endif
-}
-#endif
-
-namespace boost { namespace iostreams {
-
-BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_string, std::basic_string, 3)
-
-const std::streamsize default_increment = 5;
-
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
- !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
- /**/
- std::streamsize rand(std::streamsize inc)
- {
- static rand48 random_gen;
- static uniform_smallint<int> random_dist(0, static_cast<int>(inc));
- return random_dist(random_gen);
- }
-#else
- std::streamsize rand(std::streamsize inc)
- {
- return (std::rand() * inc + 1) / RAND_MAX;
- }
-#endif
-
-class non_blocking_source {
-public:
- typedef char char_type;
- struct category
- : source_tag,
- peekable_tag
- { };
- explicit non_blocking_source( const std::string& data,
- std::streamsize inc = default_increment )
- : data_(data), inc_(inc), pos_(0)
- { }
- std::streamsize read(char* s, std::streamsize n)
- {
- using namespace std;
- if (pos_ == static_cast<streamsize>(data_.size()))
- return -1;
- streamsize avail =
- (std::min) (n, static_cast<streamsize>(data_.size() - pos_));
- streamsize amt = (std::min) (rand(inc_), avail);
- if (amt)
- memcpy(s, data_.c_str() + pos_, static_cast<size_t>(amt));
- pos_ += amt;
- return amt;
- }
-
- bool putback(char c)
- {
- if (pos_ > 0) {
- data_[static_cast<std::string::size_type>(--pos_)] = c;
- return true;
- }
- return false;
- }
-private:
- std::string data_;
- std::streamsize inc_, pos_;
-};
-
-class non_blocking_sink : public sink {
-public:
- non_blocking_sink( std::string& dest,
- std::streamsize inc = default_increment )
- : dest_(dest), inc_(inc)
- { }
- std::streamsize write(const char* s, std::streamsize n)
- {
- std::streamsize amt = (std::min) (rand(inc_), n);
- dest_.insert(dest_.end(), s, s + amt);
- return amt;
- }
-private:
- non_blocking_sink& operator=(const non_blocking_sink&);
- std::string& dest_;
- std::streamsize inc_;
-};
-
-//--------------Definition of test_input_filter-------------------------------//
-
-template<typename Filter>
-bool test_input_filter( Filter filter,
- const std::string& input,
- const std::string& output,
- mpl::true_ )
-{
- for ( int inc = default_increment;
- inc < default_increment * 40;
- inc += default_increment )
- {
- non_blocking_source src(input, inc);
- std::string dest;
- iostreams::copy(compose(filter, src), iostreams::back_inserter(dest));
- if (dest != output)
- return false;
- }
- return true;
-}
-
-template<typename Filter, typename Source1, typename Source2>
-bool test_input_filter( Filter filter,
- const Source1& input,
- const Source2& output,
- mpl::false_ )
-{
- std::string in;
- std::string out;
- iostreams::copy(input, iostreams::back_inserter(in));
- iostreams::copy(output, iostreams::back_inserter(out));
- return test_input_filter(filter, in, out);
-}
-
-template<typename Filter, typename Source1, typename Source2>
-bool test_input_filter( Filter filter,
- const Source1& input,
- const Source2& output )
-{
- // Use tag dispatch to compensate for bad overload resolution.
- return test_input_filter( filter, input, output,
- is_string<Source1>() );
-}
-
-//--------------Definition of test_output_filter------------------------------//
-
-template<typename Filter>
-bool test_output_filter( Filter filter,
- const std::string& input,
- const std::string& output,
- mpl::true_ )
-{
- for ( int inc = default_increment;
- inc < default_increment * 40;
- inc += default_increment )
- {
- array_source src(input.data(), input.data() + input.size());
- std::string dest;
- iostreams::copy(src, compose(filter, non_blocking_sink(dest, inc)));
- if (dest != output )
- return false;
- }
- return true;
-}
-
-template<typename Filter, typename Source1, typename Source2>
-bool test_output_filter( Filter filter,
- const Source1& input,
- const Source2& output,
- mpl::false_ )
-{
- std::string in;
- std::string out;
- iostreams::copy(input, iostreams::back_inserter(in));
- iostreams::copy(output, iostreams::back_inserter(out));
- return test_output_filter(filter, in, out);
-}
-
-template<typename Filter, typename Source1, typename Source2>
-bool test_output_filter( Filter filter,
- const Source1& input,
- const Source2& output )
-{
- // Use tag dispatch to compensate for bad overload resolution.
- return test_output_filter( filter, input, output,
- is_string<Source1>() );
-}
-
-//--------------Definition of test_filter_pair--------------------------------//
-
-template<typename OutputFilter, typename InputFilter>
-bool test_filter_pair( OutputFilter out,
- InputFilter in,
- const std::string& data,
- mpl::true_ )
-{
- for ( int inc = default_increment;
- inc <= default_increment * 40;
- inc += default_increment )
- {
- {
- array_source src(data.data(), data.data() + data.size());
- std::string temp;
- std::string dest;
- iostreams::copy(src, compose(out, non_blocking_sink(temp, inc)));
- iostreams::copy(
- compose(in, non_blocking_source(temp, inc)),
- iostreams::back_inserter(dest)
- );
- if (dest != data)
- return false;
- }
- {
- array_source src(data.data(), data.data() + data.size());
- std::string temp;
- std::string dest;
- iostreams::copy(src, compose(out, non_blocking_sink(temp, inc)));
- // truncate the file, this should not loop, it may throw
- // std::ios_base::failure, which we swallow.
- try {
- temp.resize(temp.size() / 2);
- iostreams::copy(
- compose(in, non_blocking_source(temp, inc)),
- iostreams::back_inserter(dest)
- );
- } catch(std::ios_base::failure&) {}
- }
- {
- array_source src(data.data(), data.data() + data.size());
- std::string temp;
- std::string dest;
- iostreams::copy(compose(out, src), non_blocking_sink(temp, inc));
- iostreams::copy(
- non_blocking_source(temp, inc),
- compose(in, iostreams::back_inserter(dest))
- );
- if (dest != data)
- return false;
- }
- {
- array_source src(data.data(), data.data() + data.size());
- std::string temp;
- std::string dest;
- iostreams::copy(compose(out, src), non_blocking_sink(temp, inc));
- // truncate the file, this should not loop, it may throw
- // std::ios_base::failure, which we swallow.
- try {
- temp.resize(temp.size() / 2);
- iostreams::copy(
- non_blocking_source(temp, inc),
- compose(in, iostreams::back_inserter(dest))
- );
- } catch(std::ios_base::failure&) {}
- }
- }
- return true;
-}
-
-template<typename OutputFilter, typename InputFilter, typename Source>
-bool test_filter_pair( OutputFilter out,
- InputFilter in,
- const Source& data,
- mpl::false_ )
-{
- std::string str;
- iostreams::copy(data, iostreams::back_inserter(str));
- return test_filter_pair(out, in, str);
-}
-
-template<typename OutputFilter, typename InputFilter, typename Source>
-bool test_filter_pair( OutputFilter out,
- InputFilter in,
- const Source& data )
-{
- // Use tag dispatch to compensate for bad overload resolution.
- return test_filter_pair(out, in, data, is_string<Source>());
-}
-
-} } // End namespaces iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_FILTER_TEST_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/invert.hpp b/contrib/restricted/boost/boost/iostreams/invert.hpp
deleted file mode 100644
index d4a17bf7f3..0000000000
--- a/contrib/restricted/boost/boost/iostreams/invert.hpp
+++ /dev/null
@@ -1,167 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_INVERT_HPP_INCLUDED
-#define BOOST_IOSTREAMS_INVERT_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <algorithm> // copy, min.
-#include <boost/assert.hpp>
-#include <boost/config.hpp> // BOOST_DEDUCED_TYPENAME.
-#include <boost/detail/workaround.hpp> // default_filter_buffer_size.
-#include <boost/iostreams/char_traits.hpp>
-#include <boost/iostreams/compose.hpp>
-#include <boost/iostreams/constants.hpp>
-#include <boost/iostreams/device/array.hpp>
-#include <boost/iostreams/detail/buffer.hpp>
-#include <boost/iostreams/detail/counted_array.hpp>
-#include <boost/iostreams/detail/execute.hpp>
-#include <boost/iostreams/detail/functional.hpp> // clear_flags, call_reset
-#include <boost/mpl/if.hpp>
-#include <boost/ref.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC.
-
-namespace boost { namespace iostreams {
-
-//
-// Template name: inverse.
-// Template parameters:
-// Filter - A model of InputFilter or OutputFilter.
-// Description: Generates an InputFilter from an OutputFilter or
-// vice versa.
-//
-template<typename Filter>
-class inverse {
-private:
- BOOST_STATIC_ASSERT(is_filter<Filter>::value);
- typedef typename category_of<Filter>::type base_category;
- typedef reference_wrapper<Filter> filter_ref;
-public:
- typedef typename char_type_of<Filter>::type char_type;
- typedef typename int_type_of<Filter>::type int_type;
- typedef char_traits<char_type> traits_type;
- typedef typename
- mpl::if_<
- is_convertible<
- base_category,
- input
- >,
- output,
- input
- >::type mode;
- struct category
- : mode,
- filter_tag,
- multichar_tag,
- closable_tag
- { };
- explicit inverse( const Filter& filter,
- std::streamsize buffer_size =
- default_filter_buffer_size)
- : pimpl_(new impl(filter, buffer_size))
- { }
-
- template<typename Source>
- std::streamsize read(Source& src, char_type* s, std::streamsize n)
- {
- typedef detail::counted_array_sink<char_type> array_sink;
- typedef composite<filter_ref, array_sink> filtered_array_sink;
-
- BOOST_ASSERT((flags() & f_write) == 0);
- if (flags() == 0) {
- flags() = f_read;
- buf().set(0, 0);
- }
-
- filtered_array_sink snk(filter(), array_sink(s, n));
- int_type status;
- for ( status = traits_type::good();
- snk.second().count() < n && status == traits_type::good(); )
- {
- status = buf().fill(src);
- buf().flush(snk);
- }
- return snk.second().count() == 0 &&
- status == traits_type::eof()
- ?
- -1
- :
- snk.second().count();
- }
-
- template<typename Sink>
- std::streamsize write(Sink& dest, const char_type* s, std::streamsize n)
- {
- typedef detail::counted_array_source<char_type> array_source;
- typedef composite<filter_ref, array_source> filtered_array_source;
-
- BOOST_ASSERT((flags() & f_read) == 0);
- if (flags() == 0) {
- flags() = f_write;
- buf().set(0, 0);
- }
-
- filtered_array_source src(filter(), array_source(s, n));
- for (bool good = true; src.second().count() < n && good; ) {
- buf().fill(src);
- good = buf().flush(dest);
- }
- return src.second().count();
- }
-
- template<typename Device>
- void close(Device& dev)
- {
- detail::execute_all(
- detail::flush_buffer(buf(), dev, (flags() & f_write) != 0),
- detail::call_close_all(pimpl_->filter_, dev),
- detail::clear_flags(flags())
- );
- }
-private:
- filter_ref filter() { return boost::ref(pimpl_->filter_); }
- detail::buffer<char_type>& buf() { return pimpl_->buf_; }
- int& flags() { return pimpl_->flags_; }
-
- enum flags_ {
- f_read = 1, f_write = 2
- };
-
- struct impl {
- impl(const Filter& filter, std::streamsize n)
- : filter_(filter), buf_(n), flags_(0)
- { buf_.set(0, 0); }
- Filter filter_;
- detail::buffer<char_type> buf_;
- int flags_;
- };
- shared_ptr<impl> pimpl_;
-};
-
-//
-// Template name: invert.
-// Template parameters:
-// Filter - A model of InputFilter or OutputFilter.
-// Description: Returns an instance of an appropriate specialization of inverse.
-//
-template<typename Filter>
-inverse<Filter> invert(const Filter& f) { return inverse<Filter>(f); }
-
-//----------------------------------------------------------------------------//
-
-} } // End namespaces iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp> // MSVC.
-
-#endif // #ifndef BOOST_IOSTREAMS_INVERT_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/restrict.hpp b/contrib/restricted/boost/boost/iostreams/restrict.hpp
deleted file mode 100644
index e17eb8c965..0000000000
--- a/contrib/restricted/boost/boost/iostreams/restrict.hpp
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.)
- *
- * See http://www.boost.org/libs/iostreams for documentation.
- *
- * File: boost/iostreams/detail/restrict.hpp
- * Date: Sun Jan 06 12:57:30 MST 2008
- * Copyright: 2008 CodeRage, LLC
- 2004-2007 Jonathan Turkanis
- * Author: Jonathan Turkanis
- * Contact: turkanis at coderage dot com
- *
- * Defines the class template boost::iostreams::restriction and the
- * overloaded function template boost::iostreams::restrict
- */
-
-#ifndef BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED
-#define BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED
-
-#include <boost/iostreams/detail/restrict_impl.hpp>
-#define BOOST_IOSTREAMS_RESTRICT restrict
-#include <boost/iostreams/detail/restrict_impl.hpp>
-#undef BOOST_IOSTREAMS_RESTRICT
-
-#endif // #ifndef BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/skip.hpp b/contrib/restricted/boost/boost/iostreams/skip.hpp
deleted file mode 100644
index eb097dd7bb..0000000000
--- a/contrib/restricted/boost/boost/iostreams/skip.hpp
+++ /dev/null
@@ -1,112 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// To do: handle bidirection streams and output-seekable components.
-
-#ifndef BOOST_IOSTREAMS_SKIP_HPP_INCLUDED
-#define BOOST_IOSTREAMS_SKIP_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/iostreams/char_traits.hpp>
-#include <boost/iostreams/detail/ios.hpp> // failure.
-#include <boost/iostreams/operations.hpp>
-#include <boost/iostreams/seek.hpp>
-#include <boost/iostreams/traits.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/or.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-template<typename Device>
-void skip(Device& dev, stream_offset off, mpl::true_)
-{ iostreams::seek(dev, off, BOOST_IOS::cur); }
-
-template<typename Device>
-void skip(Device& dev, stream_offset off, mpl::false_)
-{ // gcc 2.95 needs namespace qualification for char_traits.
- typedef typename char_type_of<Device>::type char_type;
- typedef iostreams::char_traits<char_type> traits_type;
- for (stream_offset z = 0; z < off; ) {
- typename traits_type::int_type c;
- if (traits_type::is_eof(c = iostreams::get(dev)))
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad skip offset"));
- if (!traits_type::would_block(c))
- ++z;
- }
-}
-
-template<typename Filter, typename Device>
-void skip( Filter& flt, Device& dev, stream_offset off,
- BOOST_IOS::openmode which, mpl::true_ )
-{ boost::iostreams::seek(flt, dev, off, BOOST_IOS::cur, which); }
-
-template<typename Filter, typename Device>
-void skip( Filter& flt, Device& dev, stream_offset off,
- BOOST_IOS::openmode, mpl::false_ )
-{
- typedef typename char_type_of<Device>::type char_type;
- char_type c;
- for (stream_offset z = 0; z < off; ) {
- std::streamsize amt;
- if ((amt = iostreams::read(flt, dev, &c, 1)) == -1)
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad skip offset"));
- if (amt == 1)
- ++z;
- }
-}
-
-} // End namespace detail.
-
-template<typename Device>
-void skip(Device& dev, stream_offset off)
-{
- typedef typename mode_of<Device>::type mode;
- typedef mpl::or_<
- is_convertible<mode, input_seekable>,
- is_convertible<mode, output_seekable>
- > can_seek;
- BOOST_STATIC_ASSERT(
- (can_seek::value || is_convertible<mode, input>::value)
- );
- detail::skip(dev, off, can_seek());
-}
-
-template<typename Filter, typename Device>
-void skip( Filter& flt, Device& dev, stream_offset off,
- BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out )
-{
- typedef typename mode_of<Filter>::type filter_mode;
- typedef typename mode_of<Device>::type device_mode;
- typedef mpl::or_<
- mpl::and_<
- is_convertible<filter_mode, input_seekable>,
- is_convertible<device_mode, input_seekable>
- >,
- mpl::and_<
- is_convertible<filter_mode, output_seekable>,
- is_convertible<device_mode, output_seekable>
- >
- > can_seek;
- BOOST_STATIC_ASSERT(
- ( can_seek::value ||
- (is_convertible<filter_mode, input>::value &&
- is_convertible<device_mode, input>::value) )
- );
- detail::skip(flt, dev, off, which, can_seek());
-}
-
-} } // End namespaces iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_SKIP_HPP_INCLUDED //------------------------//
diff --git a/contrib/restricted/boost/boost/iostreams/slice.hpp b/contrib/restricted/boost/boost/iostreams/slice.hpp
deleted file mode 100644
index 820a316fe1..0000000000
--- a/contrib/restricted/boost/boost/iostreams/slice.hpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.)
- *
- * See http://www.boost.org/libs/iostreams for documentation.
- *
- * File: boost/iostreams/detail/restrict.hpp
- * Date: Sun Jan 06 12:57:30 MST 2008
- * Copyright: 2008 CodeRage, LLC
- 2004-2007 Jonathan Turkanis
- * Author: Jonathan Turkanis
- * Contact: turkanis at coderage dot com
- *
- * Defines the class template boost::iostreams::restriction and the
- * overloaded function template boost::iostreams::slice.
- *
- * This header is provided for platforms on which "restrict" is a keyword.
- */
-
-#ifndef BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED
-#define BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED
-
-#include <boost/iostreams/detail/restrict_impl.hpp>
-#define BOOST_IOSTREAMS_RESTRICT slice
-#include <boost/iostreams/detail/restrict_impl.hpp>
-#undef BOOST_IOSTREAMS_RESTRICT
-
-#endif // #ifndef BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/stream.hpp b/contrib/restricted/boost/boost/iostreams/stream.hpp
deleted file mode 100644
index c581837b75..0000000000
--- a/contrib/restricted/boost/boost/iostreams/stream.hpp
+++ /dev/null
@@ -1,171 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_STREAM_HPP_INCLUDED
-#define BOOST_IOSTREAMS_STREAM_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/iostreams/constants.hpp>
-#include <boost/iostreams/detail/char_traits.hpp>
-#include <boost/iostreams/detail/config/overload_resolution.hpp>
-#include <boost/iostreams/detail/forward.hpp>
-#include <boost/iostreams/detail/iostream.hpp> // standard streams.
-#include <boost/iostreams/detail/select.hpp>
-#include <boost/iostreams/stream_buffer.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/utility/base_from_member.hpp>
-
-namespace boost { namespace iostreams { namespace detail {
-
-template<typename Device, typename Tr>
-struct stream_traits {
- typedef typename char_type_of<Device>::type char_type;
- typedef Tr traits_type;
- typedef typename category_of<Device>::type mode;
- typedef typename
- iostreams::select< // Disambiguation required for Tru64.
- mpl::and_<
- is_convertible<mode, input>,
- is_convertible<mode, output>
- >,
- BOOST_IOSTREAMS_BASIC_IOSTREAM(char_type, traits_type),
- is_convertible<mode, input>,
- BOOST_IOSTREAMS_BASIC_ISTREAM(char_type, traits_type),
- else_,
- BOOST_IOSTREAMS_BASIC_OSTREAM(char_type, traits_type)
- >::type stream_type;
- typedef typename
- iostreams::select< // Disambiguation required for Tru64.
- mpl::and_<
- is_convertible<mode, input>,
- is_convertible<mode, output>
- >,
- iostream_tag,
- is_convertible<mode, input>,
- istream_tag,
- else_,
- ostream_tag
- >::type stream_tag;
-};
-
-#if defined(BOOST_MSVC) && (BOOST_MSVC == 1700)
-# pragma warning(push)
-// https://connect.microsoft.com/VisualStudio/feedback/details/733720/
-# pragma warning(disable: 4250)
-#endif
-
-// By encapsulating initialization in a base, we can define the macro
-// BOOST_IOSTREAMS_DEFINE_FORWARDING_FUNCTIONS to generate constructors
-// without base member initializer lists.
-template< typename Device,
- typename Tr =
- BOOST_IOSTREAMS_CHAR_TRAITS(
- BOOST_DEDUCED_TYPENAME char_type_of<Device>::type
- ),
- typename Alloc =
- std::allocator<
- BOOST_DEDUCED_TYPENAME char_type_of<Device>::type
- >,
- typename Base = // VC6 Workaround.
- BOOST_DEDUCED_TYPENAME
- detail::stream_traits<Device, Tr>::stream_type >
-class stream_base
- : protected base_from_member< stream_buffer<Device, Tr, Alloc> >,
- public Base
-{
-private:
- typedef base_from_member< stream_buffer<Device, Tr, Alloc> > pbase_type;
- typedef typename stream_traits<Device, Tr>::stream_type stream_type;
-protected:
- using pbase_type::member; // Avoid warning about 'this' in initializer list.
-public:
- stream_base() : pbase_type(), stream_type(&member) { }
-};
-
-#if defined(BOOST_MSVC) && (BOOST_MSVC == 1700)
-# pragma warning(pop)
-#endif
-
-} } } // End namespaces detail, iostreams, boost.
-
-#ifdef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION
-# include <boost/iostreams/detail/broken_overload_resolution/stream.hpp>
-#else
-
-namespace boost { namespace iostreams {
-
-#if defined(BOOST_MSVC) && (BOOST_MSVC == 1700)
-# pragma warning(push)
-// https://connect.microsoft.com/VisualStudio/feedback/details/733720/
-# pragma warning(disable: 4250)
-#endif
-
-//
-// Template name: stream.
-// Description: A iostream which reads from and writes to an instance of a
-// designated device type.
-// Template parameters:
-// Device - A device type.
-// Alloc - The allocator type.
-//
-template< typename Device,
- typename Tr =
- BOOST_IOSTREAMS_CHAR_TRAITS(
- BOOST_DEDUCED_TYPENAME char_type_of<Device>::type
- ),
- typename Alloc =
- std::allocator<
- BOOST_DEDUCED_TYPENAME char_type_of<Device>::type
- > >
-struct stream : detail::stream_base<Device, Tr, Alloc> {
-public:
- typedef typename char_type_of<Device>::type char_type;
- struct category
- : mode_of<Device>::type,
- closable_tag,
- detail::stream_traits<Device, Tr>::stream_tag
- { };
- BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr)
-private:
- typedef typename
- detail::stream_traits<
- Device, Tr
- >::stream_type stream_type;
-public:
- stream() { }
- BOOST_IOSTREAMS_FORWARD( stream, open_impl, Device,
- BOOST_IOSTREAMS_PUSH_PARAMS,
- BOOST_IOSTREAMS_PUSH_ARGS )
- bool is_open() const { return this->member.is_open(); }
- void close() { this->member.close(); }
- bool auto_close() const { return this->member.auto_close(); }
- void set_auto_close(bool close) { this->member.set_auto_close(close); }
- bool strict_sync() { return this->member.strict_sync(); }
- Device& operator*() { return *this->member; }
- Device* operator->() { return &*this->member; }
- Device* component() { return this->member.component(); }
-private:
- void open_impl(const Device& dev BOOST_IOSTREAMS_PUSH_PARAMS()) // For forwarding.
- {
- this->clear();
- this->member.open(dev BOOST_IOSTREAMS_PUSH_ARGS());
- }
-};
-
-#if defined(BOOST_MSVC) && (BOOST_MSVC == 1700)
-# pragma warning(pop)
-#endif
-
-} } // End namespaces iostreams, boost.
-
-#endif // #ifdef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION
-
-#endif // #ifndef BOOST_IOSTREAMS_stream_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/tee.hpp b/contrib/restricted/boost/boost/iostreams/tee.hpp
deleted file mode 100644
index 6df85e9b40..0000000000
--- a/contrib/restricted/boost/boost/iostreams/tee.hpp
+++ /dev/null
@@ -1,232 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// 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.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_TEE_HPP_INCLUDED
-#define BOOST_IOSTREAMS_TEE_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/assert.hpp>
-#include <boost/config.hpp> // BOOST_DEDUCE_TYPENAME.
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/detail/adapter/device_adapter.hpp>
-#include <boost/iostreams/detail/adapter/filter_adapter.hpp>
-#include <boost/iostreams/detail/call_traits.hpp>
-#include <boost/iostreams/detail/execute.hpp>
-#include <boost/iostreams/detail/functional.hpp> // call_close_all
-#include <boost/iostreams/operations.hpp>
-#include <boost/iostreams/pipeline.hpp>
-#include <boost/iostreams/traits.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-namespace boost { namespace iostreams {
-
-//
-// Template name: tee_filter.
-// Template parameters:
-// Device - A blocking Sink.
-//
-template<typename Device>
-class tee_filter : public detail::filter_adapter<Device> {
-public:
- typedef typename detail::param_type<Device>::type param_type;
- typedef typename char_type_of<Device>::type char_type;
- struct category
- : dual_use_filter_tag,
- multichar_tag,
- closable_tag,
- flushable_tag,
- localizable_tag,
- optimally_buffered_tag
- { };
-
- BOOST_STATIC_ASSERT(is_device<Device>::value);
- BOOST_STATIC_ASSERT((
- is_convertible< // Using mode_of causes failures on VC6-7.0.
- BOOST_DEDUCED_TYPENAME iostreams::category_of<Device>::type, output
- >::value
- ));
-
- explicit tee_filter(param_type dev)
- : detail::filter_adapter<Device>(dev)
- { }
-
- template<typename Source>
- std::streamsize read(Source& src, char_type* s, std::streamsize n)
- {
- std::streamsize result = iostreams::read(src, s, n);
- if (result != -1) {
- std::streamsize result2 = iostreams::write(this->component(), s, result);
- (void) result2; // Suppress 'unused variable' warning.
- BOOST_ASSERT(result == result2);
- }
- return result;
- }
-
- template<typename Sink>
- std::streamsize write(Sink& snk, const char_type* s, std::streamsize n)
- {
- std::streamsize result = iostreams::write(snk, s, n);
- std::streamsize result2 = iostreams::write(this->component(), s, result);
- (void) result2; // Suppress 'unused variable' warning.
- BOOST_ASSERT(result == result2);
- return result;
- }
-
- template<typename Next>
- void close(Next&, BOOST_IOS::openmode)
- {
- detail::close_all(this->component());
- }
-
- template<typename Sink>
- bool flush(Sink& snk)
- {
- bool r1 = iostreams::flush(snk);
- bool r2 = iostreams::flush(this->component());
- return r1 && r2;
- }
-};
-BOOST_IOSTREAMS_PIPABLE(tee_filter, 1)
-
-//
-// Template name: tee_device.
-// Template parameters:
-// Device - A blocking Device.
-// Sink - A blocking Sink.
-//
-template<typename Device, typename Sink>
-class tee_device {
-public:
- typedef typename detail::param_type<Device>::type device_param;
- typedef typename detail::param_type<Sink>::type sink_param;
- typedef typename detail::value_type<Device>::type device_value;
- typedef typename detail::value_type<Sink>::type sink_value;
- typedef typename char_type_of<Device>::type char_type;
- typedef typename
- mpl::if_<
- is_convertible<
- BOOST_DEDUCED_TYPENAME
- iostreams::category_of<Device>::type,
- output
- >,
- output,
- input
- >::type mode;
- BOOST_STATIC_ASSERT(is_device<Device>::value);
- BOOST_STATIC_ASSERT(is_device<Sink>::value);
- BOOST_STATIC_ASSERT((
- is_same<
- char_type,
- BOOST_DEDUCED_TYPENAME char_type_of<Sink>::type
- >::value
- ));
- BOOST_STATIC_ASSERT((
- is_convertible<
- BOOST_DEDUCED_TYPENAME iostreams::category_of<Sink>::type,
- output
- >::value
- ));
- struct category
- : mode,
- device_tag,
- closable_tag,
- flushable_tag,
- localizable_tag,
- optimally_buffered_tag
- { };
- tee_device(device_param device, sink_param sink)
- : dev_(device), sink_(sink)
- { }
- std::streamsize read(char_type* s, std::streamsize n)
- {
- BOOST_STATIC_ASSERT((
- is_convertible<
- BOOST_DEDUCED_TYPENAME iostreams::category_of<Device>::type, input
- >::value
- ));
- std::streamsize result1 = iostreams::read(dev_, s, n);
- if (result1 != -1) {
- std::streamsize result2 = iostreams::write(sink_, s, result1);
- (void) result1; // Suppress 'unused variable' warning.
- (void) result2;
- BOOST_ASSERT(result1 == result2);
- }
- return result1;
- }
- std::streamsize write(const char_type* s, std::streamsize n)
- {
- BOOST_STATIC_ASSERT((
- is_convertible<
- BOOST_DEDUCED_TYPENAME iostreams::category_of<Device>::type, output
- >::value
- ));
- std::streamsize result1 = iostreams::write(dev_, s, n);
- std::streamsize result2 = iostreams::write(sink_, s, n);
- (void) result1; // Suppress 'unused variable' warning.
- (void) result2;
- BOOST_ASSERT(result1 == n && result2 == n);
- return n;
- }
- void close()
- {
- detail::execute_all( detail::call_close_all(dev_),
- detail::call_close_all(sink_) );
- }
- bool flush()
- {
- bool r1 = iostreams::flush(dev_);
- bool r2 = iostreams::flush(sink_);
- return r1 && r2;
- }
- template<typename Locale>
- void imbue(const Locale& loc)
- {
- iostreams::imbue(dev_, loc);
- iostreams::imbue(sink_, loc);
- }
- std::streamsize optimal_buffer_size() const
- {
- return (std::max) ( iostreams::optimal_buffer_size(dev_),
- iostreams::optimal_buffer_size(sink_) );
- }
-private:
- device_value dev_;
- sink_value sink_;
-};
-
-template<typename Sink>
-tee_filter<Sink> tee(Sink& snk)
-{ return tee_filter<Sink>(snk); }
-
-template<typename Sink>
-tee_filter<Sink> tee(const Sink& snk)
-{ return tee_filter<Sink>(snk); }
-
-template<typename Device, typename Sink>
-tee_device<Device, Sink> tee(Device& dev, Sink& sink)
-{ return tee_device<Device, Sink>(dev, sink); }
-
-template<typename Device, typename Sink>
-tee_device<Device, Sink> tee(const Device& dev, Sink& sink)
-{ return tee_device<Device, Sink>(dev, sink); }
-
-template<typename Device, typename Sink>
-tee_device<Device, Sink> tee(Device& dev, const Sink& sink)
-{ return tee_device<Device, Sink>(dev, sink); }
-
-template<typename Device, typename Sink>
-tee_device<Device, Sink> tee(const Device& dev, const Sink& sink)
-{ return tee_device<Device, Sink>(dev, sink); }
-
-} } // End namespaces iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_TEE_HPP_INCLUDED
diff --git a/contrib/restricted/boost/iostreams/CMakeLists.txt b/contrib/restricted/boost/iostreams/CMakeLists.txt
new file mode 100644
index 0000000000..51a3db13d5
--- /dev/null
+++ b/contrib/restricted/boost/iostreams/CMakeLists.txt
@@ -0,0 +1,53 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+find_package(ZLIB REQUIRED)
+
+add_library(restricted-boost-iostreams)
+target_compile_options(restricted-boost-iostreams PRIVATE
+ -DBOOST_IOSTREAMS_USE_DEPRECATED
+ -Wno-everything
+)
+target_include_directories(restricted-boost-iostreams PUBLIC
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/iostreams/include
+)
+target_include_directories(restricted-boost-iostreams PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/libs/libbz2
+)
+target_link_libraries(restricted-boost-iostreams PUBLIC
+ contrib-libs-cxxsupp
+ contrib-libs-libbz2
+ contrib-libs-lzma
+ ZLIB::ZLIB
+ restricted-boost-assert
+ restricted-boost-bind
+ restricted-boost-config
+ restricted-boost-core
+ restricted-boost-detail
+ restricted-boost-function
+ restricted-boost-integer
+ restricted-boost-iterator
+ restricted-boost-mpl
+ restricted-boost-preprocessor
+ restricted-boost-random
+ restricted-boost-range
+ restricted-boost-regex
+ restricted-boost-smart_ptr
+ restricted-boost-static_assert
+ restricted-boost-throw_exception
+ restricted-boost-type_traits
+ restricted-boost-utility
+)
+target_sources(restricted-boost-iostreams PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/iostreams/src/bzip2.cpp
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/iostreams/src/file_descriptor.cpp
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/iostreams/src/gzip.cpp
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/iostreams/src/lzma.cpp
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/iostreams/src/mapped_file.cpp
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/iostreams/src/zlib.cpp
+)
diff --git a/contrib/restricted/boost/boost/iostreams/categories.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/categories.hpp
index 0e84de1e98..0e84de1e98 100644
--- a/contrib/restricted/boost/boost/iostreams/categories.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/categories.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/chain.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/chain.hpp
index 4e108c8b09..4e108c8b09 100644
--- a/contrib/restricted/boost/boost/iostreams/chain.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/chain.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/char_traits.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/char_traits.hpp
index 76ddf9d4f2..76ddf9d4f2 100644
--- a/contrib/restricted/boost/boost/iostreams/char_traits.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/char_traits.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/checked_operations.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/checked_operations.hpp
index 667d925443..667d925443 100644
--- a/contrib/restricted/boost/boost/iostreams/checked_operations.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/checked_operations.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/close.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/close.hpp
index 8ae499ff26..8ae499ff26 100644
--- a/contrib/restricted/boost/boost/iostreams/close.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/close.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/concepts.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/concepts.hpp
index da4bfd6950..da4bfd6950 100644
--- a/contrib/restricted/boost/boost/iostreams/concepts.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/concepts.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/constants.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/constants.hpp
index 55e6f5fdf3..55e6f5fdf3 100644
--- a/contrib/restricted/boost/boost/iostreams/constants.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/constants.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/access_control.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/access_control.hpp
index 9c3328a226..9c3328a226 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/access_control.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/access_control.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/adapter/concept_adapter.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/concept_adapter.hpp
index 5ca878b55a..5ca878b55a 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/adapter/concept_adapter.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/concept_adapter.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/adapter/mode_adapter.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/mode_adapter.hpp
index 46e83c58af..46e83c58af 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/adapter/mode_adapter.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/mode_adapter.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/adapter/non_blocking_adapter.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
index 623cf769d2..623cf769d2 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/adapter/output_iterator_adapter.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
index 2ed9039c7b..2ed9039c7b 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/adapter/range_adapter.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/range_adapter.hpp
index b7fe56f7ed..b7fe56f7ed 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/adapter/range_adapter.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/adapter/range_adapter.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/bool_trait_def.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/bool_trait_def.hpp
index c3fb9d587b..c3fb9d587b 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/bool_trait_def.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/bool_trait_def.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/broken_overload_resolution/forward.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/broken_overload_resolution/forward.hpp
index 4444916c3a..4444916c3a 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/broken_overload_resolution/forward.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/broken_overload_resolution/forward.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp
index d5c7107087..d5c7107087 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/buffer.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/buffer.hpp
index 35cb33c700..35cb33c700 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/buffer.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/buffer.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/call_traits.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/call_traits.hpp
index be6123737b..be6123737b 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/call_traits.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/call_traits.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/char_traits.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/char_traits.hpp
index ce3eb6dbe7..ce3eb6dbe7 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/char_traits.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/char_traits.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/auto_link.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/auto_link.hpp
index 07ab23c3c1..07ab23c3c1 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/auto_link.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/auto_link.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/bzip2.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/bzip2.hpp
index bfcda40560..bfcda40560 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/bzip2.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/bzip2.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/codecvt.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/codecvt.hpp
index 6519ddcd44..6519ddcd44 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/codecvt.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/codecvt.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/disable_warnings.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/disable_warnings.hpp
index ef25cdb907..ef25cdb907 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/disable_warnings.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/disable_warnings.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/dyn_link.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/dyn_link.hpp
index cc8c73bd90..cc8c73bd90 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/dyn_link.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/dyn_link.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/enable_warnings.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/enable_warnings.hpp
index 5712f36442..5712f36442 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/enable_warnings.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/enable_warnings.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/fpos.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/fpos.hpp
index 76db861fc1..a5835421fe 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/fpos.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/fpos.hpp
@@ -25,9 +25,11 @@
#include <boost/config.hpp>
# if (defined(_YVALS) || defined(_CPPLIB_VER)) && !defined(__SGI_STL_PORT) && \
- !defined(_STLPORT_VERSION) && !defined(__QNX__) && !defined(_VX_CPU) && !defined(__VXWORKS__)
+ !defined(_STLPORT_VERSION) && !defined(__QNX__) && !defined(_VX_CPU) && !defined(__VXWORKS__) \
+ && !((defined(BOOST_MSVC) || defined(BOOST_CLANG)) && _MSVC_STL_VERSION >= 141) \
+ && !defined(_LIBCPP_VERSION)
/**/
-
+
#include <boost/iostreams/detail/ios.hpp>
# define BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS
@@ -40,8 +42,4 @@
# endif
-#if defined(_LIBCPP_COMPILER_MSVC) || defined(_LIBCPP_COMPILER_CLANG)
-#undef BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS
-#endif
-
#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/gcc.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/gcc.hpp
index ff6892a5e5..ff6892a5e5 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/gcc.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/gcc.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/limits.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/limits.hpp
index 155d6b0a69..155d6b0a69 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/limits.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/limits.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/overload_resolution.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/overload_resolution.hpp
index 63d9e2830d..63d9e2830d 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/overload_resolution.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/overload_resolution.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/rtl.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/rtl.hpp
index d9fbe5080d..d9fbe5080d 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/rtl.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/rtl.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/unreachable_return.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/unreachable_return.hpp
index 65fba609de..65fba609de 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/unreachable_return.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/unreachable_return.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/wide_streams.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/wide_streams.hpp
index af3d716d49..af3d716d49 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/wide_streams.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/wide_streams.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/windows_posix.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/windows_posix.hpp
index 4e73c50d0d..4e73c50d0d 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/windows_posix.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/windows_posix.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/config/zlib.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/zlib.hpp
index 017dd0c182..017dd0c182 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/config/zlib.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/config/zlib.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/default_arg.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/default_arg.hpp
index c443e9872a..c443e9872a 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/default_arg.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/default_arg.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/dispatch.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/dispatch.hpp
index 35cf244141..35cf244141 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/dispatch.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/dispatch.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/double_object.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/double_object.hpp
index efb3b78601..efb3b78601 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/double_object.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/double_object.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/enable_if_stream.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/enable_if_stream.hpp
index 826e44d2a5..826e44d2a5 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/enable_if_stream.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/enable_if_stream.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/error.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/error.hpp
index 85cbd98fe2..85cbd98fe2 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/error.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/error.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/execute.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/execute.hpp
index 28e4217234..28e4217234 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/execute.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/execute.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/file_handle.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/file_handle.hpp
index d797efb29a..d797efb29a 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/file_handle.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/file_handle.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/forward.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/forward.hpp
index f5ed4f85dc..f5ed4f85dc 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/forward.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/forward.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/fstream.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/fstream.hpp
index 848258d97c..848258d97c 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/fstream.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/fstream.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/functional.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/functional.hpp
index 7f345f5a86..7f345f5a86 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/functional.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/functional.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/ios.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/ios.hpp
index b123ddeb58..b123ddeb58 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/ios.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/ios.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/iostream.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/iostream.hpp
index 1e19f08278..1e19f08278 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/iostream.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/iostream.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/is_dereferenceable.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/is_dereferenceable.hpp
index 06744abbdf..06744abbdf 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/is_dereferenceable.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/is_dereferenceable.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/is_iterator_range.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/is_iterator_range.hpp
index 39d845f4a3..39d845f4a3 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/is_iterator_range.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/is_iterator_range.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/optional.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/optional.hpp
index 867dfbda69..867dfbda69 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/optional.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/optional.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/path.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/path.hpp
index a5d1ad330f..a5d1ad330f 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/path.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/path.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/push.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/push.hpp
index 1a9393cb02..1a9393cb02 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/push.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/push.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/push_params.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/push_params.hpp
index 8d8e5d74b3..8d8e5d74b3 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/push_params.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/push_params.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/resolve.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/resolve.hpp
index 2d480950e1..2d480950e1 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/resolve.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/resolve.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/select.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/select.hpp
index 16c5973ad1..16c5973ad1 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/select.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/select.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/select_by_size.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/select_by_size.hpp
index e08ca3458b..e08ca3458b 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/select_by_size.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/select_by_size.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/streambuf.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf.hpp
index f2e8081b20..f2e8081b20 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/streambuf.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/streambuf/chainbuf.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/chainbuf.hpp
index c3714fe041..c3714fe041 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/streambuf/chainbuf.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/chainbuf.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/streambuf/direct_streambuf.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/direct_streambuf.hpp
index 69efe2b128..69efe2b128 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/streambuf/direct_streambuf.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/direct_streambuf.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/streambuf/indirect_streambuf.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
index 90e1e11531..90e1e11531 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/streambuf/linked_streambuf.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/linked_streambuf.hpp
index 9999ded62f..9999ded62f 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/streambuf/linked_streambuf.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/streambuf/linked_streambuf.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/system_failure.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/system_failure.hpp
index 10b291a516..bddcef12b8 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/system_failure.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/system_failure.hpp
@@ -27,7 +27,9 @@ namespace std { using ::strlen; }
#endif
#ifdef BOOST_IOSTREAMS_WINDOWS
-# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+# endif
# include <windows.h>
#else
# include <errno.h>
diff --git a/contrib/restricted/boost/boost/iostreams/detail/template_params.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/template_params.hpp
index b07012fb82..b07012fb82 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/template_params.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/template_params.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/translate_int_type.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/translate_int_type.hpp
index ae48a2c46f..ae48a2c46f 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/translate_int_type.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/translate_int_type.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/detail/wrap_unwrap.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/wrap_unwrap.hpp
index f5f97897f9..f5f97897f9 100644
--- a/contrib/restricted/boost/boost/iostreams/detail/wrap_unwrap.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/detail/wrap_unwrap.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/device/array.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/array.hpp
index 768a5644a1..768a5644a1 100644
--- a/contrib/restricted/boost/boost/iostreams/device/array.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/array.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/device/back_inserter.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/back_inserter.hpp
index 669c889e0a..669c889e0a 100644
--- a/contrib/restricted/boost/boost/iostreams/device/back_inserter.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/back_inserter.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/device/file.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/file.hpp
index 3eb0301647..3eb0301647 100644
--- a/contrib/restricted/boost/boost/iostreams/device/file.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/file.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/device/file_descriptor.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/file_descriptor.hpp
index 5d6af12814..5d6af12814 100644
--- a/contrib/restricted/boost/boost/iostreams/device/file_descriptor.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/file_descriptor.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/device/mapped_file.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/mapped_file.hpp
index 1332beabd1..783954e7c0 100644
--- a/contrib/restricted/boost/boost/iostreams/device/mapped_file.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/mapped_file.hpp
@@ -136,6 +136,8 @@ struct basic_mapped_file_params
: base_type(other), path(other.path)
{ }
+ basic_mapped_file_params& operator=(const basic_mapped_file_params& other) = default;
+
// Templated copy constructor
template<typename PathT>
basic_mapped_file_params(const basic_mapped_file_params<PathT>& other)
diff --git a/contrib/restricted/boost/boost/iostreams/device/null.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/null.hpp
index a3943d7436..a3943d7436 100644
--- a/contrib/restricted/boost/boost/iostreams/device/null.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/device/null.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/filter/bzip2.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/filter/bzip2.hpp
index b9c04a7ce1..b9c04a7ce1 100644
--- a/contrib/restricted/boost/boost/iostreams/filter/bzip2.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/filter/bzip2.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/filter/gzip.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/filter/gzip.hpp
index 96876beb52..e236983e0b 100644
--- a/contrib/restricted/boost/boost/iostreams/filter/gzip.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/filter/gzip.hpp
@@ -49,10 +49,6 @@
# pragma warning(disable:4309) // Truncation of constant value.
#endif
-#ifdef __GNUC__
-#pragma GCC system_header
-#endif
-
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std { using ::time_t; }
#endif
diff --git a/contrib/restricted/boost/boost/iostreams/filter/lzma.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/filter/lzma.hpp
index 94cd2b3b54..94cd2b3b54 100644
--- a/contrib/restricted/boost/boost/iostreams/filter/lzma.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/filter/lzma.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/filter/symmetric.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/filter/symmetric.hpp
index f18089f4fb..f18089f4fb 100644
--- a/contrib/restricted/boost/boost/iostreams/filter/symmetric.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/filter/symmetric.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/filter/zlib.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/filter/zlib.hpp
index e57870a510..e57870a510 100644
--- a/contrib/restricted/boost/boost/iostreams/filter/zlib.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/filter/zlib.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/filtering_stream.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/filtering_stream.hpp
index 8621ef96b2..8621ef96b2 100644
--- a/contrib/restricted/boost/boost/iostreams/filtering_stream.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/filtering_stream.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/filtering_streambuf.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/filtering_streambuf.hpp
index affe4a71c4..affe4a71c4 100644
--- a/contrib/restricted/boost/boost/iostreams/filtering_streambuf.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/filtering_streambuf.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/flush.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/flush.hpp
index 5212a448f1..5212a448f1 100644
--- a/contrib/restricted/boost/boost/iostreams/flush.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/flush.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/get.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/get.hpp
index 12d530fd81..12d530fd81 100644
--- a/contrib/restricted/boost/boost/iostreams/get.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/get.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/imbue.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/imbue.hpp
index 48d2e1845a..48d2e1845a 100644
--- a/contrib/restricted/boost/boost/iostreams/imbue.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/imbue.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/input_sequence.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/input_sequence.hpp
index e504c8e8ff..e504c8e8ff 100644
--- a/contrib/restricted/boost/boost/iostreams/input_sequence.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/input_sequence.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/operations.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/operations.hpp
index 28bd773172..28bd773172 100644
--- a/contrib/restricted/boost/boost/iostreams/operations.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/operations.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/operations_fwd.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/operations_fwd.hpp
index ae68d70467..ae68d70467 100644
--- a/contrib/restricted/boost/boost/iostreams/operations_fwd.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/operations_fwd.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/optimal_buffer_size.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/optimal_buffer_size.hpp
index 13894faab8..13894faab8 100644
--- a/contrib/restricted/boost/boost/iostreams/optimal_buffer_size.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/optimal_buffer_size.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/output_sequence.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/output_sequence.hpp
index 5b42bf457d..5b42bf457d 100644
--- a/contrib/restricted/boost/boost/iostreams/output_sequence.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/output_sequence.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/pipeline.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/pipeline.hpp
index d29c2da3f7..d29c2da3f7 100644
--- a/contrib/restricted/boost/boost/iostreams/pipeline.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/pipeline.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/positioning.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/positioning.hpp
index 12f2afc84b..12f2afc84b 100644
--- a/contrib/restricted/boost/boost/iostreams/positioning.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/positioning.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/put.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/put.hpp
index a3fe33f207..a3fe33f207 100644
--- a/contrib/restricted/boost/boost/iostreams/put.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/put.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/putback.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/putback.hpp
index a4969f641a..a4969f641a 100644
--- a/contrib/restricted/boost/boost/iostreams/putback.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/putback.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/read.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/read.hpp
index a8652c5644..a8652c5644 100644
--- a/contrib/restricted/boost/boost/iostreams/read.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/read.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/seek.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/seek.hpp
index 148c90bfa8..148c90bfa8 100644
--- a/contrib/restricted/boost/boost/iostreams/seek.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/seek.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/stream_buffer.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/stream_buffer.hpp
index dbcb786c65..dbcb786c65 100644
--- a/contrib/restricted/boost/boost/iostreams/stream_buffer.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/stream_buffer.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/traits.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/traits.hpp
index f8d7a3ff5b..f8d7a3ff5b 100644
--- a/contrib/restricted/boost/boost/iostreams/traits.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/traits.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/traits_fwd.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/traits_fwd.hpp
index a3e952623a..a3e952623a 100644
--- a/contrib/restricted/boost/boost/iostreams/traits_fwd.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/traits_fwd.hpp
diff --git a/contrib/restricted/boost/boost/iostreams/write.hpp b/contrib/restricted/boost/iostreams/include/boost/iostreams/write.hpp
index 8faf986ae0..8faf986ae0 100644
--- a/contrib/restricted/boost/boost/iostreams/write.hpp
+++ b/contrib/restricted/boost/iostreams/include/boost/iostreams/write.hpp
diff --git a/contrib/restricted/boost/iostreams/src/bzip2.cpp b/contrib/restricted/boost/iostreams/src/bzip2.cpp
new file mode 100644
index 0000000000..af80cd2f94
--- /dev/null
+++ b/contrib/restricted/boost/iostreams/src/bzip2.cpp
@@ -0,0 +1,168 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// 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.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// To configure Boost to work with libbz2, see the
+// installation instructions here:
+// http://boost.org/libs/iostreams/doc/index.html?path=7
+
+// Define BOOST_IOSTREAMS_SOURCE so that <boost/iostreams/detail/config.hpp>
+// knows that we are building the library (possibly exporting code), rather
+// than using it (possibly importing code).
+#define BOOST_IOSTREAMS_SOURCE
+
+#include <boost/throw_exception.hpp>
+#include <boost/iostreams/detail/config/dyn_link.hpp>
+#include <boost/iostreams/filter/bzip2.hpp>
+#include "bzlib.h" // Julian Seward's "bzip.h" header.
+ // To configure Boost to work with libbz2, see the
+ // installation instructions here:
+ // http://boost.org/libs/iostreams/doc/index.html?path=7
+
+namespace boost { namespace iostreams {
+
+namespace bzip2 {
+
+ // Status codes
+
+const int ok = BZ_OK;
+const int run_ok = BZ_RUN_OK;
+const int flush_ok = BZ_FLUSH_OK;
+const int finish_ok = BZ_FINISH_OK;
+const int stream_end = BZ_STREAM_END;
+const int sequence_error = BZ_SEQUENCE_ERROR;
+const int param_error = BZ_PARAM_ERROR;
+const int mem_error = BZ_MEM_ERROR;
+const int data_error = BZ_DATA_ERROR;
+const int data_error_magic = BZ_DATA_ERROR_MAGIC;
+const int io_error = BZ_IO_ERROR;
+const int unexpected_eof = BZ_UNEXPECTED_EOF;
+const int outbuff_full = BZ_OUTBUFF_FULL;
+const int config_error = BZ_CONFIG_ERROR;
+
+ // Action codes
+
+const int finish = BZ_FINISH;
+const int run = BZ_RUN;
+
+} // End namespace bzip2.
+
+//------------------Implementation of bzip2_error-----------------------------//
+
+bzip2_error::bzip2_error(int error)
+ : BOOST_IOSTREAMS_FAILURE("bzip2 error"), error_(error)
+ { }
+
+void bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(int error)
+{
+ switch (error) {
+ case BZ_OK:
+ case BZ_RUN_OK:
+ case BZ_FLUSH_OK:
+ case BZ_FINISH_OK:
+ case BZ_STREAM_END:
+ return;
+ case BZ_MEM_ERROR:
+ boost::throw_exception(std::bad_alloc());
+ default:
+ boost::throw_exception(bzip2_error(error));
+ }
+}
+
+//------------------Implementation of bzip2_base------------------------------//
+
+namespace detail {
+
+bzip2_base::bzip2_base(const bzip2_params& params)
+ : params_(params), stream_(new bz_stream), ready_(false)
+ { }
+
+bzip2_base::~bzip2_base() { delete static_cast<bz_stream*>(stream_); }
+
+void bzip2_base::before( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end )
+{
+ bz_stream* s = static_cast<bz_stream*>(stream_);
+ s->next_in = const_cast<char*>(src_begin);
+ s->avail_in = static_cast<unsigned>(src_end - src_begin);
+ s->next_out = reinterpret_cast<char*>(dest_begin);
+ s->avail_out= static_cast<unsigned>(dest_end - dest_begin);
+}
+
+void bzip2_base::after(const char*& src_begin, char*& dest_begin)
+{
+ bz_stream* s = static_cast<bz_stream*>(stream_);
+ src_begin = const_cast<char*>(s->next_in);
+ dest_begin = s->next_out;
+}
+
+int bzip2_base::check_end(const char* src_begin, const char* dest_begin)
+{
+ bz_stream* s = static_cast<bz_stream*>(stream_);
+ if( src_begin == s->next_in &&
+ s->avail_in == 0 &&
+ dest_begin == s->next_out) {
+ return bzip2::unexpected_eof;
+ } else {
+ return bzip2::ok;
+ }
+}
+
+void bzip2_base::end(bool compress)
+{
+ if(!ready_) return;
+ ready_ = false;
+ bz_stream* s = static_cast<bz_stream*>(stream_);
+ bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ compress ?
+ BZ2_bzCompressEnd(s) :
+ BZ2_bzDecompressEnd(s)
+ );
+}
+
+int bzip2_base::compress(int action)
+{
+ return BZ2_bzCompress(static_cast<bz_stream*>(stream_), action);
+}
+
+int bzip2_base::decompress()
+{
+ return BZ2_bzDecompress(static_cast<bz_stream*>(stream_));
+}
+
+void bzip2_base::do_init
+ ( bool compress,
+ bzip2::alloc_func /* alloc */,
+ bzip2::free_func /* free */,
+ void* derived )
+{
+ bz_stream* s = static_cast<bz_stream*>(stream_);
+
+ // Current interface for customizing memory management
+ // is non-conforming and has been disabled:
+ // s->bzalloc = alloc;
+ // s->bzfree = free;
+ s->bzalloc = 0;
+ s->bzfree = 0;
+ s->opaque = derived;
+ bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ compress ?
+ BZ2_bzCompressInit( s,
+ params_.block_size,
+ 0,
+ params_.work_factor ) :
+ BZ2_bzDecompressInit( s,
+ 0,
+ params_.small )
+ );
+ ready_ = true;
+}
+
+} // End namespace detail.
+
+//----------------------------------------------------------------------------//
+
+} } // End namespaces iostreams, boost.
diff --git a/contrib/restricted/boost/libs/iostreams/src/file_descriptor.cpp b/contrib/restricted/boost/iostreams/src/file_descriptor.cpp
index 288e2c6401..288e2c6401 100644
--- a/contrib/restricted/boost/libs/iostreams/src/file_descriptor.cpp
+++ b/contrib/restricted/boost/iostreams/src/file_descriptor.cpp
diff --git a/contrib/restricted/boost/libs/iostreams/src/gzip.cpp b/contrib/restricted/boost/iostreams/src/gzip.cpp
index 94830e5b8c..94830e5b8c 100644
--- a/contrib/restricted/boost/libs/iostreams/src/gzip.cpp
+++ b/contrib/restricted/boost/iostreams/src/gzip.cpp
diff --git a/contrib/restricted/boost/iostreams/src/lzma.cpp b/contrib/restricted/boost/iostreams/src/lzma.cpp
new file mode 100644
index 0000000000..5d7bb3cfbd
--- /dev/null
+++ b/contrib/restricted/boost/iostreams/src/lzma.cpp
@@ -0,0 +1,147 @@
+// (C) Copyright Milan Svoboda 2008.
+// Originally developed under the fusecompress project.
+// Based on bzip2.cpp by:
+// (C) Copyright Jonathan Turkanis 2003.
+// 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.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Define BOOST_IOSTREAMS_SOURCE so that <boost/iostreams/detail/config.hpp>
+// knows that we are building the library (possibly exporting code), rather
+// than using it (possibly importing code).
+#define BOOST_IOSTREAMS_SOURCE
+
+#include <lzma.h>
+
+#include <boost/throw_exception.hpp>
+#include <boost/iostreams/detail/config/dyn_link.hpp>
+#include <boost/iostreams/filter/lzma.hpp>
+
+namespace boost { namespace iostreams {
+
+namespace lzma {
+
+ // Compression levels
+
+const uint32_t no_compression = 0;
+const uint32_t best_speed = 1;
+const uint32_t best_compression = 9;
+const uint32_t default_compression = 2;
+
+ // Status codes
+
+const int okay = LZMA_OK;
+const int stream_end = LZMA_STREAM_END;
+const int unsupported_check = LZMA_UNSUPPORTED_CHECK;
+const int mem_error = LZMA_MEM_ERROR;
+const int options_error = LZMA_OPTIONS_ERROR;
+const int data_error = LZMA_DATA_ERROR;
+const int buf_error = LZMA_BUF_ERROR;
+const int prog_error = LZMA_PROG_ERROR;
+
+ // Flush codes
+
+const int finish = LZMA_FINISH;
+const int full_flush = LZMA_FULL_FLUSH;
+const int sync_flush = LZMA_SYNC_FLUSH;
+const int run = LZMA_RUN;
+
+ // Code for current OS
+
+} // End namespace lzma.
+
+//------------------Implementation of lzma_error------------------------------//
+
+lzma_error::lzma_error(int error)
+ : BOOST_IOSTREAMS_FAILURE("lzma error"), error_(error)
+ { }
+
+void lzma_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(int error)
+{
+ switch (error) {
+ case LZMA_OK:
+ case LZMA_STREAM_END:
+ return;
+ case LZMA_MEM_ERROR:
+ boost::throw_exception(std::bad_alloc());
+ default:
+ boost::throw_exception(lzma_error(error));
+ }
+}
+
+//------------------Implementation of lzma_base-------------------------------//
+
+namespace detail {
+
+lzma_base::lzma_base()
+ : stream_(new lzma_stream)
+ { }
+
+lzma_base::~lzma_base() { delete static_cast<lzma_stream*>(stream_); }
+
+void lzma_base::before( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end )
+{
+ lzma_stream* s = static_cast<lzma_stream*>(stream_);
+ s->next_in = reinterpret_cast<uint8_t*>(const_cast<char*>(src_begin));
+ s->avail_in = static_cast<size_t>(src_end - src_begin);
+ s->next_out = reinterpret_cast<uint8_t*>(dest_begin);
+ s->avail_out= static_cast<size_t>(dest_end - dest_begin);
+}
+
+void lzma_base::after(const char*& src_begin, char*& dest_begin, bool)
+{
+ lzma_stream* s = static_cast<lzma_stream*>(stream_);
+ src_begin = const_cast<const char*>(reinterpret_cast<const char*>(s->next_in));
+ dest_begin = reinterpret_cast<char*>(s->next_out);
+}
+
+int lzma_base::deflate(int action)
+{
+ return lzma_code(static_cast<lzma_stream*>(stream_), static_cast<lzma_action>(action));
+}
+
+int lzma_base::inflate(int action)
+{
+ return lzma_code(static_cast<lzma_stream*>(stream_), static_cast<lzma_action>(action));
+}
+
+void lzma_base::reset(bool compress, bool realloc)
+{
+ lzma_stream* s = static_cast<lzma_stream*>(stream_);
+ lzma_end(s);
+ if (realloc)
+ {
+ memset(s, 0, sizeof(*s));
+
+ lzma_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ compress ?
+ lzma_easy_encoder(s, level, LZMA_CHECK_CRC32) :
+ lzma_stream_decoder(s, 100 * 1024 * 1024, LZMA_CONCATENATED)
+ );
+ }
+}
+
+void lzma_base::do_init
+ ( const lzma_params& p, bool compress,
+ lzma::alloc_func, lzma::free_func,
+ void* )
+{
+ lzma_stream* s = static_cast<lzma_stream*>(stream_);
+
+ memset(s, 0, sizeof(*s));
+
+ level = p.level;
+ lzma_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ compress ?
+ lzma_easy_encoder(s, p.level, LZMA_CHECK_CRC32) :
+ lzma_stream_decoder(s, 100 * 1024 * 1024, LZMA_CONCATENATED)
+ );
+}
+
+} // End namespace detail.
+
+//----------------------------------------------------------------------------//
+
+} } // End namespaces iostreams, boost.
diff --git a/contrib/restricted/boost/libs/iostreams/src/mapped_file.cpp b/contrib/restricted/boost/iostreams/src/mapped_file.cpp
index 8073848cdb..e345086a2d 100644
--- a/contrib/restricted/boost/libs/iostreams/src/mapped_file.cpp
+++ b/contrib/restricted/boost/iostreams/src/mapped_file.cpp
@@ -19,7 +19,9 @@
#include <boost/throw_exception.hpp>
#ifdef BOOST_IOSTREAMS_WINDOWS
-# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+# endif
# include <windows.h>
#else
# include <errno.h>
diff --git a/contrib/restricted/boost/libs/iostreams/src/zlib.cpp b/contrib/restricted/boost/iostreams/src/zlib.cpp
index 3dd7b1a89c..3dd7b1a89c 100644
--- a/contrib/restricted/boost/libs/iostreams/src/zlib.cpp
+++ b/contrib/restricted/boost/iostreams/src/zlib.cpp
diff --git a/contrib/restricted/boost/libs/iostreams/CMakeLists.darwin.txt b/contrib/restricted/boost/libs/iostreams/CMakeLists.darwin.txt
deleted file mode 100644
index 6859c94e49..0000000000
--- a/contrib/restricted/boost/libs/iostreams/CMakeLists.darwin.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-
-# This file was gererated by the build system used internally in the Yandex monorepo.
-# Only simple modifications are allowed (adding source-files to targets, adding simple properties
-# like target_include_directories). These modifications will be ported to original
-# ya.make files by maintainers. Any complex modifications which can't be ported back to the
-# original buildsystem will not be accepted.
-
-
-find_package(ZLIB REQUIRED)
-
-add_library(boost-libs-iostreams)
-target_compile_options(boost-libs-iostreams PRIVATE
- -DBOOST_ATOMIC_STATIC_LINK=1
- -DBOOST_All_STATIC_LINK=1
- -DBOOST_CHRONO_STATIC_LINK=1
- -DBOOST_SYSTEM_STATIC_LINK=1
- -DBOOST_TIMER_STATIC_LINK=1
- -DBOOST_ALL_NO_LIB=1
- -DBOOST_ATOMIC_SOURCE
- -DBOOST_COROUTINES_SOURCE
- -DBOOST_DISABLE_ASSERTS
- -DBOOST_SPIRIT_USE_PHOENIX_V3=1
- -DBOOST_SYSTEM_NO_DEPRECATED
- -DBOOST_THREAD_BUILD_LIB=1
- -DBOOST_THREAD_DONT_USE_CHRONO=1
- -DBOOST_THREAD_NO_LIB=1
- -DBOOST_THREAD_USE_LIB=1
- -DDATE_TIME_INLINE
- -DBOOST_THREAD_DONT_USE_CHRONO
- -DBOOST_THREAD_POSIX
- -D_DARWIN_C_SOURCE=1
- -DBOOST_IOSTREAMS_USE_DEPRECATED
- -Wno-everything
-)
-target_link_libraries(boost-libs-iostreams PUBLIC
- contrib-libs-cxxsupp
- contrib-restricted-boost
- ZLIB::ZLIB
- contrib-libs-libbz2
-)
-target_sources(boost-libs-iostreams PRIVATE
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/iostreams/src/file_descriptor.cpp
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/iostreams/src/gzip.cpp
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/iostreams/src/mapped_file.cpp
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/iostreams/src/zlib.cpp
-)
diff --git a/contrib/restricted/boost/libs/iostreams/CMakeLists.linux.txt b/contrib/restricted/boost/libs/iostreams/CMakeLists.linux.txt
deleted file mode 100644
index b954f4d6a0..0000000000
--- a/contrib/restricted/boost/libs/iostreams/CMakeLists.linux.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-
-# This file was gererated by the build system used internally in the Yandex monorepo.
-# Only simple modifications are allowed (adding source-files to targets, adding simple properties
-# like target_include_directories). These modifications will be ported to original
-# ya.make files by maintainers. Any complex modifications which can't be ported back to the
-# original buildsystem will not be accepted.
-
-
-find_package(ZLIB REQUIRED)
-
-add_library(boost-libs-iostreams)
-target_compile_options(boost-libs-iostreams PRIVATE
- -DBOOST_ATOMIC_STATIC_LINK=1
- -DBOOST_All_STATIC_LINK=1
- -DBOOST_CHRONO_STATIC_LINK=1
- -DBOOST_SYSTEM_STATIC_LINK=1
- -DBOOST_TIMER_STATIC_LINK=1
- -DBOOST_ALL_NO_LIB=1
- -DBOOST_ATOMIC_SOURCE
- -DBOOST_COROUTINES_SOURCE
- -DBOOST_DISABLE_ASSERTS
- -DBOOST_SPIRIT_USE_PHOENIX_V3=1
- -DBOOST_SYSTEM_NO_DEPRECATED
- -DBOOST_THREAD_BUILD_LIB=1
- -DBOOST_THREAD_DONT_USE_CHRONO=1
- -DBOOST_THREAD_NO_LIB=1
- -DBOOST_THREAD_USE_LIB=1
- -DDATE_TIME_INLINE
- -DBOOST_THREAD_DONT_USE_CHRONO
- -DBOOST_THREAD_POSIX
- -DBOOST_IOSTREAMS_USE_DEPRECATED
- -Wno-everything
-)
-target_link_libraries(boost-libs-iostreams PUBLIC
- contrib-libs-cxxsupp
- contrib-restricted-boost
- ZLIB::ZLIB
- contrib-libs-libbz2
-)
-target_sources(boost-libs-iostreams PRIVATE
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/iostreams/src/file_descriptor.cpp
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/iostreams/src/gzip.cpp
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/iostreams/src/mapped_file.cpp
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/iostreams/src/zlib.cpp
-)
diff --git a/contrib/restricted/boost/libs/iostreams/CMakeLists.txt b/contrib/restricted/boost/libs/iostreams/CMakeLists.txt
deleted file mode 100644
index fc7b1ee73c..0000000000
--- a/contrib/restricted/boost/libs/iostreams/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-
-# This file was gererated by the build system used internally in the Yandex monorepo.
-# Only simple modifications are allowed (adding source-files to targets, adding simple properties
-# like target_include_directories). These modifications will be ported to original
-# ya.make files by maintainers. Any complex modifications which can't be ported back to the
-# original buildsystem will not be accepted.
-
-
-if (APPLE)
- include(CMakeLists.darwin.txt)
-elseif (UNIX AND NOT APPLE)
- include(CMakeLists.linux.txt)
-endif()