Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:39:23

0001 /*
0002  *          Copyright Andrey Semashev 2007 - 2021.
0003  * Distributed under the Boost Software License, Version 1.0.
0004  *    (See accompanying file LICENSE_1_0.txt or copy at
0005  *          http://www.boost.org/LICENSE_1_0.txt)
0006  */
0007 /*!
0008  * \file   is_debugger_present.hpp
0009  * \author Andrey Semashev
0010  * \date   05.12.2012
0011  *
0012  * The header contains implementation of the \c is_debugger_present predicate in template expressions.
0013  */
0014 
0015 #ifndef BOOST_LOG_EXPRESSIONS_PREDICATES_IS_DEBUGGER_PRESENT_HPP_INCLUDED_
0016 #define BOOST_LOG_EXPRESSIONS_PREDICATES_IS_DEBUGGER_PRESENT_HPP_INCLUDED_
0017 
0018 #include <boost/log/detail/config.hpp>
0019 
0020 #ifdef BOOST_HAS_PRAGMA_ONCE
0021 #pragma once
0022 #endif
0023 
0024 #if defined(BOOST_WINDOWS)
0025 
0026 #include <boost/phoenix/core/terminal.hpp> // this is needed to be able to include this header alone, Boost.Phoenix blows up without it
0027 #include <boost/phoenix/function/adapt_callable.hpp>
0028 #include <boost/log/detail/header.hpp>
0029 
0030 namespace boost {
0031 
0032 BOOST_LOG_OPEN_NAMESPACE
0033 
0034 namespace expressions {
0035 
0036 namespace aux {
0037 
0038 struct is_debugger_present
0039 {
0040     typedef bool result_type;
0041 
0042     BOOST_LOG_API result_type operator() () const;
0043 };
0044 
0045 } // namespace aux
0046 
0047 #ifndef BOOST_LOG_DOXYGEN_PASS
0048 
0049 BOOST_PHOENIX_ADAPT_CALLABLE_NULLARY(is_debugger_present, aux::is_debugger_present)
0050 
0051 #else
0052 
0053 /*!
0054  * The function generates a filter that will check whether the logger is attached to the process
0055  */
0056 unspecified is_debugger_present();
0057 
0058 #endif
0059 
0060 } // namespace expressions
0061 
0062 BOOST_LOG_CLOSE_NAMESPACE // namespace log
0063 
0064 } // namespace boost
0065 
0066 #include <boost/log/detail/footer.hpp>
0067 
0068 #endif // BOOST_WINDOWS
0069 
0070 #endif // BOOST_LOG_EXPRESSIONS_PREDICATES_IS_DEBUGGER_PRESENT_HPP_INCLUDED_