summaryrefslogtreecommitdiff
path: root/boost/log/utility/manipulators/to_log.hpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:30:07 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:32:57 +0900
commit71d216b90256936a9638f325af9bc69d720e75de (patch)
tree9c5f682d341c7c88ad0c8e3d4b262e00b6fb691a /boost/log/utility/manipulators/to_log.hpp
parent733b5d5ae2c5d625211e2985ac25728ac3f54883 (diff)
downloadboost-71d216b90256936a9638f325af9bc69d720e75de.tar.gz
boost-71d216b90256936a9638f325af9bc69d720e75de.tar.bz2
boost-71d216b90256936a9638f325af9bc69d720e75de.zip
Imported Upstream version 1.59.0
Change-Id: I2dde00f4eca71df3eea9d251dcaecde18a6c90a5 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/log/utility/manipulators/to_log.hpp')
-rw-r--r--boost/log/utility/manipulators/to_log.hpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/boost/log/utility/manipulators/to_log.hpp b/boost/log/utility/manipulators/to_log.hpp
index 20ea2c261d..9186616903 100644
--- a/boost/log/utility/manipulators/to_log.hpp
+++ b/boost/log/utility/manipulators/to_log.hpp
@@ -16,8 +16,9 @@
#define BOOST_LOG_UTILITY_MANIPULATORS_TO_LOG_HPP_INCLUDED_
#include <iosfwd>
-#include <boost/mpl/bool.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/log/detail/config.hpp>
+#include <boost/log/detail/is_ostream.hpp>
#include <boost/log/utility/formatting_ostream_fwd.hpp>
#include <boost/log/detail/header.hpp>
@@ -46,34 +47,27 @@ private:
value_type const& m_value;
public:
- explicit to_log_manip(value_type const& value) : m_value(value) {}
- to_log_manip(to_log_manip const& that) : m_value(that.m_value) {}
+ explicit to_log_manip(value_type const& value) BOOST_NOEXCEPT : m_value(value) {}
+ to_log_manip(to_log_manip const& that) BOOST_NOEXCEPT : m_value(that.m_value) {}
- value_type const& get() const { return m_value; }
+ value_type const& get() const BOOST_NOEXCEPT { return m_value; }
};
-template< typename CharT, typename TraitsT, typename T, typename TagT >
-inline std::basic_ostream< CharT, TraitsT >& operator<< (std::basic_ostream< CharT, TraitsT >& strm, to_log_manip< T, TagT > manip)
-{
- strm << manip.get();
- return strm;
-}
-
-template< typename CharT, typename TraitsT, typename AllocatorT, typename T, typename TagT >
-inline basic_formatting_ostream< CharT, TraitsT, AllocatorT >& operator<< (basic_formatting_ostream< CharT, TraitsT, AllocatorT >& strm, to_log_manip< T, TagT > manip)
+template< typename StreamT, typename T, typename TagT >
+inline typename enable_if_c< log::aux::is_ostream< StreamT >::value, StreamT& >::type operator<< (StreamT& strm, to_log_manip< T, TagT > manip)
{
strm << manip.get();
return strm;
}
template< typename T >
-inline to_log_manip< T > to_log(T const& value)
+inline to_log_manip< T > to_log(T const& value) BOOST_NOEXCEPT
{
return to_log_manip< T >(value);
}
template< typename TagT, typename T >
-inline to_log_manip< T, TagT > to_log(T const& value)
+inline to_log_manip< T, TagT > to_log(T const& value) BOOST_NOEXCEPT
{
return to_log_manip< T, TagT >(value);
}