update boost

This commit is contained in:
2023-11-24 12:56:13 -06:00
parent cfc99971af
commit 19d727037a
9260 changed files with 849256 additions and 299957 deletions

View File

@@ -498,7 +498,7 @@ protected:
void set_chain(chain_type* c)
{ chain_ = c; chain_->register_client(this); }
#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) && \
(!BOOST_WORKAROUND(__BORLANDC__, < 0x600))
(!BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600))
template<typename S, typename C, typename T, typename A, typename M>
friend class chain_base;
#else

View File

@@ -378,7 +378,7 @@ 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) && \
# if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && \
!defined(__GNUC__) // ---------------------------------------------------//
template<typename Filter, typename FilterOrDevice>

View File

@@ -23,7 +23,7 @@
#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>

View File

@@ -117,8 +117,8 @@ public:
std::streamsize optimal_buffer_size() const
{ return iostreams::optimal_buffer_size(t_); }
public:
concept_adapter& operator=(const concept_adapter&);
private:
BOOST_DELETED_FUNCTION(concept_adapter& operator=(const concept_adapter&))
value_type t_;
};

View File

@@ -10,20 +10,20 @@
#if defined(_MSC_VER)
# pragma once
#endif
#endif
#include <algorithm> // min.
#include <boost/assert.hpp>
#include <cstddef> // ptrdiff_t.
#include <iosfwd> // streamsize, streamoff.
#include <boost/detail/iterator.hpp> // boost::iterator_traits.
#include <iterator> // iterator_traits.
#include <boost/iostreams/categories.hpp>
#include <boost/iostreams/detail/error.hpp>
#include <boost/iostreams/positioning.hpp>
#include <boost/mpl/if.hpp>
#include <boost/throw_exception.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/core/enable_if.hpp>
// Must come last.
#include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC.
@@ -44,7 +44,7 @@ template<typename Mode, typename Range>
class range_adapter {
private:
typedef typename Range::iterator iterator;
typedef boost::detail::iterator_traits<iterator> iter_traits;
typedef std::iterator_traits<iterator> iter_traits;
typedef typename iter_traits::iterator_category iter_cat;
public:
typedef typename Range::value_type char_type;

View File

@@ -21,7 +21,7 @@
// Description: Used to generate the traits classes is_istream, is_ostream,
// etc.
//
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x582))
# define BOOST_IOSTREAMS_TRAIT_NAMESPACE(trait)
#else
# define BOOST_IOSTREAMS_TRAIT_NAMESPACE(trait) BOOST_PP_CAT(trait, _impl_)::

View File

@@ -17,7 +17,7 @@
#if defined(BOOST_EXTERNAL_LIB_NAME)
# if defined(BOOST_MSVC) \
|| defined(__BORLANDC__) \
|| defined(__BORLANDC__) && !defined(__clang__) \
|| (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
|| (defined(__ICL) && defined(_MSC_EXTENSIONS)) \
/**/

View File

@@ -15,9 +15,11 @@
# pragma once
#endif
#include <boost/config.hpp> // BOOST_STRINGIZE.
#if defined(BOOST_BZIP2_BINARY)
# if defined(BOOST_MSVC) || \
defined(__BORLANDC__) || \
defined(BOOST_BORLANDC) || \
(defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) || \
(defined(__ICL) && defined(_MSC_EXTENSIONS)) \
/**/

View File

@@ -68,7 +68,7 @@ namespace std {
#if defined(__LIBCOMO__)
using ::mbstate_t;
#elif defined(BOOST_DINKUMWARE_STDLIB) && !defined(__BORLANDC__)
#elif defined(BOOST_DINKUMWARE_STDLIB) && !defined(BOOST_BORLANDC)
using ::mbstate_t;
#elif defined(__SGI_STL_PORT)
#elif defined(BOOST_NO_STDC_NAMESPACE)

View File

@@ -20,7 +20,7 @@
# pragma warning(disable:6334) // sizeof applied to an expression with an operator.
# endif
#else
# if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
# if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600)
# pragma warn -8008 // Condition always true/false.
# pragma warn -8066 // Unreachable code.
# pragma warn -8071 // Conversion may lose significant digits.

View File

@@ -8,7 +8,7 @@
#if defined(BOOST_MSVC)
# pragma warning(pop)
#else
# if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
# if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600)
# pragma warn .8008 // Condition always true/false.
# pragma warn .8066 // Unreachable code.
# pragma warn .8071 // Conversion may lose significant digits.

View File

@@ -26,7 +26,8 @@
# if (defined(_YVALS) || defined(_CPPLIB_VER)) && !defined(__SGI_STL_PORT) && \
!defined(_STLPORT_VERSION) && !defined(__QNX__) && !defined(_VX_CPU) && !defined(__VXWORKS__) \
&& !((defined(BOOST_MSVC) || defined(BOOST_CLANG)) && _MSVC_STL_VERSION >= 141)
&& !((defined(BOOST_MSVC) || defined(BOOST_CLANG)) && _MSVC_STL_VERSION >= 141) \
&& !defined(_LIBCPP_VERSION)
/**/
#include <boost/iostreams/detail/ios.hpp>

View File

@@ -21,7 +21,7 @@
#if !defined(BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION)
# if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) || \
BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) \
/**/
# define BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION
# endif

View File

@@ -23,7 +23,7 @@
#include <boost/iostreams/detail/config/windows_posix.hpp>
// Handle open, close, read, and write
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
# define BOOST_IOSTREAMS_RTL(x) BOOST_JOIN(_rtl_, x)
#elif defined BOOST_IOSTREAMS_WINDOWS
# define BOOST_IOSTREAMS_RTL(x) BOOST_JOIN(_, x)

View File

@@ -19,7 +19,7 @@
#if defined(BOOST_ZLIB_BINARY)
# if defined(BOOST_MSVC) || \
defined(__BORLANDC__) || \
defined(BOOST_BORLANDC) || \
(defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) || \
(defined(__ICL) && defined(_MSC_EXTENSIONS)) \
/**/

View File

@@ -13,11 +13,12 @@
#endif
#include <boost/config.hpp> // BOOST_NO_SFINAE.
#include <boost/config/workaround.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/iostreams/traits_fwd.hpp> // is_std_io.
#if !defined(BOOST_NO_SFINAE) && \
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
# define BOOST_IOSTREAMS_ENABLE_IF_STREAM(T) \
, typename boost::enable_if< boost::iostreams::is_std_io<T> >::type* = 0 \
/**/

View File

@@ -67,7 +67,7 @@ struct execute_traits_impl<void> {
template< typename Op,
typename Result = // VC6.5 workaround.
#if !defined(BOOST_NO_RESULT_OF) && \
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
typename boost::result_of<Op()>::type
#else
BOOST_DEDUCED_TYPENAME Op::result_type

View File

@@ -102,7 +102,7 @@
// Disable forwarding constructors if first parameter type is the same
// as the device type
#if !defined(BOOST_NO_SFINAE) && \
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
# define BOOST_IOSTREAMS_DISABLE_IF_SAME(device, param) \
, typename boost::disable_if< boost::is_same<device, param> >::type* = 0 \
/**/

View File

@@ -38,7 +38,7 @@ public:
{ }
void operator()() const { boost::iostreams::close(t_, which_); }
private:
device_close_operation& operator=(const device_close_operation&);
BOOST_DELETED_FUNCTION(device_close_operation& operator=(const device_close_operation&))
T& t_;
BOOST_IOS::openmode which_;
};
@@ -52,7 +52,7 @@ public:
{ }
void operator()() const { boost::iostreams::close(t_, snk_, which_); }
private:
filter_close_operation& operator=(const filter_close_operation&);
BOOST_DELETED_FUNCTION(filter_close_operation& operator=(const filter_close_operation&))
T& t_;
Sink& snk_;
BOOST_IOS::openmode which_;
@@ -78,7 +78,7 @@ public:
device_close_all_operation(T& t) : t_(t) { }
void operator()() const { detail::close_all(t_); }
private:
device_close_all_operation& operator=(const device_close_all_operation&);
BOOST_DELETED_FUNCTION(device_close_all_operation& operator=(const device_close_all_operation&))
T& t_;
};
@@ -89,7 +89,7 @@ public:
filter_close_all_operation(T& t, Sink& snk) : t_(t), snk_(snk) { }
void operator()() const { detail::close_all(t_, snk_); }
private:
filter_close_all_operation& operator=(const filter_close_all_operation&);
BOOST_DELETED_FUNCTION(filter_close_all_operation& operator=(const filter_close_all_operation&))
T& t_;
Sink& snk_;
};
@@ -115,7 +115,7 @@ public:
{ }
void operator()() const { t_.close(which_); }
private:
member_close_operation& operator=(const member_close_operation&);
BOOST_DELETED_FUNCTION(member_close_operation& operator=(const member_close_operation&))
T& t_;
BOOST_IOS::openmode which_;
};
@@ -133,7 +133,7 @@ public:
reset_operation(T& t) : t_(t) { }
void operator()() const { t_.reset(); }
private:
reset_operation& operator=(const reset_operation&);
BOOST_DELETED_FUNCTION(reset_operation& operator=(const reset_operation&))
T& t_;
};
@@ -149,7 +149,7 @@ public:
clear_flags_operation(T& t) : t_(t) { }
void operator()() const { t_ = 0; }
private:
clear_flags_operation& operator=(const clear_flags_operation&);
BOOST_DELETED_FUNCTION(clear_flags_operation& operator=(const clear_flags_operation&))
T& t_;
};
@@ -173,7 +173,7 @@ public:
buf_.flush(dev_);
}
private:
flush_buffer_operation& operator=(const flush_buffer_operation&);
BOOST_DELETED_FUNCTION(flush_buffer_operation& operator=(const flush_buffer_operation&))
Buffer& buf_;
Device& dev_;
bool flush_;

View File

@@ -32,7 +32,7 @@ namespace boost { namespace iostreams { namespace detail {
#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------------------//
# define BOOST_IOSTREAMS_BASIC_IOS(ch, tr) std::basic_ios< ch, tr >
# if !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) && \
!BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
!BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) \
/**/
#define BOOST_IOS std::ios

View File

@@ -83,7 +83,7 @@ public:
void reset()
{
if (initialized_) {
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) || \
BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \
/**/
T* t = static_cast<T*>(address());

View File

@@ -53,7 +53,7 @@
BOOST_IOSTREAMS_PUSH_ARGS() ); \
/**/
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) \
/**/
# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
# define BOOST_IOSTREAMS_DEFINE_PUSH_IMPL(name, mode, ch, helper, has_return, result) \

View File

@@ -167,7 +167,7 @@ struct resolve_traits {
is_array<T>,
array_adapter<Mode, T>,
else_,
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600)
const T&
#else
T
@@ -196,7 +196,7 @@ typename resolve_traits<Mode, Ch, T>::type
resolve(const T& t BOOST_IOSTREAMS_DISABLE_IF_STREAM(T))
{ return resolve<Mode, Ch>(t, is_std_io<T>()); }
# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
# if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && \
!defined(__GNUC__) // ---------------------------------------------------//
template<typename Mode, typename Ch, typename T>

View File

@@ -465,7 +465,7 @@ 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) && \
# if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && \
!defined(__GNUC__) // ---------------------------------------------------//
template<typename T>

View File

@@ -390,11 +390,18 @@ inline void indirect_streambuf<T, Tr, Alloc, Mode>::close_impl
sync();
setp(0, 0);
}
#if defined(BOOST_MSVC)
#pragma warning(push)
#pragma warning(disable: 4127) // conditional expression is constant
#endif
if ( !is_convertible<category, dual_use>::value ||
is_convertible<Mode, input>::value == (which == BOOST_IOS::in) )
{
obj().close(which, next_);
}
#if defined(BOOST_MSVC)
#pragma warning(pop)
#endif
}
//----------State changing functions------------------------------------------//

View File

@@ -195,7 +195,7 @@ private:
template<typename Alloc = std::allocator<char> >
class bzip2_compressor_impl
: public bzip2_base,
#if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
#if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600)
public
#endif
bzip2_allocator<Alloc>
@@ -219,7 +219,7 @@ private:
template<typename Alloc = std::allocator<char> >
class bzip2_decompressor_impl
: public bzip2_base,
#if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
#if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600)
public
#endif
bzip2_allocator<Alloc>
@@ -365,22 +365,24 @@ bool bzip2_decompressor_impl<Alloc>::filter
( const char*& src_begin, const char* src_end,
char*& dest_begin, char* dest_end, bool flush )
{
if (eof_) {
// reset the stream if there are more characters
if(src_begin == src_end)
return false;
else
close();
}
if (!ready())
init();
before(src_begin, src_end, dest_begin, dest_end);
int result = decompress();
if(result == bzip2::ok && flush)
result = check_end(src_begin, dest_begin);
after(src_begin, dest_begin);
bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
eof_ = result == bzip2::stream_end;
do {
if (eof_) {
// reset the stream if there are more characters
if(src_begin == src_end)
return false;
else
close();
}
if (!ready())
init();
before(src_begin, src_end, dest_begin, dest_end);
int result = decompress();
if(result == bzip2::ok && flush)
result = check_end(src_begin, dest_begin);
after(src_begin, dest_begin);
bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
eof_ = result == bzip2::stream_end;
} while (eof_ && src_begin != src_end && dest_begin != dest_end);
return true;
}

View File

@@ -138,15 +138,15 @@ const int os_unknown = 255;
struct gzip_params : zlib_params {
// Non-explicit constructor.
gzip_params( int level = gzip::default_compression,
int method = gzip::deflated,
int window_bits = gzip::default_window_bits,
int mem_level = gzip::default_mem_level,
int strategy = gzip::default_strategy,
gzip_params( int level_ = gzip::default_compression,
int method_ = gzip::deflated,
int window_bits_ = gzip::default_window_bits,
int mem_level_ = gzip::default_mem_level,
int strategy_ = gzip::default_strategy,
std::string file_name_ = "",
std::string comment_ = "",
std::time_t mtime_ = 0 )
: zlib_params(level, method, window_bits, mem_level, strategy),
: zlib_params(level_, method_, window_bits_, mem_level_, strategy_),
file_name(file_name_), comment(comment_), mtime(mtime_)
{ }
std::string file_name;

View File

@@ -87,10 +87,12 @@ const int null = 0;
struct lzma_params {
// Non-explicit constructor.
lzma_params( uint32_t level = lzma::default_compression )
lzma_params( uint32_t level = lzma::default_compression, uint32_t threads = 1 )
: level(level)
, threads(threads)
{ }
uint32_t level;
uint32_t threads;
};
//
@@ -170,8 +172,10 @@ private:
lzma::alloc_func,
lzma::free_func,
void* derived );
void* stream_; // Actual type: lzmadec_stream*.
uint32_t level;
void init_stream(bool compress);
void* stream_; // Actual type: lzma_stream*.
uint32_t level_;
uint32_t threads_;
};
//
@@ -182,7 +186,7 @@ private:
template<typename Alloc = std::allocator<char> >
class lzma_compressor_impl : public lzma_base, public lzma_allocator<Alloc> {
public:
lzma_compressor_impl(const lzma_params& = lzma::default_compression);
lzma_compressor_impl(const lzma_params& = lzma_params());
~lzma_compressor_impl();
bool filter( const char*& src_begin, const char* src_end,
char*& dest_begin, char* dest_end, bool flush );
@@ -222,7 +226,7 @@ private:
public:
typedef typename base_type::char_type char_type;
typedef typename base_type::category category;
basic_lzma_compressor( const lzma_params& = lzma::default_compression,
basic_lzma_compressor( const lzma_params& = lzma_params(),
std::streamsize buffer_size = default_device_buffer_size );
};
BOOST_IOSTREAMS_PIPABLE(basic_lzma_compressor, 1)

View File

@@ -156,8 +156,8 @@ public:
if (c == CR) {
flags_ |= f_has_CR;
int d;
if ((d = iostreams::get(src)) == WOULD_BLOCK)
int d = iostreams::get(src);
if (d == WOULD_BLOCK)
return WOULD_BLOCK;
if (d == LF) {
@@ -260,10 +260,12 @@ private:
break;
case iostreams::newline::dos:
if ((flags_ & f_has_LF) != 0) {
if ((success = boost::iostreams::put(dest, LF)))
success = boost::iostreams::put(dest, LF);
if (success)
flags_ &= ~f_has_LF;
} else if (boost::iostreams::put(dest, CR)) {
if (!(success = boost::iostreams::put(dest, LF)))
success = boost::iostreams::put(dest, LF);
if (!success)
flags_ |= f_has_LF;
}
break;

View File

@@ -15,7 +15,7 @@
#include <boost/detail/workaround.hpp>
#include <algorithm> // min.
#include <cstddef> // size_t.
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) || \
BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
/**/
# include <cstdlib> // rand.
@@ -24,7 +24,7 @@
#include <iterator>
#include <string>
#include <vector>
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
/**/
# include <boost/random/linear_congruential.hpp>
@@ -50,7 +50,7 @@
namespace std {
using ::memcpy;
using ::strlen;
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) || \
BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
/**/
using ::rand;
@@ -64,7 +64,7 @@ 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)) && \
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
/**/
std::streamsize rand(std::streamsize inc)

View File

@@ -389,7 +389,8 @@ bool zlib_decompressor_impl<Alloc>::filter
int result = xinflate(zlib::sync_flush);
after(src_begin, dest_begin, false);
zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
return !(eof_ = result == zlib::stream_end);
eof_ = result == zlib::stream_end;
return !eof_;
}
template<typename Alloc>

View File

@@ -183,8 +183,8 @@ public:
};
//
// Template name: zstd_compressor_impl
// Description: Model of C-Style Filte implementing decompression by
// Template name: zstd_decompressor_impl
// Description: Model of C-Style Filter implementing decompression by
// delegating to the zstd function inflate.
//
template<typename Alloc = std::allocator<char> >

View File

@@ -47,7 +47,7 @@ struct pipeline;
namespace detail {
#if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
#if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600)
template<typename T>
struct is_pipeline : mpl::false_ { };