]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/log/include/boost/log/utility/functional/nop.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / log / include / boost / log / utility / functional / nop.hpp
CommitLineData
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 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
25namespace boost {
26
27BOOST_LOG_OPEN_NAMESPACE
28
29//! The function object that does nothing
30struct 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
49BOOST_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_