Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*
0002  *          Copyright Andrey Semashev 2007 - 2015.
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   nop.hpp
0009  * \author Andrey Semashev
0010  * \date   30.03.2008
0011  *
0012  * This header contains a function object that does nothing.
0013  */
0014 
0015 #ifndef BOOST_LOG_UTILITY_FUNCTIONAL_NOP_HPP_INCLUDED_
0016 #define BOOST_LOG_UTILITY_FUNCTIONAL_NOP_HPP_INCLUDED_
0017 
0018 #include <boost/log/detail/config.hpp>
0019 #include <boost/log/detail/header.hpp>
0020 
0021 #ifdef BOOST_HAS_PRAGMA_ONCE
0022 #pragma once
0023 #endif
0024 
0025 namespace boost {
0026 
0027 BOOST_LOG_OPEN_NAMESPACE
0028 
0029 //! The function object that does nothing
0030 struct nop
0031 {
0032     typedef void result_type;
0033 
0034     void operator() () const BOOST_NOEXCEPT {}
0035 
0036 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
0037     template< typename... ArgsT >
0038     void operator() (ArgsT const&...) const BOOST_NOEXCEPT {}
0039 #else
0040     template< typename T >
0041     void operator() (T const&) const BOOST_NOEXCEPT {}
0042     template< typename T1, typename T2 >
0043     void operator() (T1 const&, T2 const&) const BOOST_NOEXCEPT {}
0044     template< typename T1, typename T2, typename T3 >
0045     void operator() (T1 const&, T2 const&, T3 const&) const BOOST_NOEXCEPT {}
0046 #endif
0047 };
0048 
0049 BOOST_LOG_CLOSE_NAMESPACE // namespace log
0050 
0051 } // namespace boost
0052 
0053 #include <boost/log/detail/footer.hpp>
0054 
0055 #endif // BOOST_LOG_UTILITY_FUNCTIONAL_NOP_HPP_INCLUDED_