]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/process/detail/handler_base.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / process / detail / handler_base.hpp
1 // Copyright (c) 2006, 2007 Julio M. Merino Vidal
2 // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
3 // Copyright (c) 2009 Boris Schaeling
4 // Copyright (c) 2010 Felipe Tanus, Boris Schaeling
5 // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
6 // Copyright (c) 2016 Klemens D. Morgenstern
7 //
8 // Distributed under the Boost Software License, Version 1.0. (See accompanying
9 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
10
11 #ifndef BOOST_PROCESS_DETAIL_HANDLER_BASE_HPP
12 #define BOOST_PROCESS_DETAIL_HANDLER_BASE_HPP
13
14 #include <system_error>
15
16 namespace boost { namespace process { namespace detail {
17
18 template<template <class> class Template>
19 struct make_handler_t
20 {
21 constexpr make_handler_t() {}
22 template<typename Handler>
23 constexpr Template<Handler> operator()(Handler handler) const {return Template<Handler>(handler);}
24 template<typename Handler>
25 constexpr Template<Handler> operator= (Handler handler) const {return Template<Handler>(handler);}
26 template<typename Handler>
27 constexpr Template<Handler> operator+=(Handler handler) const {return Template<Handler>(handler);}
28 };
29
30
31 struct handler_base
32 {
33 using resource_type = void;
34
35 template <class Executor>
36 void on_setup(Executor&) const {}
37
38 template <class Executor>
39 void on_error(Executor&, const std::error_code &) const {}
40
41 template <class Executor>
42 void on_success(Executor&) const {}
43
44 };
45
46
47 }}}
48
49 #endif