Ticket #2372: boost_asio.patch

File boost_asio.patch, 1.2 KB (added by Nicola Musatti, 14 years ago)
  • read_until.hpp

     
    3030#include <boost/asio/basic_streambuf.hpp>
    3131#include <boost/asio/error.hpp>
    3232
     33#include <boost/detail/workaround.hpp>
     34
    3335namespace boost {
    3436namespace asio {
    3537
    3638namespace detail
    3739{
     40#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
    3841  template <typename T>
    3942  struct has_result_type
    4043  {
     44    template <typename U> struct inner
     45    {
     46        struct big { char a[100]; };
     47        static big helper(U, ...);
     48        static char helper(U, typename U::result_type* = 0);
     49    };
     50    static const T& ref();
     51    enum { value = (sizeof((inner<const T&>::helper)((ref)())) == 1) };
     52  };
     53#else
     54  template <typename T>
     55  struct has_result_type
     56  {
    4157    struct big { char a[100]; };
    4258    template <typename U> static big helper(U, ...);
    4359    template <typename U> static char helper(U, typename U::result_type* = 0);
    4460    static const T& ref();
    4561    enum { value = (sizeof((helper)((ref)())) == 1) };
    4662  };
     63#endif
    4764} // namespace detail
    4865
    4966/// Type trait used to determine whether a type can be used as a match condition