Socket: Add boost::disable_if conditions to ClientSocketHandle::read members for...
g0dil [Mon, 23 Jul 2007 14:13:11 +0000 (14:13 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@339 270642c3-0616-0410-b53a-bc976706d245

Socket/ClientSocketHandle.cti
Socket/ClientSocketHandle.hh

index b3c1240..9650880 100644 (file)
@@ -141,7 +141,9 @@ senf::ClientSocketHandle<Policy>::operator=(ClientSocketHandle<OtherPolicy> othe
 template <class Policy>
 template <class ForwardWritableRange>
 prefix_ typename boost::range_iterator<ForwardWritableRange>::type
-senf::ClientSocketHandle<Policy>::read(ForwardWritableRange const & range)
+senf::ClientSocketHandle<Policy>::
+read(ForwardWritableRange const & range,
+     typename boost::disable_if< boost::is_convertible<ForwardWritableRange,unsigned> >::type *)
 {
     return detail::ReadRange< 
         ClientSocketHandle<Policy>, 
@@ -155,7 +157,9 @@ senf::ClientSocketHandle<Policy>::read(ForwardWritableRange const & range)
 template <class Policy>
 template <class ForwardWritableRange>
 prefix_ typename boost::range_iterator<ForwardWritableRange>::type
-senf::ClientSocketHandle<Policy>::read(ForwardWritableRange & range)
+senf::ClientSocketHandle<Policy>::
+read(ForwardWritableRange & range,
+     typename boost::disable_if< boost::is_convertible<ForwardWritableRange,unsigned> >::type *)
 {
     return detail::ReadRange< 
         ClientSocketHandle<Policy>, 
index 07f2069..befb826 100644 (file)
@@ -30,6 +30,8 @@
 // Custom includes
 #include <boost/call_traits.hpp>
 #include <boost/range.hpp>
+#include <boost/utility.hpp>
+#include <boost/type_traits.hpp>
 #include "SocketHandle.hh"
 
 //#include "ClientSocketHandle.mpp"
@@ -173,7 +175,8 @@ namespace senf {
         std::string  read         (unsigned limit=0);
         template <class ForwardWritableRange>
         typename boost::range_iterator<ForwardWritableRange>::type
-                     read         (ForwardWritableRange const & range);
+                     read         (ForwardWritableRange const & range,
+                                   typename boost::disable_if< boost::is_convertible<ForwardWritableRange,unsigned> >::type * = 0);
                                         ///< Read data into range
                                         /**< Read data into the given range. At most
                                              <tt>boost::size(range)</tt> characters are read. The
@@ -188,7 +191,8 @@ namespace senf {
                                                   <a href="http://www.boost.org/libs/range/index.html">Boost.Range</a> */
         template <class ForwardWritableRange>
         typename boost::range_iterator<ForwardWritableRange>::type
-                     read         (ForwardWritableRange & range);
+                     read         (ForwardWritableRange & range,
+                                   typename boost::disable_if< boost::is_convertible<ForwardWritableRange,unsigned> >::type * = 0);
                                         ///< Read data into range
                                         /**< \see read(ForwardWritableRange const &) \n
                                                   read() \n