Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clang compatibility patch

this patch fixes some issues with some clang versions
  • Loading branch information...
commit f996575ca47eff13ccc8ab7745bfa6c49f6466e9 1 parent 7afa31a
Dominik Charousset Neverlord authored
17 cppa/behavior.hpp
View
@@ -81,8 +81,11 @@ class behavior {
template<typename F>
behavior(util::duration d, F f);
- template<typename... Cases, typename... Ts>
- behavior(const match_expr<Cases...>& arg, const Ts&... args);
+ template<typename... Cases>
+ behavior(const match_expr<Cases...>& arg);
+
+ template<typename... Cases, typename T, typename... Ts>
+ behavior(const match_expr<Cases...>& arg0, const T& arg1, const Ts&... args);
/**
* @brief Invokes the timeout callback.
@@ -140,9 +143,13 @@ template<typename F>
behavior::behavior(util::duration d, F f)
: m_impl(detail::new_default_behavior_impl(detail::dummy_match_expr{}, d, f)) { }
-template<typename... Cases, typename... Ts>
-behavior::behavior(const match_expr<Cases...>& arg, const Ts&... args)
-: m_impl(detail::match_expr_concat(arg, args...)) { }
+template<typename... Cases>
+behavior::behavior(const match_expr<Cases...>& arg)
+: m_impl(arg.as_behavior_impl()) { }
+
+template<typename... Cases, typename T, typename... Ts>
+behavior::behavior(const match_expr<Cases...>& arg0, const T& arg1, const Ts&... args)
+: m_impl(detail::match_expr_concat(arg0, arg1, args...)) { }
inline behavior::behavior(impl_ptr ptr) : m_impl(std::move(ptr)) { }
17 cppa/partial_function.hpp
View
@@ -79,8 +79,11 @@ class partial_function {
partial_function& operator=(partial_function&&) = default;
partial_function& operator=(const partial_function&) = default;
- template<typename... Cs, typename... Ts>
- partial_function(const match_expr<Cs...>& mexpr, const Ts&... args);
+ template<typename... Cs>
+ partial_function(const match_expr<Cs...>& arg);
+
+ template<typename... Cs, typename T, typename... Ts>
+ partial_function(const match_expr<Cs...>& arg0, const T& arg1, const Ts&... args);
/**
* @brief Returns @p true if this partial function is defined for the
@@ -141,9 +144,13 @@ match_expr_convert(const T0& arg0, const T1& arg1, const Ts&... args) {
* inline and template member function implementations *
******************************************************************************/
-template<typename... Cs, typename... Ts>
-partial_function::partial_function(const match_expr<Cs...>& arg, const Ts&... args)
-: m_impl(detail::match_expr_concat(arg, args...)) { }
+template<typename... Cs>
+partial_function::partial_function(const match_expr<Cs...>& arg)
+: m_impl(arg.as_behavior_impl()) { }
+
+template<typename... Cs, typename T, typename... Ts>
+partial_function::partial_function(const match_expr<Cs...>& arg0, const T& arg1, const Ts&... args)
+: m_impl(detail::match_expr_concat(arg0, arg1, args...)) { }
inline bool partial_function::defined_at(const any_tuple& value) {
return (m_impl) && m_impl->defined_at(value);
4 cppa/stacked.hpp
View
@@ -97,11 +97,11 @@ class stacked : public Base {
stacked(std::function<void()> fun, Ts&&... args)
: Base(std::forward<Ts>(args)...), m_behavior(std::move(fun)) { }
- void do_become(behavior&& bhvr, bool discard_old) override {
+ virtual void do_become(behavior&& bhvr, bool discard_old) override {
become_impl(std::move(bhvr), discard_old, message_id());
}
- void become_waiting_for(behavior bhvr, message_id mid) override {
+ virtual void become_waiting_for(behavior bhvr, message_id mid) override {
become_impl(std::move(bhvr), false, mid);
}
2  cppa/threaded.hpp
View
@@ -108,7 +108,7 @@ class threaded : public Base {
typedef threaded combined_type;
- void enqueue(const message_header& hdr, any_tuple msg) override {
+ virtual void enqueue(const message_header& hdr, any_tuple msg) override {
auto ptr = this->new_mailbox_element(hdr, std::move(msg));
if (!push_back(ptr) && hdr.id.valid()) {
detail::sync_request_bouncer f{this->exit_reason()};
Please sign in to comment.
Something went wrong with that request. Please try again.