Add conditional compilation to support boost < 1.37

This commit is contained in:
Sergey Popov 2011-06-20 20:34:33 +00:00
parent 47d6e3b0a5
commit 88bed58f48

View file

@ -1,5 +1,6 @@
#include <boost/bind.hpp>
#include <boost/cstdint.hpp>
#include <boost/version.hpp>
#include <iostream>
#include "network_asio.hpp"
#include "serialization/parser.hpp"
@ -116,7 +117,11 @@ std::size_t connection::is_read_complete(
is.read(data_size.binary, 4);
bytes_to_read_ = ntohl(data_size.num) + 4;
}
#if BOOST_VERSION >= 103700
return bytes_to_read_.get() - bytes_transferred;
#else
return bytes_to_read_.get() == bytes_transferred;
#endif
}
}