File indexing completed on 2025-01-18 09:39:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef BOOST_LOG_UTILITY_FUNCTIONAL_BIND_TO_LOG_HPP_INCLUDED_
0017 #define BOOST_LOG_UTILITY_FUNCTIONAL_BIND_TO_LOG_HPP_INCLUDED_
0018
0019 #include <boost/log/detail/config.hpp>
0020 #include <boost/log/utility/functional/bind.hpp>
0021 #include <boost/log/utility/manipulators/to_log.hpp>
0022 #include <boost/log/detail/header.hpp>
0023
0024 #ifdef BOOST_HAS_PRAGMA_ONCE
0025 #pragma once
0026 #endif
0027
0028 namespace boost {
0029
0030 BOOST_LOG_OPEN_NAMESPACE
0031
0032
0033 template< typename TagT = void >
0034 struct to_log_fun
0035 {
0036 typedef void result_type;
0037
0038 template< typename StreamT, typename T >
0039 void operator() (StreamT& strm, T const& val) const
0040 {
0041 strm << boost::log::to_log< TagT >(val);
0042 }
0043 };
0044
0045
0046 template< >
0047 struct to_log_fun< void >
0048 {
0049 typedef void result_type;
0050
0051 template< typename StreamT, typename T >
0052 void operator() (StreamT& strm, T const& val) const
0053 {
0054 strm << boost::log::to_log(val);
0055 }
0056 };
0057
0058 template< typename StreamT >
0059 BOOST_FORCEINLINE binder1st< to_log_fun< >, StreamT& > bind_to_log(StreamT& strm)
0060 {
0061 return binder1st< to_log_fun< >, StreamT& >(to_log_fun< >(), strm);
0062 }
0063
0064 template< typename TagT, typename StreamT >
0065 BOOST_FORCEINLINE binder1st< to_log_fun< TagT >, StreamT& > bind_to_log(StreamT& strm)
0066 {
0067 return binder1st< to_log_fun< TagT >, StreamT& >(to_log_fun< TagT >(), strm);
0068 }
0069
0070 BOOST_LOG_CLOSE_NAMESPACE
0071
0072 }
0073
0074 #include <boost/log/detail/footer.hpp>
0075
0076 #endif