]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /* |
2 | * Copyright Andrey Semashev 2007 - 2015. | |
3 | * Distributed under the Boost Software License, Version 1.0. | |
4 | * (See accompanying file LICENSE_1_0.txt or copy at | |
5 | * http://www.boost.org/LICENSE_1_0.txt) | |
6 | */ | |
7 | /*! | |
8 | * \file is_ostream.hpp | |
9 | * \author Andrey Semashev | |
10 | * \date 05.07.2015 | |
11 | * | |
12 | * \brief This header is the Boost.Log library implementation, see the library documentation | |
13 | * at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html. In this file | |
14 | * internal configuration macros are defined. | |
15 | */ | |
16 | ||
17 | #ifndef BOOST_LOG_DETAIL_IS_OSTREAM_HPP_INCLUDED_ | |
18 | #define BOOST_LOG_DETAIL_IS_OSTREAM_HPP_INCLUDED_ | |
19 | ||
20 | #include <iosfwd> | |
21 | #include <boost/type_traits/is_base_of.hpp> | |
22 | #include <boost/type_traits/has_left_shift.hpp> | |
23 | #include <boost/log/detail/config.hpp> | |
24 | #include <boost/log/utility/formatting_ostream_fwd.hpp> | |
25 | #include <boost/log/detail/header.hpp> | |
26 | ||
27 | #ifdef BOOST_HAS_PRAGMA_ONCE | |
28 | #pragma once | |
29 | #endif | |
30 | ||
31 | namespace boost { | |
32 | ||
33 | BOOST_LOG_OPEN_NAMESPACE | |
34 | ||
35 | namespace aux { | |
36 | ||
37 | template< typename T > | |
38 | struct is_ostream | |
39 | { | |
40 | static BOOST_CONSTEXPR_OR_CONST bool value = is_base_of< std::ios_base, T >::value && has_left_shift< T, int >::value; | |
41 | }; | |
42 | ||
43 | template< typename CharT, typename TraitsT, typename AllocatorT > | |
44 | struct is_ostream< basic_formatting_ostream< CharT, TraitsT, AllocatorT > > | |
45 | { | |
46 | static BOOST_CONSTEXPR_OR_CONST bool value = true; | |
47 | }; | |
48 | ||
49 | } // namespace aux | |
50 | ||
51 | BOOST_LOG_CLOSE_NAMESPACE // namespace log | |
52 | ||
53 | } // namespace boost | |
54 | ||
55 | #include <boost/log/detail/footer.hpp> | |
56 | ||
57 | #endif // BOOST_LOG_DETAIL_IS_OSTREAM_HPP_INCLUDED_ |