comparison DEPENDENCIES/generic/include/boost/log/utility/functional/nop.hpp @ 16:2665513ce2d3

Add boost headers
author Chris Cannam
date Tue, 05 Aug 2014 11:11:38 +0100
parents
children c530137014c0
comparison
equal deleted inserted replaced
15:663ca0da4350 16:2665513ce2d3
1 /*
2 * Copyright Andrey Semashev 2007 - 2013.
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 nop.hpp
9 * \author Andrey Semashev
10 * \date 30.03.2008
11 *
12 * This header contains a function object that does nothing.
13 */
14
15 #ifndef BOOST_LOG_UTILITY_FUNCTIONAL_NOP_HPP_INCLUDED_
16 #define BOOST_LOG_UTILITY_FUNCTIONAL_NOP_HPP_INCLUDED_
17
18 #include <boost/log/detail/config.hpp>
19 #include <boost/log/detail/header.hpp>
20
21 #ifdef BOOST_HAS_PRAGMA_ONCE
22 #pragma once
23 #endif
24
25 namespace boost {
26
27 BOOST_LOG_OPEN_NAMESPACE
28
29 //! The function object that does nothing
30 struct nop
31 {
32 typedef void result_type;
33
34 void operator() () const BOOST_NOEXCEPT {}
35
36 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
37 template< typename... ArgsT >
38 void operator() (ArgsT const&...) const BOOST_NOEXCEPT {}
39 #else
40 template< typename T >
41 void operator() (T const&) const BOOST_NOEXCEPT {}
42 template< typename T1, typename T2 >
43 void operator() (T1 const&, T2 const&) const BOOST_NOEXCEPT {}
44 template< typename T1, typename T2, typename T3 >
45 void operator() (T1 const&, T2 const&, T3 const&) const BOOST_NOEXCEPT {}
46 #endif
47 };
48
49 BOOST_LOG_CLOSE_NAMESPACE // namespace log
50
51 } // namespace boost
52
53 #include <boost/log/detail/footer.hpp>
54
55 #endif // BOOST_LOG_UTILITY_FUNCTIONAL_NOP_HPP_INCLUDED_