Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:09

0001 // Copyright (c) 2006, 2007 Julio M. Merino Vidal
0002 // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
0003 // Copyright (c) 2009 Boris Schaeling
0004 // Copyright (c) 2010 Felipe Tanus, Boris Schaeling
0005 // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
0006 // Copyright (c) 2016 Klemens D. Morgenstern
0007 //
0008 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0009 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0010 
0011 #ifndef BOOST_PROCESS_DETAIL_HANDLER_BASE_HPP
0012 #define BOOST_PROCESS_DETAIL_HANDLER_BASE_HPP
0013 
0014 #include <system_error>
0015 
0016 namespace boost { namespace process { namespace detail {
0017 
0018 template<template <class> class Template>
0019 struct make_handler_t
0020 {
0021     constexpr make_handler_t() {}
0022     template<typename Handler>
0023     constexpr Template<Handler> operator()(Handler handler) const {return Template<Handler>(handler);}
0024     template<typename Handler>
0025     constexpr Template<Handler> operator= (Handler handler) const {return Template<Handler>(handler);}
0026     template<typename Handler>
0027     constexpr Template<Handler> operator+=(Handler handler) const {return Template<Handler>(handler);}
0028 };
0029 
0030 
0031 struct handler_base
0032 {
0033     using resource_type = void;
0034 
0035     template <class Executor>
0036     void on_setup(Executor&) const {}
0037 
0038     template <class Executor>
0039     void on_error(Executor&, const std::error_code &) const {}
0040 
0041     template <class Executor>
0042     void on_success(Executor&) const {}
0043 
0044 };
0045 
0046 
0047 }}}
0048 
0049 #endif