Commit 807b07fc authored by Dominik Charousset's avatar Dominik Charousset

Rename or remove any identifier called `interface`

This fixes an issue on Windows where `interface` is an alias for `struct`.
parent 068470bb
...@@ -76,11 +76,6 @@ class typed_actor ...@@ -76,11 +76,6 @@ class typed_actor
*/ */
using base = typed_event_based_actor<Rs...>; using base = typed_event_based_actor<Rs...>;
/**
* Stores the interface of the actor as type list.
*/
using interface = detail::type_list<Rs...>;
typed_actor() = default; typed_actor() = default;
typed_actor(typed_actor&&) = default; typed_actor(typed_actor&&) = default;
typed_actor(const typed_actor&) = default; typed_actor(const typed_actor&) = default;
...@@ -130,7 +125,7 @@ class typed_actor ...@@ -130,7 +125,7 @@ class typed_actor
return m_ptr ? 1 : 0; return m_ptr ? 1 : 0;
} }
static std::set<std::string> get_message_types() { static std::set<std::string> message_types() {
return {detail::to_uniform_name<Rs>()...}; return {detail::to_uniform_name<Rs>()...};
} }
...@@ -152,13 +147,13 @@ class typed_actor ...@@ -152,13 +147,13 @@ class typed_actor
template <class... OtherRs> template <class... OtherRs>
inline void set(const typed_actor<OtherRs...>& other) { inline void set(const typed_actor<OtherRs...>& other) {
check_signatures<interface, detail::type_list<OtherRs...>>(); check_signatures<detail::type_list<Rs...>, detail::type_list<OtherRs...>>();
m_ptr = other.m_ptr; m_ptr = other.m_ptr;
} }
template <class Impl> template <class Impl>
inline void set(intrusive_ptr<Impl>& other) { inline void set(intrusive_ptr<Impl>& other) {
check_signatures<interface, typename Impl::signatures>(); check_signatures<detail::type_list<Rs...>, typename Impl::signatures>();
m_ptr = std::move(other); m_ptr = std::move(other);
} }
......
...@@ -143,8 +143,8 @@ std::string get_root_uuid() { ...@@ -143,8 +143,8 @@ std::string get_root_uuid() {
}; };
// iterate through interfaces. // iterate through interfaces.
auto ifr = ifc.ifc_req; auto ifr = ifc.ifc_req;
size_t num_interfaces = ifc.ifc_len / sizeof(ifreq); size_t num_ifs = ifc.ifc_len / sizeof(ifreq);
for (size_t i = 0; i < num_interfaces; i++) { for (size_t i = 0; i < num_ifs; i++) {
auto& item = ifr[i]; auto& item = ifr[i];
// get MAC address // get MAC address
if (ioctl(sck, SIOCGIFHWADDR, &item) < 0) { if (ioctl(sck, SIOCGIFHWADDR, &item) < 0) {
......
...@@ -35,12 +35,12 @@ namespace io { ...@@ -35,12 +35,12 @@ namespace io {
template <class List> template <class List>
struct typed_remote_actor_helper; struct typed_remote_actor_helper;
template <class... Ts> template <template <class...> class List, class... Ts>
struct typed_remote_actor_helper<detail::type_list<Ts...>> { struct typed_remote_actor_helper<List<Ts...>> {
using return_type = typed_actor<Ts...>; using return_type = typed_actor<Ts...>;
template <class... Vs> template <class... Vs>
return_type operator()(Vs&&... vs) { return_type operator()(Vs&&... vs) {
auto iface = return_type::get_message_types(); auto iface = return_type::message_types();
auto tmp = remote_actor_impl(std::forward<Vs>(vs)..., std::move(iface)); auto tmp = remote_actor_impl(std::forward<Vs>(vs)..., std::move(iface));
return actor_cast<return_type>(tmp); return actor_cast<return_type>(tmp);
} }
......
...@@ -56,7 +56,7 @@ void run_client(const char* host, uint16_t port) { ...@@ -56,7 +56,7 @@ void run_client(const char* host, uint16_t port) {
cerr << "unexpected: " << e.what() << endl; cerr << "unexpected: " << e.what() << endl;
} }
CAF_CHECKPOINT(); CAF_CHECKPOINT();
auto serv = io::typed_remote_actor<server_type::interface>(host, port); auto serv = io::typed_remote_actor<server_type>(host, port);
CAF_CHECKPOINT(); CAF_CHECKPOINT();
scoped_actor self; scoped_actor self;
self->sync_send(serv, ping{42}) self->sync_send(serv, ping{42})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment