placeholders.hpp
Go to the documentation of this file.
00001 //
00002 // placeholders.hpp
00003 // ~~~~~~~~~~~~~~~~
00004 //
00005 // Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
00006 //
00007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
00008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00009 //
00010 
00011 #ifndef ASIO_PLACEHOLDERS_HPP
00012 #define ASIO_PLACEHOLDERS_HPP
00013 
00014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
00015 # pragma once
00016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
00017 
00018 #include "asio/detail/push_options.hpp"
00019 
00020 #include "asio/detail/push_options.hpp"
00021 #include <boost/bind/arg.hpp>
00022 #include <boost/detail/workaround.hpp>
00023 #include "asio/detail/pop_options.hpp"
00024 
00025 namespace asio {
00026 namespace placeholders {
00027 
00028 #if defined(GENERATING_DOCUMENTATION)
00029 
00032 unspecified error;
00033 
00038 unspecified bytes_transferred;
00039 
00043 unspecified iterator;
00044 
00045 #elif defined(__BORLANDC__) || defined(__GNUC__)
00046 
00047 inline boost::arg<1> error()
00048 {
00049   return boost::arg<1>();
00050 }
00051 
00052 inline boost::arg<2> bytes_transferred()
00053 {
00054   return boost::arg<2>();
00055 }
00056 
00057 inline boost::arg<2> iterator()
00058 {
00059   return boost::arg<2>();
00060 }
00061 
00062 #else
00063 
00064 namespace detail
00065 {
00066   template <int Number>
00067   struct placeholder
00068   {
00069     static boost::arg<Number>& get()
00070     {
00071       static boost::arg<Number> result;
00072       return result;
00073     }
00074   };
00075 }
00076 
00077 #if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
00078 
00079 static boost::arg<1>& error
00080   = asio::placeholders::detail::placeholder<1>::get();
00081 static boost::arg<2>& bytes_transferred
00082   = asio::placeholders::detail::placeholder<2>::get();
00083 static boost::arg<2>& iterator
00084   = asio::placeholders::detail::placeholder<2>::get();
00085 
00086 #else
00087 
00088 namespace
00089 {
00090   boost::arg<1>& error
00091     = asio::placeholders::detail::placeholder<1>::get();
00092   boost::arg<2>& bytes_transferred
00093     = asio::placeholders::detail::placeholder<2>::get();
00094   boost::arg<2>& iterator
00095     = asio::placeholders::detail::placeholder<2>::get();
00096 } // namespace
00097 
00098 #endif
00099 
00100 #endif
00101 
00102 } // namespace placeholders
00103 } // namespace asio
00104 
00105 #include "asio/detail/pop_options.hpp"
00106 
00107 #endif // ASIO_PLACEHOLDERS_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:39