// // handler_type.hpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_HANDLER_TYPE_HPP #define BOOST_ASIO_HANDLER_TYPE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include #include namespace boost { namespace asio { /// Default handler type traits provided for all handlers. /** * The handler_type traits class is used for determining the concrete handler * type to be used for an asynchronous operation. It allows the handler type to * be determined at the point where the specific completion handler signature * is known. * * This template may be specialised for user-defined handler types. */ template struct handler_type { /// The handler type for the specific signature. typedef Handler type; }; #if !defined(GENERATING_DOCUMENTATION) template struct handler_type : handler_type {}; template struct handler_type : handler_type {}; template struct handler_type : handler_type {}; template struct handler_type : handler_type {}; template struct handler_type : handler_type {}; template struct handler_type : handler_type {}; template struct handler_type : handler_type {}; #if defined(BOOST_ASIO_HAS_MOVE) template struct handler_type : handler_type {}; #endif // defined(BOOST_ASIO_HAS_MOVE) template struct handler_type : handler_type {}; template struct handler_type : handler_type {}; template struct handler_type : handler_type {}; template struct handler_type : handler_type {}; template struct handler_type : handler_type {}; template struct handler_type : handler_type {}; #endif // !defined(GENERATING_DOCUMENTATION) } // namespace asio } // namespace boost #include #define BOOST_ASIO_HANDLER_TYPE(h, sig) \ typename handler_type::type #endif // BOOST_ASIO_HANDLER_TYPE_HPP