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

@@ -16,10 +16,12 @@
#define BOOST_LOG_UTILITY_SETUP_CONSOLE_HPP_INCLUDED_
#include <iostream>
#include <boost/type_traits/is_void.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/make_shared_object.hpp>
#include <boost/core/null_deleter.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/parameter_tools.hpp>
#include <boost/log/detail/sink_init_helpers.hpp>
#ifndef BOOST_LOG_NO_THREADS
#include <boost/log/sinks/sync_frontend.hpp>
@@ -29,7 +31,6 @@
#include <boost/log/sinks/text_ostream_backend.hpp>
#include <boost/log/keywords/format.hpp>
#include <boost/log/keywords/filter.hpp>
#include <boost/log/keywords/auto_flush.hpp>
#include <boost/log/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
@@ -62,10 +63,9 @@ shared_ptr<
shared_ptr< std::basic_ostream< CharT > > pStream(&strm, boost::null_deleter());
typedef sinks::basic_text_ostream_backend< CharT > backend_t;
shared_ptr< backend_t > pBackend = boost::make_shared< backend_t >();
shared_ptr< backend_t > pBackend = boost::make_shared< backend_t >(args);
pBackend->add_stream(pStream);
pBackend->auto_flush(args[keywords::auto_flush | false]);
typedef BOOST_LOG_CONSOLE_SINK_FRONTEND_INTERNAL< backend_t > sink_t;
shared_ptr< sink_t > pSink = boost::make_shared< sink_t >(pBackend);
@@ -112,7 +112,7 @@ inline shared_ptr<
> add_console_log()
{
return aux::add_console_log(
aux::default_console_stream< CharT >::get(), keywords::auto_flush = false);
aux::default_console_stream< CharT >::get(), log::aux::empty_arg_list());
}
@@ -123,7 +123,7 @@ inline shared_ptr<
>
> add_console_log(std::basic_ostream< CharT >& strm)
{
return aux::add_console_log(strm, keywords::auto_flush = false);
return aux::add_console_log(strm, log::aux::empty_arg_list());
}
template< typename CharT, typename ArgT1 >
@@ -156,6 +156,16 @@ inline shared_ptr<
return aux::add_console_log(strm, (arg1, arg2, arg3));
}
template< typename CharT, typename ArgT1, typename ArgT2, typename ArgT3, typename ArgT4 >
inline shared_ptr<
BOOST_LOG_CONSOLE_SINK_FRONTEND_INTERNAL<
sinks::basic_text_ostream_backend< CharT >
>
> add_console_log(std::basic_ostream< CharT >& strm, ArgT1 const& arg1, ArgT2 const& arg2, ArgT3 const& arg3, ArgT3 const& arg4)
{
return aux::add_console_log(strm, (arg1, arg2, arg3, arg4));
}
#else // BOOST_LOG_DOXYGEN_PASS
/*!
@@ -170,6 +180,8 @@ inline shared_ptr<
* or a formatter lambda expression (either streaming or Boost.Format-like notation).
* \li \c auto_flush A boolean flag that shows whether the sink should automatically flush the stream
* after each written record.
* \li \c auto_newline_mode - Specifies automatic trailing newline insertion mode. Must be a value of
* the \c auto_newline_mode enum. By default, is <tt>auto_newline_mode::insert_if_missing</tt>.
* \return Pointer to the constructed sink.
*/
template< typename CharT, typename... ArgsT >

View File

@@ -16,6 +16,7 @@
#define BOOST_LOG_UTILITY_SETUP_FILE_HPP_INCLUDED_
#include <boost/type_traits/is_void.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/make_shared_object.hpp>
#include <boost/parameter/parameters.hpp> // for is_named_argument
@@ -36,6 +37,8 @@
#include <boost/log/sinks/unlocked_frontend.hpp>
#endif
#include <boost/log/sinks/text_file_backend.hpp>
#include <boost/log/keywords/format.hpp>
#include <boost/log/keywords/filter.hpp>
#include <boost/log/keywords/scan_method.hpp>
#include <boost/log/detail/header.hpp>
@@ -59,12 +62,12 @@ namespace aux {
//! The function creates a file collector according to the specified arguments
template< typename ArgsT >
inline shared_ptr< sinks::file::collector > setup_file_collector(ArgsT const&, mpl::true_ const&)
inline shared_ptr< sinks::file::collector > setup_file_collector(ArgsT const&, boost::true_type)
{
return shared_ptr< sinks::file::collector >();
}
template< typename ArgsT >
inline shared_ptr< sinks::file::collector > setup_file_collector(ArgsT const& args, mpl::false_ const&)
inline shared_ptr< sinks::file::collector > setup_file_collector(ArgsT const& args, boost::false_type)
{
return sinks::file::make_collector(args);
}
@@ -134,13 +137,13 @@ struct file_name_param_traits< T, false >
#ifndef BOOST_LOG_DOXYGEN_PASS
#define BOOST_LOG_INIT_LOG_TO_FILE_INTERNAL(z, n, data)\
template< BOOST_PP_ENUM_PARAMS(n, typename T) >\
inline shared_ptr< BOOST_LOG_FILE_SINK_FRONTEND_INTERNAL< sinks::text_file_backend > > add_file_log(BOOST_PP_ENUM_BINARY_PARAMS(n, T, const& arg))\
template< BOOST_PP_ENUM_PARAMS_Z(z, n, typename T) >\
inline shared_ptr< BOOST_LOG_FILE_SINK_FRONTEND_INTERNAL< sinks::text_file_backend > > add_file_log(BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, T, const& arg))\
{\
return aux::file_name_param_traits< T0 >::wrap_add_file_log(\
arg0\
BOOST_PP_COMMA_IF(BOOST_PP_GREATER(n, 1))\
BOOST_PP_EXPR_IF(BOOST_PP_GREATER(n, 1), (BOOST_PP_ENUM_SHIFTED_PARAMS(n, arg)))\
BOOST_PP_EXPR_IF(BOOST_PP_GREATER(n, 1), (BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, n, arg)))\
);\
}
@@ -164,7 +167,10 @@ BOOST_PP_REPEAT_FROM_TO(1, BOOST_LOG_MAX_PARAMETER_ARGS, BOOST_LOG_INIT_LOG_TO_F
* \li \c time_based_rotation The predicate for time-based file rotations. See <tt>basic_text_file_backend</tt>.
* \li \c auto_flush A boolean flag that shows whether the sink should automatically flush the file
* after each written record.
* \li \c target The target directory to store rotated files in. See <tt>sinks::file::make_collector</tt>.
* \li \c auto_newline_mode - Specifies automatic trailing newline insertion mode. Must be a value of
* the \c auto_newline_mode enum. By default, is <tt>auto_newline_mode::insert_if_missing</tt>.
* \li \c target The target directory to store rotated files in. Enables file collector and, if specified, limits associated
* with the target directory. See <tt>sinks::file::make_collector</tt>.
* \li \c max_size The maximum total size of rotated files in the target directory. See <tt>sinks::file::make_collector</tt>.
* \li \c min_free_space Minimum free space in the target directory. See <tt>sinks::file::make_collector</tt>.
* \li \c max_files The maximum total number of rotated files in the target directory. See <tt>sinks::file::make_collector</tt>.
@@ -173,7 +179,11 @@ BOOST_PP_REPEAT_FROM_TO(1, BOOST_LOG_MAX_PARAMETER_ARGS, BOOST_LOG_INIT_LOG_TO_F
* or a filter lambda expression.
* \li \c format Specifies a formatter to install into the sink. May be a string that represents a formatter,
* or a formatter lambda expression (either streaming or Boost.Format-like notation).
*
* \return Pointer to the constructed sink.
*
* \note The \c target named argument is required to enable the file collector and the limits associated with the target directory.
* If the parameter is not specified, the file collector will not be created and the limits will not be maintained.
*/
template< typename... ArgsT >
shared_ptr< BOOST_LOG_FILE_SINK_FRONTEND_INTERNAL< sinks::text_file_backend > > add_file_log(ArgsT... const& args);

View File

@@ -20,7 +20,7 @@
#include <iterator>
#include <boost/assert.hpp>
#include <boost/move/core.hpp>
#include <boost/mpl/if.hpp>
#include <boost/type_traits/conditional.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/optional/optional.hpp>
#include <boost/property_tree/ptree.hpp>
@@ -115,7 +115,7 @@ private:
class ref
{
private:
typedef typename mpl::if_c<
typedef typename boost::conditional<
IsConstV,
basic_settings_section< char_type > const,
basic_settings_section< char_type >
@@ -354,14 +354,14 @@ public:
/*!
* Default constructor. Creates an empty settings container.
*/
basic_settings_section() : m_ptree(NULL)
basic_settings_section() BOOST_NOEXCEPT : m_ptree(NULL)
{
}
/*!
* Copy constructor.
*/
basic_settings_section(basic_settings_section const& that) : m_ptree(that.m_ptree)
basic_settings_section(basic_settings_section const& that) BOOST_NOEXCEPT : m_ptree(that.m_ptree)
{
}
@@ -517,7 +517,7 @@ public:
/*!
* Swaps two references to settings sections.
*/
void swap(basic_settings_section& that)
void swap(basic_settings_section& that) BOOST_NOEXCEPT
{
property_tree_type* const p = m_ptree;
m_ptree = that.m_ptree;
@@ -525,13 +525,13 @@ public:
}
protected:
explicit basic_settings_section(property_tree_type* tree) : m_ptree(tree)
explicit basic_settings_section(property_tree_type* tree) BOOST_NOEXCEPT : m_ptree(tree)
{
}
};
template< typename CharT >
inline void swap(basic_settings_section< CharT >& left, basic_settings_section< CharT >& right)
inline void swap(basic_settings_section< CharT >& left, basic_settings_section< CharT >& right) BOOST_NOEXCEPT
{
left.swap(right);
}
@@ -584,7 +584,7 @@ public:
/*!
* Move constructor.
*/
basic_settings(BOOST_RV_REF(this_type) that)
basic_settings(BOOST_RV_REF(this_type) that) BOOST_NOEXCEPT
{
this->swap(that);
}
@@ -598,7 +598,7 @@ public:
/*!
* Destructor
*/
~basic_settings()
~basic_settings() BOOST_NOEXCEPT
{
delete this->m_ptree;
}
@@ -618,7 +618,7 @@ public:
/*!
* Move assignment operator.
*/
basic_settings& operator= (BOOST_RV_REF(basic_settings) that)
basic_settings& operator= (BOOST_RV_REF(basic_settings) that) BOOST_NOEXCEPT
{
this->swap(that);
return *this;