You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2017/11/20 12:59:18 UTC
mesos git commit: Revert "Added safe downcasts for Socket.".
Repository: mesos
Updated Branches:
refs/heads/master 477e2f5f2 -> c5a9ef774
Revert "Added safe downcasts for Socket.".
This reverts commit e8d47e6034d556c2bc9e7aea509b5b497850263d.
This change does not compile with clang:
"error: deleted definition must be first declaration".
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c5a9ef77
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c5a9ef77
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c5a9ef77
Branch: refs/heads/master
Commit: c5a9ef7741421fc68c32cd2d9efd8db0bdce8f5c
Parents: 477e2f5
Author: Alexander Rukletsov <al...@apache.org>
Authored: Mon Nov 20 12:24:05 2017 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Mon Nov 20 12:24:29 2017 +0100
----------------------------------------------------------------------
3rdparty/libprocess/include/process/socket.hpp | 34 ++-------------------
1 file changed, 2 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/c5a9ef77/3rdparty/libprocess/include/process/socket.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/socket.hpp b/3rdparty/libprocess/include/process/socket.hpp
index 9a65511..ae6154d 100644
--- a/3rdparty/libprocess/include/process/socket.hpp
+++ b/3rdparty/libprocess/include/process/socket.hpp
@@ -410,17 +410,13 @@ public:
return impl->shutdown(how);
}
- // Support implicit "up" conversion of any `Socket<AddressType>` to
- // a `Socket<network::Address>`.
+ // Support implicit conversion of any `Socket<AddressType>` to a
+ // `Socket<network::Address>`.
operator Socket<network::Address>() const
{
return Socket<network::Address>(impl);
}
- // Support implicit "down" conversion to a `Try` for safety.
- template <typename T>
- operator Try<Socket<T>>() const;
-
private:
// Necessary to support the implicit conversion operator from any
// `Socket<AddressType>` to `Socket<network::Address>`.
@@ -437,10 +433,6 @@ private:
} // namespace internal {
-// TODO(benh): Add std::hash overload for Socket and then remove the
-// automatic conversion to int that Socket has above.
-
-
using Socket = network::internal::Socket<network::Address>;
namespace inet {
@@ -475,18 +467,6 @@ inline Try<Socket<network::Address>> Socket<network::Address>::create(
template <>
-template <typename T>
-Socket<network::Address>::operator Try<Socket<T>>() const
-{
- Try<T> t = convert<T>(address());
- if (t.isError()) {
- return Error("Could not convert address: " + t.error());
- }
- return Socket<T>(impl);
-}
-
-
-template <>
inline Try<Socket<inet::Address>> Socket<inet::Address>::create(
SocketImpl::Kind kind)
{
@@ -507,11 +487,6 @@ Try<Socket<inet::Address>> Socket<inet::Address>::create(
SocketImpl::Kind kind) = delete;
-template <>
-template <typename T>
-Socket<inet::Address>::operator Try<Socket<T>>() const = delete;
-
-
#ifndef __WINDOWS__
template <>
inline Try<Socket<unix::Address>> Socket<unix::Address>::create(
@@ -530,11 +505,6 @@ template <>
Try<Socket<unix::Address>> Socket<unix::Address>::create(
Address::Family family,
SocketImpl::Kind kind) = delete;
-
-
-template <>
-template <typename T>
-Socket<unix::Address>::operator Try<Socket<T>>() const = delete;
#endif // __WINDOWS__
} // namespace internal {