Commit bd0d7b98 authored by Dominik Charousset's avatar Dominik Charousset

Replace "typedef" with "using"

parent 870ed47e
...@@ -49,7 +49,7 @@ class execution_unit; ...@@ -49,7 +49,7 @@ class execution_unit;
* @brief A unique actor ID. * @brief A unique actor ID.
* @relates abstract_actor * @relates abstract_actor
*/ */
typedef uint32_t actor_id; using actor_id = uint32_t;
/** /**
* @brief Denotes an ID that is never used by an actor. * @brief Denotes an ID that is never used by an actor.
...@@ -60,7 +60,7 @@ class actor; ...@@ -60,7 +60,7 @@ class actor;
class abstract_actor; class abstract_actor;
class response_promise; class response_promise;
typedef intrusive_ptr<abstract_actor> abstract_actor_ptr; using abstract_actor_ptr = intrusive_ptr<abstract_actor>;
/** /**
* @brief Base class for all actor implementations. * @brief Base class for all actor implementations.
...@@ -262,8 +262,8 @@ struct functor_attachable : attachable { ...@@ -262,8 +262,8 @@ struct functor_attachable : attachable {
template<typename F> template<typename F>
bool abstract_actor::attach_functor(F&& f) { bool abstract_actor::attach_functor(F&& f) {
typedef typename detail::rm_const_and_ref<F>::type f_type; using f_type = typename detail::rm_const_and_ref<F>::type;
typedef functor_attachable<f_type> impl; using impl = functor_attachable<f_type>;
return attach(attachable_ptr{new impl(std::forward<F>(f))}); return attach(attachable_ptr{new impl(std::forward<F>(f))});
} }
......
...@@ -118,8 +118,8 @@ class abstract_group : public abstract_channel { ...@@ -118,8 +118,8 @@ class abstract_group : public abstract_channel {
}; };
typedef module* module_ptr; using module_ptr = module*;
typedef std::unique_ptr<module> unique_module_ptr; using unique_module_ptr = std::unique_ptr<module>;
virtual void serialize(serializer* sink) = 0; virtual void serialize(serializer* sink) = 0;
...@@ -160,7 +160,7 @@ class abstract_group : public abstract_channel { ...@@ -160,7 +160,7 @@ class abstract_group : public abstract_channel {
* @brief A smart pointer type that manages instances of {@link group}. * @brief A smart pointer type that manages instances of {@link group}.
* @relates group * @relates group
*/ */
typedef intrusive_ptr<abstract_group> abstract_group_ptr; using abstract_group_ptr = intrusive_ptr<abstract_group>;
} // namespace cppa } // namespace cppa
......
...@@ -30,7 +30,7 @@ class accept_handle : public io_handle<accept_handle> { ...@@ -30,7 +30,7 @@ class accept_handle : public io_handle<accept_handle> {
friend class io_handle<accept_handle>; friend class io_handle<accept_handle>;
typedef io_handle<accept_handle> super; using super = io_handle<accept_handle>;
public: public:
......
...@@ -44,13 +44,13 @@ class actor_companion : public extend<local_actor, actor_companion>:: ...@@ -44,13 +44,13 @@ class actor_companion : public extend<local_actor, actor_companion>::
with<behavior_stack_based<behavior>::impl, with<behavior_stack_based<behavior>::impl,
mixin::sync_sender<nonblocking_response_handle_tag>::impl> { mixin::sync_sender<nonblocking_response_handle_tag>::impl> {
typedef detail::shared_spinlock lock_type; using lock_type = detail::shared_spinlock;
public: public:
typedef std::unique_ptr<mailbox_element, detail::disposer> message_pointer; using message_pointer = std::unique_ptr<mailbox_element, detail::disposer>;
typedef std::function<void (message_pointer)> enqueue_handler; using enqueue_handler = std::function<void (message_pointer)>;
/** /**
* @brief Removes the handler for incoming messages and terminates * @brief Removes the handler for incoming messages and terminates
...@@ -81,7 +81,7 @@ class actor_companion : public extend<local_actor, actor_companion>:: ...@@ -81,7 +81,7 @@ class actor_companion : public extend<local_actor, actor_companion>::
* @brief A pointer to a co-existing (actor) object. * @brief A pointer to a co-existing (actor) object.
* @relates actor_companion * @relates actor_companion
*/ */
typedef intrusive_ptr<actor_companion> actor_companion_ptr; using actor_companion_ptr = intrusive_ptr<actor_companion>;
} // namespace cppa } // namespace cppa
......
...@@ -75,7 +75,7 @@ class actor_namespace { ...@@ -75,7 +75,7 @@ class actor_namespace {
/** /**
* @brief A map that stores all proxies for known remote actors. * @brief A map that stores all proxies for known remote actors.
*/ */
typedef std::map<actor_id, actor_proxy::anchor_ptr> proxy_map; using proxy_map = std::map<actor_id, actor_proxy::anchor_ptr>;
/** /**
* @brief Returns the number of proxies for @p node. * @brief Returns the number of proxies for @p node.
......
...@@ -32,7 +32,7 @@ class actor_ostream { ...@@ -32,7 +32,7 @@ class actor_ostream {
public: public:
typedef actor_ostream& (*fun_type)(actor_ostream&); using fun_type = actor_ostream& (*)(actor_ostream&);
actor_ostream(actor_ostream&&) = default; actor_ostream(actor_ostream&&) = default;
actor_ostream(const actor_ostream&) = default; actor_ostream(const actor_ostream&) = default;
......
...@@ -42,7 +42,7 @@ using actor_proxy_ptr = intrusive_ptr<actor_proxy>; ...@@ -42,7 +42,7 @@ using actor_proxy_ptr = intrusive_ptr<actor_proxy>;
*/ */
class actor_proxy : public abstract_actor { class actor_proxy : public abstract_actor {
typedef abstract_actor super; using super = abstract_actor;
public: public:
......
...@@ -143,7 +143,7 @@ std::pair<std::pair<GRes (Parent::*)() const, SRes (Parent::*)(SArg)>, ...@@ -143,7 +143,7 @@ std::pair<std::pair<GRes (Parent::*)() const, SRes (Parent::*)(SArg)>,
compound_member( compound_member(
const std::pair<GRes (Parent::*)() const, SRes (Parent::*)(SArg)>& gspair, const std::pair<GRes (Parent::*)() const, SRes (Parent::*)(SArg)>& gspair,
const Ts&... args) { const Ts&... args) {
typedef typename detail::rm_const_and_ref<GRes>::type mtype; using mtype = typename detail::rm_const_and_ref<GRes>::type;
return {gspair, new detail::default_uniform_type_info<mtype>(args...)}; return {gspair, new detail::default_uniform_type_info<mtype>(args...)};
} }
......
...@@ -81,7 +81,7 @@ class attachable { ...@@ -81,7 +81,7 @@ class attachable {
* @brief A managed {@link attachable} pointer. * @brief A managed {@link attachable} pointer.
* @relates attachable * @relates attachable
*/ */
typedef std::unique_ptr<attachable> attachable_ptr; using attachable_ptr = std::unique_ptr<attachable>;
} // namespace cppa } // namespace cppa
......
...@@ -44,11 +44,11 @@ class behavior { ...@@ -44,11 +44,11 @@ class behavior {
public: public:
typedef std::function<optional<message>(message&)> continuation_fun; using continuation_fun = std::function<optional<message>(message&)>;
/** @cond PRIVATE */ /** @cond PRIVATE */
typedef intrusive_ptr<detail::behavior_impl> impl_ptr; using impl_ptr = intrusive_ptr<detail::behavior_impl>;
inline auto as_behavior_impl() const -> const impl_ptr&; inline auto as_behavior_impl() const -> const impl_ptr&;
......
...@@ -33,8 +33,8 @@ struct is_behavior_policy : std::false_type {}; ...@@ -33,8 +33,8 @@ struct is_behavior_policy : std::false_type {};
template<bool DiscardBehavior> template<bool DiscardBehavior>
struct is_behavior_policy<behavior_policy<DiscardBehavior>> : std::true_type {}; struct is_behavior_policy<behavior_policy<DiscardBehavior>> : std::true_type {};
typedef behavior_policy<false> keep_behavior_t; using keep_behavior_t = behavior_policy<false>;
typedef behavior_policy<true> discard_behavior_t; using discard_behavior_t = behavior_policy<true>;
/** /**
* @brief Policy tag that causes {@link event_based_actor::become} to * @brief Policy tag that causes {@link event_based_actor::become} to
......
...@@ -33,22 +33,22 @@ namespace cppa { ...@@ -33,22 +33,22 @@ namespace cppa {
template<class Base, class Subtype, class BehaviorType> template<class Base, class Subtype, class BehaviorType>
class behavior_stack_based_impl : public single_timeout<Base, Subtype> { class behavior_stack_based_impl : public single_timeout<Base, Subtype> {
typedef single_timeout<Base, Subtype> super; using super = single_timeout<Base, Subtype>;
public: public:
/************************************************************************** /**************************************************************************
* typedefs and constructor * * types and constructor *
**************************************************************************/ **************************************************************************/
typedef BehaviorType behavior_type; using behavior_type = BehaviorType;
typedef behavior_stack_based_impl combined_type; using combined_type = behavior_stack_based_impl;
typedef response_handle<behavior_stack_based_impl, using response_handle_type = response_handle<
message, behavior_stack_based_impl,
nonblocking_response_handle_tag> message,
response_handle_type; nonblocking_response_handle_tag>;
template<typename... Ts> template<typename... Ts>
behavior_stack_based_impl(Ts&&... vs) : super(std::forward<Ts>(vs)...) { } behavior_stack_based_impl(Ts&&... vs) : super(std::forward<Ts>(vs)...) { }
...@@ -175,11 +175,11 @@ class behavior_stack_based { ...@@ -175,11 +175,11 @@ class behavior_stack_based {
template<class Base, class Subtype> template<class Base, class Subtype>
class impl : public behavior_stack_based_impl<Base, Subtype, BehaviorType> { class impl : public behavior_stack_based_impl<Base, Subtype, BehaviorType> {
typedef behavior_stack_based_impl<Base, Subtype, BehaviorType> super; using super = behavior_stack_based_impl<Base, Subtype, BehaviorType>;
public: public:
typedef impl combined_type; using combined_type = impl;
template<typename... Ts> template<typename... Ts>
impl(Ts&&... args) : super(std::forward<Ts>(args)...) { } impl(Ts&&... args) : super(std::forward<Ts>(args)...) { }
......
...@@ -29,7 +29,7 @@ namespace cppa { ...@@ -29,7 +29,7 @@ namespace cppa {
*/ */
class binary_deserializer : public deserializer { class binary_deserializer : public deserializer {
typedef deserializer super; using super = deserializer;
public: public:
......
...@@ -51,7 +51,7 @@ class blocking_actor ...@@ -51,7 +51,7 @@ class blocking_actor
/************************************************************************** /**************************************************************************
* utility stuff and receive() member function family * * utility stuff and receive() member function family *
**************************************************************************/ **************************************************************************/
typedef std::chrono::high_resolution_clock::time_point timeout_type; using timeout_type = std::chrono::high_resolution_clock::time_point;
struct receive_while_helper { struct receive_while_helper {
...@@ -250,7 +250,7 @@ class blocking_actor::functor_based : public blocking_actor { ...@@ -250,7 +250,7 @@ class blocking_actor::functor_based : public blocking_actor {
public: public:
typedef std::function<void(blocking_actor*)> act_fun; using act_fun = std::function<void(blocking_actor*)>;
template<typename F, typename... Ts> template<typename F, typename... Ts>
functor_based(F f, Ts&&... vs) { functor_based(F f, Ts&&... vs) {
......
...@@ -30,7 +30,7 @@ class connection_handle : public io_handle<connection_handle> { ...@@ -30,7 +30,7 @@ class connection_handle : public io_handle<connection_handle> {
friend class io_handle<connection_handle>; friend class io_handle<connection_handle>;
typedef io_handle<connection_handle> super; using super = io_handle<connection_handle>;
public: public:
......
...@@ -38,7 +38,7 @@ class continue_helper { ...@@ -38,7 +38,7 @@ class continue_helper {
public: public:
typedef int message_id_wrapper_tag; using message_id_wrapper_tag = int;
continue_helper(message_id mid, local_actor* self); continue_helper(message_id mid, local_actor* self);
......
...@@ -43,11 +43,11 @@ class cow_ptr : util::comparable<cow_ptr<T>>, ...@@ -43,11 +43,11 @@ class cow_ptr : util::comparable<cow_ptr<T>>,
public: public:
typedef T* pointer; using pointer = T*;
typedef const T* const_pointer; using const_pointer = const T*;
typedef T element_type; using element_type = T;
typedef T& reference; using reference = T&;
typedef const T& const_reference; using const_reference = const T&;
constexpr cow_ptr() : m_ptr() { } constexpr cow_ptr() : m_ptr() { }
......
...@@ -58,7 +58,7 @@ class cow_tuple<Head, Tail...> { ...@@ -58,7 +58,7 @@ class cow_tuple<Head, Tail...> {
public: public:
typedef detail::type_list<Head, Tail...> types; using types = detail::type_list<Head, Tail...>;
static constexpr size_t num_elements = sizeof...(Tail) + 1; static constexpr size_t num_elements = sizeof...(Tail) + 1;
...@@ -147,7 +147,7 @@ struct cow_tuple_from_type_list; ...@@ -147,7 +147,7 @@ struct cow_tuple_from_type_list;
template<typename... Ts> template<typename... Ts>
struct cow_tuple_from_type_list< detail::type_list<Ts...>> { struct cow_tuple_from_type_list< detail::type_list<Ts...>> {
typedef cow_tuple<Ts...> type; using type = cow_tuple<Ts...>;
}; };
template<typename T> template<typename T>
...@@ -166,7 +166,7 @@ struct is_cow_tuple<cow_tuple<Ts...>> { static constexpr bool value = true; }; ...@@ -166,7 +166,7 @@ struct is_cow_tuple<cow_tuple<Ts...>> { static constexpr bool value = true; };
*/ */
template<size_t N, typename... Ts> template<size_t N, typename... Ts>
const typename detail::type_at<N, Ts...>::type& get(const cow_tuple<Ts...>& tup) { const typename detail::type_at<N, Ts...>::type& get(const cow_tuple<Ts...>& tup) {
typedef typename detail::type_at<N, Ts...>::type result_type; using result_type = typename detail::type_at<N, Ts...>::type;
return *reinterpret_cast<const result_type*>(tup.at(N)); return *reinterpret_cast<const result_type*>(tup.at(N));
} }
...@@ -181,7 +181,7 @@ const typename detail::type_at<N, Ts...>::type& get(const cow_tuple<Ts...>& tup) ...@@ -181,7 +181,7 @@ const typename detail::type_at<N, Ts...>::type& get(const cow_tuple<Ts...>& tup)
*/ */
template<size_t N, typename... Ts> template<size_t N, typename... Ts>
typename detail::type_at<N, Ts...>::type& get_ref(cow_tuple<Ts...>& tup) { typename detail::type_at<N, Ts...>::type& get_ref(cow_tuple<Ts...>& tup) {
typedef typename detail::type_at<N, Ts...>::type result_type; using result_type = typename detail::type_at<N, Ts...>::type;
return *reinterpret_cast<result_type*>(tup.mutable_at(N)); return *reinterpret_cast<result_type*>(tup.mutable_at(N));
} }
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
#ifndef CPPA_CPPA_HPP #ifndef CPPA_CPPA_HPP
#define CPPA_CPPA_HPP #define CPPA_CPPA_HPP
// this header has been deprecated, forward to new header // <backward_compatibility version="0.9" whole_file="yes">
#include "cppa/all.hpp" #include "cppa/all.hpp"
// </backward_compatibility>
#endif // CPPA_CPPA_HPP #endif // CPPA_CPPA_HPP
...@@ -20,54 +20,8 @@ ...@@ -20,54 +20,8 @@
#ifndef CPPA_CPPA_FWD_HPP #ifndef CPPA_CPPA_FWD_HPP
#define CPPA_CPPA_FWD_HPP #define CPPA_CPPA_FWD_HPP
#include <cstdint> // <backward_compatibility version="0.9" whole_file="yes">
#include "cppa/fwd.hpp"
namespace cppa { // </backward_compatibility>
// classes
class actor;
class group;
class channel;
class node_id;
class behavior;
class resumable;
class message;
class actor_addr;
class actor_proxy;
class scoped_actor;
class execution_unit;
class abstract_actor;
class abstract_group;
class blocking_actor;
class message_header;
class message_handler;
class uniform_type_info;
class event_based_actor;
class primitive_variant;
// structs
struct anything;
// enums
enum primitive_type : unsigned char;
enum class atom_value : std::uint64_t;
// class templates
template<typename> class optional;
template<typename> class intrusive_ptr;
template<typename> class weak_intrusive_ptr;
// intrusive pointer typedefs
typedef intrusive_ptr<abstract_group> abstract_group_ptr;
typedef intrusive_ptr<actor_proxy> actor_proxy_ptr;
typedef intrusive_ptr<node_id> node_id_ptr;
// weak intrusive pointer typedefs
typedef weak_intrusive_ptr<actor_proxy> weak_actor_proxy_ptr;
// convenience typedefs
typedef const message_header& msg_hdr_cref;
} // namespace cppa
#endif // CPPA_CPPA_FWD_HPP #endif // CPPA_CPPA_FWD_HPP
...@@ -50,7 +50,7 @@ class actor_registry : public singleton_mixin<actor_registry> { ...@@ -50,7 +50,7 @@ class actor_registry : public singleton_mixin<actor_registry> {
* exit reason. An entry with a nullptr means the actor has finished * exit reason. An entry with a nullptr means the actor has finished
* execution for given reason. * execution for given reason.
*/ */
typedef std::pair<abstract_actor_ptr, uint32_t> value_type; using value_type = std::pair<abstract_actor_ptr, uint32_t>;
/** /**
* @brief Returns the {nullptr, invalid_exit_reason}. * @brief Returns the {nullptr, invalid_exit_reason}.
...@@ -82,7 +82,7 @@ class actor_registry : public singleton_mixin<actor_registry> { ...@@ -82,7 +82,7 @@ class actor_registry : public singleton_mixin<actor_registry> {
private: private:
typedef std::map<actor_id, value_type> entries; using entries = std::map<actor_id, value_type>;
std::atomic<size_t> m_running; std::atomic<size_t> m_running;
std::atomic<actor_id> m_ids; std::atomic<actor_id> m_ids;
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
namespace cppa { namespace cppa {
class message_handler; class message_handler;
typedef optional<message> bhvr_invoke_result; using bhvr_invoke_result = optional<message>;
} // namespace cppa } // namespace cppa
...@@ -152,7 +152,7 @@ class behavior_impl : public ref_counted { ...@@ -152,7 +152,7 @@ class behavior_impl : public ref_counted {
virtual void handle_timeout(); virtual void handle_timeout();
inline const duration& timeout() const { return m_timeout; } inline const duration& timeout() const { return m_timeout; }
typedef intrusive_ptr<behavior_impl> pointer; using pointer = intrusive_ptr<behavior_impl>;
virtual pointer copy(const generic_timeout_definition& tdef) const = 0; virtual pointer copy(const generic_timeout_definition& tdef) const = 0;
...@@ -202,7 +202,7 @@ struct dummy_match_expr { ...@@ -202,7 +202,7 @@ struct dummy_match_expr {
template<class MatchExpr, typename F> template<class MatchExpr, typename F>
class default_behavior_impl : public behavior_impl { class default_behavior_impl : public behavior_impl {
typedef behavior_impl super; using super = behavior_impl;
public: public:
...@@ -256,7 +256,7 @@ default_behavior_impl<dummy_match_expr, F>* new_default_behavior(duration d, ...@@ -256,7 +256,7 @@ default_behavior_impl<dummy_match_expr, F>* new_default_behavior(duration d,
f); f);
} }
typedef intrusive_ptr<behavior_impl> behavior_impl_ptr; using behavior_impl_ptr = intrusive_ptr<behavior_impl>;
// implemented in message_handler.cpp // implemented in message_handler.cpp
// message_handler combine(behavior_impl_ptr, behavior_impl_ptr); // message_handler combine(behavior_impl_ptr, behavior_impl_ptr);
......
...@@ -43,7 +43,7 @@ class behavior_stack { ...@@ -43,7 +43,7 @@ class behavior_stack {
behavior_stack(const behavior_stack&) = delete; behavior_stack(const behavior_stack&) = delete;
behavior_stack& operator=(const behavior_stack&) = delete; behavior_stack& operator=(const behavior_stack&) = delete;
typedef std::pair<behavior, message_id> element_type; using element_type = std::pair<behavior, message_id>;
public: public:
......
...@@ -27,19 +27,19 @@ namespace detail { ...@@ -27,19 +27,19 @@ namespace detail {
template<typename T> template<typename T>
struct boxed { struct boxed {
typedef detail::wrapped<T> type; using type = detail::wrapped<T>;
}; };
template<typename T> template<typename T>
struct boxed<detail::wrapped<T>> { struct boxed<detail::wrapped<T>> {
typedef detail::wrapped<T> type; using type = detail::wrapped<T>;
}; };
template<> template<>
struct boxed<anything> { struct boxed<anything> {
typedef anything type; using type = anything;
}; };
......
...@@ -36,17 +36,17 @@ namespace detail { ...@@ -36,17 +36,17 @@ namespace detail {
class decorated_tuple : public message_data { class decorated_tuple : public message_data {
typedef message_data super; using super = message_data;
decorated_tuple& operator=(const decorated_tuple&) = delete; decorated_tuple& operator=(const decorated_tuple&) = delete;
public: public:
typedef std::vector<size_t> vector_type; using vector_type = std::vector<size_t>;
typedef message_data::ptr pointer; using pointer = message_data::ptr;
typedef const std::type_info* rtti; using rtti = const std::type_info*;
// creates a dynamically typed subtuple from @p d with an offset // creates a dynamically typed subtuple from @p d with an offset
static inline pointer create(pointer d, vector_type v) { static inline pointer create(pointer d, vector_type v) {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
namespace cppa { namespace cppa {
namespace detail { namespace detail {
typedef uniform_type_info_ptr uniform_type_info_ptr; using uniform_type_info_ptr = uniform_type_info_ptr;
// check if there's a 'push_back' that takes a C::value_type // check if there's a 'push_back' that takes a C::value_type
template<typename T> template<typename T>
...@@ -76,11 +76,11 @@ struct is_stl_pair : std::false_type {}; ...@@ -76,11 +76,11 @@ struct is_stl_pair : std::false_type {};
template<typename F, typename S> template<typename F, typename S>
struct is_stl_pair<std::pair<F, S>> : std::true_type {}; struct is_stl_pair<std::pair<F, S>> : std::true_type {};
typedef std::integral_constant<int, 0> primitive_impl; using primitive_impl = std::integral_constant<int, 0>;
typedef std::integral_constant<int, 1> list_impl; using list_impl = std::integral_constant<int, 1>;
typedef std::integral_constant<int, 2> map_impl; using map_impl = std::integral_constant<int, 2>;
typedef std::integral_constant<int, 3> pair_impl; using pair_impl = std::integral_constant<int, 3>;
typedef std::integral_constant<int, 9> recursive_impl; using recursive_impl = std::integral_constant<int, 9>;
template<typename T> template<typename T>
constexpr int impl_id() { constexpr int impl_id() {
...@@ -95,15 +95,15 @@ constexpr int impl_id() { ...@@ -95,15 +95,15 @@ constexpr int impl_id() {
template<typename T> template<typename T>
struct deconst_pair { struct deconst_pair {
typedef T type; using type = T;
}; };
template<typename K, typename V> template<typename K, typename V>
struct deconst_pair<std::pair<K, V>> { struct deconst_pair<std::pair<K, V>> {
typedef typename std::remove_const<K>::type first_type; using first_type = typename std::remove_const<K>::type;
typedef typename std::remove_const<V>::type second_type; using second_type = typename std::remove_const<V>::type;
typedef std::pair<first_type, second_type> type; using type = std::pair<first_type, second_type>;
}; };
...@@ -165,7 +165,7 @@ class default_serialize_policy { ...@@ -165,7 +165,7 @@ class default_serialize_policy {
template<typename T> template<typename T>
void dimpl(T& storage, deserializer* d, list_impl) const { void dimpl(T& storage, deserializer* d, list_impl) const {
typedef typename T::value_type value_type; using value_type = typename T::value_type;
storage.clear(); storage.clear();
size_t size = d->begin_sequence(); size_t size = d->begin_sequence();
for (size_t i = 0; i < size; ++i) { for (size_t i = 0; i < size; ++i) {
...@@ -287,7 +287,7 @@ template<typename T, class AccessPolicy, class SerializePolicy> ...@@ -287,7 +287,7 @@ template<typename T, class AccessPolicy, class SerializePolicy>
class member_tinfo<T, AccessPolicy, SerializePolicy, true, class member_tinfo<T, AccessPolicy, SerializePolicy, true,
false> : public detail::abstract_uniform_type_info<T> { false> : public detail::abstract_uniform_type_info<T> {
typedef typename std::underlying_type<T>::type value_type; using value_type = typename std::underlying_type<T>::type;
public: public:
...@@ -349,8 +349,8 @@ class getter_setter_access_policy { ...@@ -349,8 +349,8 @@ class getter_setter_access_policy {
public: public:
typedef GRes (C::*getter)() const; using getter = GRes (C::*)() const;
typedef SRes (C::*setter)(SArg); using setter = SRes (C::*)(SArg);
getter_setter_access_policy(getter g, setter s) : m_get(g), m_set(s) {} getter_setter_access_policy(getter g, setter s) : m_get(g), m_set(s) {}
...@@ -396,25 +396,25 @@ struct fake_access_policy { ...@@ -396,25 +396,25 @@ struct fake_access_policy {
template<typename T, class C> template<typename T, class C>
uniform_type_info_ptr new_member_tinfo(T C::*memptr) { uniform_type_info_ptr new_member_tinfo(T C::*memptr) {
typedef memptr_access_policy<T, C> access_policy; using access_policy = memptr_access_policy<T, C>;
typedef member_tinfo<T, access_policy> result_type; using result_type = member_tinfo<T, access_policy>;
return uniform_type_info_ptr(new result_type(memptr)); return uniform_type_info_ptr(new result_type(memptr));
} }
template<typename T, class C> template<typename T, class C>
uniform_type_info_ptr new_member_tinfo(T C::*memptr, uniform_type_info_ptr new_member_tinfo(T C::*memptr,
uniform_type_info_ptr meminf) { uniform_type_info_ptr meminf) {
typedef memptr_access_policy<T, C> access_policy; using access_policy = memptr_access_policy<T, C>;
typedef member_tinfo<T, access_policy, forwarding_serialize_policy> tinfo; using tinfo = member_tinfo<T, access_policy, forwarding_serialize_policy>;
return uniform_type_info_ptr(new tinfo(memptr, std::move(meminf))); return uniform_type_info_ptr(new tinfo(memptr, std::move(meminf)));
} }
template<class C, typename GRes, typename SRes, typename SArg> template<class C, typename GRes, typename SRes, typename SArg>
uniform_type_info_ptr new_member_tinfo(GRes (C::*getter)() const, uniform_type_info_ptr new_member_tinfo(GRes (C::*getter)() const,
SRes (C::*setter)(SArg)) { SRes (C::*setter)(SArg)) {
typedef getter_setter_access_policy<C, GRes, SRes, SArg> access_policy; using access_policy = getter_setter_access_policy<C, GRes, SRes, SArg>;
typedef typename detail::rm_const_and_ref<GRes>::type value_type; using value_type = typename detail::rm_const_and_ref<GRes>::type;
typedef member_tinfo<value_type, access_policy> result_type; using result_type = member_tinfo<value_type, access_policy>;
return uniform_type_info_ptr( return uniform_type_info_ptr(
new result_type(access_policy(getter, setter))); new result_type(access_policy(getter, setter)));
} }
...@@ -423,10 +423,10 @@ template<class C, typename GRes, typename SRes, typename SArg> ...@@ -423,10 +423,10 @@ template<class C, typename GRes, typename SRes, typename SArg>
uniform_type_info_ptr new_member_tinfo(GRes (C::*getter)() const, uniform_type_info_ptr new_member_tinfo(GRes (C::*getter)() const,
SRes (C::*setter)(SArg), SRes (C::*setter)(SArg),
uniform_type_info_ptr meminf) { uniform_type_info_ptr meminf) {
typedef getter_setter_access_policy<C, GRes, SRes, SArg> access_policy; using access_policy = getter_setter_access_policy<C, GRes, SRes, SArg>;
typedef typename detail::rm_const_and_ref<GRes>::type value_type; using value_type = typename detail::rm_const_and_ref<GRes>::type;
typedef member_tinfo<value_type, access_policy, forwarding_serialize_policy> using tinfo = member_tinfo<value_type, access_policy,
tinfo; forwarding_serialize_policy>;
return uniform_type_info_ptr( return uniform_type_info_ptr(
new tinfo(access_policy(getter, setter), std::move(meminf))); new tinfo(access_policy(getter, setter), std::move(meminf)));
} }
...@@ -442,7 +442,7 @@ class default_uniform_type_info : public detail::abstract_uniform_type_info<T> { ...@@ -442,7 +442,7 @@ class default_uniform_type_info : public detail::abstract_uniform_type_info<T> {
} }
default_uniform_type_info() { default_uniform_type_info() {
typedef member_tinfo<T, fake_access_policy<T>> result_type; using result_type = member_tinfo<T, fake_access_policy<T>>;
m_members.push_back(uniform_type_info_ptr(new result_type)); m_members.push_back(uniform_type_info_ptr(new result_type));
} }
...@@ -535,7 +535,7 @@ class default_uniform_type_info<typed_actor< ...@@ -535,7 +535,7 @@ class default_uniform_type_info<typed_actor<
public: public:
typedef typed_actor<Rs...> handle_type; using handle_type = typed_actor<Rs...>;
default_uniform_type_info() { sub_uti = uniform_typeid<actor>(); } default_uniform_type_info() { sub_uti = uniform_typeid<actor>(); }
......
...@@ -50,8 +50,8 @@ class group_manager : public singleton_mixin<group_manager> { ...@@ -50,8 +50,8 @@ class group_manager : public singleton_mixin<group_manager> {
private: private:
typedef std::map<std::string, abstract_group::unique_module_ptr> using modules_map = std::map<std::string,
modules_map; abstract_group::unique_module_ptr>;
modules_map m_mmap; modules_map m_mmap;
std::mutex m_mmap_mtx; std::mutex m_mmap_mtx;
......
...@@ -64,8 +64,8 @@ struct ieee_754_trait<uint64_t> : ieee_754_trait<double> {}; ...@@ -64,8 +64,8 @@ struct ieee_754_trait<uint64_t> : ieee_754_trait<double> {};
template<typename T> template<typename T>
typename ieee_754_trait<T>::packed_type pack754(T f) { typename ieee_754_trait<T>::packed_type pack754(T f) {
typedef ieee_754_trait<T> trait; using trait = ieee_754_trait<T>;
typedef typename trait::packed_type result_type; using result_type = typename trait::packed_type;
// filter special type // filter special type
if (fabs(f) <= trait::zero) return 0; // only true if f equals +0 or -0 if (fabs(f) <= trait::zero) return 0; // only true if f equals +0 or -0
auto significandbits = trait::bits - trait::expbits - 1; // -1 for sign bit auto significandbits = trait::bits - trait::expbits - 1; // -1 for sign bit
...@@ -103,9 +103,9 @@ typename ieee_754_trait<T>::packed_type pack754(T f) { ...@@ -103,9 +103,9 @@ typename ieee_754_trait<T>::packed_type pack754(T f) {
template<typename T> template<typename T>
typename ieee_754_trait<T>::float_type unpack754(T i) { typename ieee_754_trait<T>::float_type unpack754(T i) {
typedef ieee_754_trait<T> trait; using trait = ieee_754_trait<T>;
typedef typename trait::signed_packed_type signed_type; using signed_type = typename trait::signed_packed_type;
typedef typename trait::float_type result_type; using result_type = typename trait::float_type;
if (i == 0) return trait::zero; if (i == 0) return trait::zero;
auto significandbits = trait::bits - trait::expbits - 1; // -1 for sign bit auto significandbits = trait::bits - trait::expbits - 1; // -1 for sign bit
// pull the significand // pull the significand
......
...@@ -34,52 +34,46 @@ namespace detail { ...@@ -34,52 +34,46 @@ namespace detail {
template<typename T> template<typename T>
struct implicit_conversions { struct implicit_conversions {
typedef typename replace_type< using subtype1 = typename replace_type<
T, T,
std::string, std::string,
std::is_same<T, const char*>, std::is_same<T, const char*>,
std::is_same<T, char*>, std::is_same<T, char*>,
std::is_same<T, char[]>, std::is_same<T, char[]>,
is_array_of<T, char>, is_array_of<T, char>,
is_array_of<T, const char> is_array_of<T, const char>
>::type >::type;
subtype1;
typedef typename replace_type< using subtype2 = typename replace_type<
subtype1, subtype1,
std::u16string, std::u16string,
std::is_same<subtype1, const char16_t*>, std::is_same<subtype1, const char16_t*>,
std::is_same<subtype1, char16_t*>, std::is_same<subtype1, char16_t*>,
is_array_of<subtype1, char16_t> is_array_of<subtype1, char16_t>
>::type >::type;
subtype2;
typedef typename replace_type< using subtype3 = typename replace_type<
subtype2, subtype2,
std::u32string, std::u32string,
std::is_same<subtype2, const char32_t*>, std::is_same<subtype2, const char32_t*>,
std::is_same<subtype2, char32_t*>, std::is_same<subtype2, char32_t*>,
is_array_of<subtype2, char32_t> is_array_of<subtype2, char32_t>
>::type >::type;
subtype3;
typedef typename replace_type< using type = typename replace_type<
subtype3, subtype3,
actor, actor,
std::is_convertible<T, abstract_actor*>, std::is_convertible<T, abstract_actor*>,
std::is_same<scoped_actor, T> std::is_same<scoped_actor, T>
>::type >::type;
type;
}; };
template<typename T> template<typename T>
struct strip_and_convert { struct strip_and_convert {
typedef typename implicit_conversions< using type = typename implicit_conversions<
typename rm_const_and_ref<T>::type typename rm_const_and_ref<T>::type
>::type >::type;
type;
}; };
} // namespace detail } // namespace detail
......
...@@ -40,7 +40,7 @@ struct il_right_impl; ...@@ -40,7 +40,7 @@ struct il_right_impl;
template<size_t N, size_t Size> template<size_t N, size_t Size>
struct il_right_impl<N, Size> { struct il_right_impl<N, Size> {
typedef int_list<> type; using type = int_list<>;
}; };
template<size_t N, size_t Size, long I, long... Is> template<size_t N, size_t Size, long I, long... Is>
...@@ -48,7 +48,7 @@ struct il_right_impl<N, Size, I, Is...> : il_right_impl<N, Size - 1, Is...> { }; ...@@ -48,7 +48,7 @@ struct il_right_impl<N, Size, I, Is...> : il_right_impl<N, Size - 1, Is...> { };
template<size_t N, long I, long... Is> template<size_t N, long I, long... Is>
struct il_right_impl<N, N, I, Is...> { struct il_right_impl<N, N, I, Is...> {
typedef int_list<I, Is...> type; using type = int_list<I, Is...>;
}; };
template<class List, size_t N> template<class List, size_t N>
...@@ -69,7 +69,7 @@ struct il_indices; ...@@ -69,7 +69,7 @@ struct il_indices;
template<template<class...> class List, long... Is, long Pos> template<template<class...> class List, long... Is, long Pos>
struct il_indices<List<>, Pos, int_list<Is...>> { struct il_indices<List<>, Pos, int_list<Is...>> {
typedef int_list<Is...> type; using type = int_list<Is...>;
}; };
template<template<class...> class List, template<template<class...> class List,
...@@ -79,12 +79,11 @@ template<template<class...> class List, ...@@ -79,12 +79,11 @@ template<template<class...> class List,
long... Is> long... Is>
struct il_indices<List<T0, Ts...>, Pos, int_list<Is...>> { struct il_indices<List<T0, Ts...>, Pos, int_list<Is...>> {
// always use type_list to forward remaining Ts... arguments // always use type_list to forward remaining Ts... arguments
typedef typename il_indices< using type = typename il_indices<
type_list<Ts...>, type_list<Ts...>,
Pos + 1, Pos + 1,
int_list<Is..., Pos> int_list<Is..., Pos>
>::type >::type;
type;
}; };
......
...@@ -29,25 +29,25 @@ namespace detail { ...@@ -29,25 +29,25 @@ namespace detail {
*/ */
template<typename Left, typename Right> template<typename Left, typename Right>
struct left_or_right { struct left_or_right {
typedef Left type; using type = Left;
}; };
template<typename Right> template<typename Right>
struct left_or_right<unit_t, Right> { struct left_or_right<unit_t, Right> {
typedef Right type; using type = Right;
}; };
template<typename Right> template<typename Right>
struct left_or_right<unit_t&, Right> { struct left_or_right<unit_t&, Right> {
typedef Right type; using type = Right;
}; };
template<typename Right> template<typename Right>
struct left_or_right<const unit_t&, Right> { struct left_or_right<const unit_t&, Right> {
typedef Right type; using type = Right;
}; };
...@@ -56,13 +56,13 @@ struct left_or_right<const unit_t&, Right> { ...@@ -56,13 +56,13 @@ struct left_or_right<const unit_t&, Right> {
*/ */
template<typename Left, typename Right> template<typename Left, typename Right>
struct if_not_left { struct if_not_left {
typedef unit_t type; using type = unit_t;
}; };
template<typename Right> template<typename Right>
struct if_not_left<unit_t, Right> { struct if_not_left<unit_t, Right> {
typedef Right type; using type = Right;
}; };
......
...@@ -79,7 +79,7 @@ inline bool has_none(const optional<T>& v, const Ts&... vs) { ...@@ -79,7 +79,7 @@ inline bool has_none(const optional<T>& v, const Ts&... vs) {
template<typename R, typename F> template<typename R, typename F>
class lifted_fun_invoker { class lifted_fun_invoker {
typedef typename get_callable_trait<F>::arg_types arg_types; using arg_types = typename get_callable_trait<F>::arg_types;
static constexpr size_t args = tl_size<arg_types>::value; static constexpr size_t args = tl_size<arg_types>::value;
...@@ -110,7 +110,7 @@ class lifted_fun_invoker { ...@@ -110,7 +110,7 @@ class lifted_fun_invoker {
template<typename F> template<typename F>
class lifted_fun_invoker<bool, F> { class lifted_fun_invoker<bool, F> {
typedef typename get_callable_trait<F>::arg_types arg_types; using arg_types = typename get_callable_trait<F>::arg_types;
static constexpr size_t args = tl_size<arg_types>::value; static constexpr size_t args = tl_size<arg_types>::value;
...@@ -150,19 +150,20 @@ class lifted_fun { ...@@ -150,19 +150,20 @@ class lifted_fun {
public: public:
typedef typename get_callable_trait<F>::result_type result_type; using result_type = typename get_callable_trait<F>::result_type;
// Let F be "R (Ts...)" then lifted_fun<F...> returns optional<R> // Let F be "R (Ts...)" then lifted_fun<F...> returns optional<R>
// unless R is void in which case bool is returned // unless R is void in which case bool is returned
typedef typename std::conditional<std::is_same<result_type, void>::value, using optional_result_type = typename std::conditional<
bool, optional<result_type>>::type std::is_same<result_type, void>::value,
optional_result_type; bool, optional<result_type>
>::type;
typedef ListOfProjections projections_list; using projections_list = ListOfProjections;
typedef typename tl_apply<projections_list, std::tuple>::type projections; using projections = typename tl_apply<projections_list, std::tuple>::type;
typedef type_list<Args...> arg_types; using arg_types = type_list<Args...>;
lifted_fun() = default; lifted_fun() = default;
...@@ -204,7 +205,7 @@ struct get_lifted_fun; ...@@ -204,7 +205,7 @@ struct get_lifted_fun;
template<typename F, class ListOfProjections, typename... Ts> template<typename F, class ListOfProjections, typename... Ts>
struct get_lifted_fun<F, ListOfProjections, type_list<Ts...>> { struct get_lifted_fun<F, ListOfProjections, type_list<Ts...>> {
typedef lifted_fun<F, ListOfProjections, Ts...> type; using type = lifted_fun<F, ListOfProjections, Ts...>;
}; };
......
...@@ -49,18 +49,18 @@ class limited_vector { ...@@ -49,18 +49,18 @@ class limited_vector {
public: public:
typedef T value_type; using value_type = T;
typedef size_t size_type; using size_type = size_t;
typedef ptrdiff_t difference_type; using difference_type = ptrdiff_t;
typedef value_type& reference; using reference = value_type&;
typedef const value_type& const_reference; using const_reference = const value_type&;
typedef value_type* pointer; using pointer = value_type*;
typedef const value_type* const_pointer; using const_pointer = const value_type*;
typedef T* iterator; using iterator = T*;
typedef const T* const_iterator; using const_iterator = const T*;
typedef std::reverse_iterator<iterator> reverse_iterator; using reverse_iterator = std::reverse_iterator<iterator>;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator; using const_reverse_iterator = std::reverse_iterator<const_iterator>;
inline limited_vector() : m_size(0) { } inline limited_vector() : m_size(0) { }
......
...@@ -241,9 +241,9 @@ struct select_matcher; ...@@ -241,9 +241,9 @@ struct select_matcher;
template<class Tuple, typename... Ts> template<class Tuple, typename... Ts>
struct select_matcher<Tuple, detail::type_list<Ts...>> { struct select_matcher<Tuple, detail::type_list<Ts...>> {
typedef matcher<get_wildcard_position<detail::type_list<Ts...>>(), Tuple, using type = matcher<get_wildcard_position<detail::type_list<Ts...>>(),
Ts...> type; Tuple,
Ts...>;
}; };
} // namespace detail } // namespace detail
......
...@@ -142,7 +142,7 @@ class basic_memory_cache : public memory_cache { ...@@ -142,7 +142,7 @@ class basic_memory_cache : public memory_cache {
} }
} }
typedef wrapper* iterator; using iterator = wrapper*;
iterator begin() { return data; } iterator begin() { return data; }
......
...@@ -73,7 +73,7 @@ class message_data : public ref_counted { ...@@ -73,7 +73,7 @@ class message_data : public ref_counted {
bool equals(const message_data& other) const; bool equals(const message_data& other) const;
typedef message_iterator<message_data> const_iterator; using const_iterator = message_iterator<message_data>;
inline const_iterator begin() const { inline const_iterator begin() const {
return {this}; return {this};
......
...@@ -32,7 +32,7 @@ namespace detail { ...@@ -32,7 +32,7 @@ namespace detail {
template<typename T> template<typename T>
struct conv_arg_impl { struct conv_arg_impl {
typedef optional<T> result_type; using result_type = optional<T>;
static inline result_type _(const std::string& arg) { static inline result_type _(const std::string& arg) {
std::istringstream iss(arg); std::istringstream iss(arg);
T result; T result;
...@@ -45,7 +45,7 @@ struct conv_arg_impl { ...@@ -45,7 +45,7 @@ struct conv_arg_impl {
template<> template<>
struct conv_arg_impl<std::string> { struct conv_arg_impl<std::string> {
typedef optional<std::string> result_type; using result_type = optional<std::string>;
static inline result_type _(const std::string& arg) { return arg; } static inline result_type _(const std::string& arg) { return arg; }
}; };
...@@ -64,7 +64,7 @@ class rd_arg_functor { ...@@ -64,7 +64,7 @@ class rd_arg_functor {
template<bool> friend class opt1_rvalue_builder; template<bool> friend class opt1_rvalue_builder;
typedef rd_arg_storage<T> storage_type; using storage_type = rd_arg_storage<T>;
public: public:
...@@ -108,8 +108,8 @@ class add_arg_functor { ...@@ -108,8 +108,8 @@ class add_arg_functor {
public: public:
typedef std::vector<T> value_type; using value_type = std::vector<T>;
typedef rd_arg_storage<value_type> storage_type; using storage_type = rd_arg_storage<value_type>;
add_arg_functor(const add_arg_functor&) = default; add_arg_functor(const add_arg_functor&) = default;
...@@ -143,17 +143,17 @@ struct is_rd_arg<rd_arg_functor<T>> : std::true_type { }; ...@@ -143,17 +143,17 @@ struct is_rd_arg<rd_arg_functor<T>> : std::true_type { };
template<typename T> template<typename T>
struct is_rd_arg<add_arg_functor<T>> : std::true_type { }; struct is_rd_arg<add_arg_functor<T>> : std::true_type { };
typedef decltype(on<std::string>()) opt0_rvalue_builder; using opt0_rvalue_builder = decltype(on<std::string>());
template<bool HasShortOpt = true> template<bool HasShortOpt = true>
class opt1_rvalue_builder { class opt1_rvalue_builder {
public: public:
typedef decltype(on<std::string, std::string>()) left_type; using left_type = decltype(on<std::string, std::string>());
typedef decltype(on(std::function<optional<std::string>(const std::string&)>())) using right_type = decltype(on(std::function<optional<std::string>
right_type; (const std::string&)>()));
template<typename Left, typename Right> template<typename Left, typename Right>
opt1_rvalue_builder(char sopt, std::string lopt, Left&& lhs, Right&& rhs) opt1_rvalue_builder(char sopt, std::string lopt, Left&& lhs, Right&& rhs)
...@@ -190,8 +190,8 @@ class opt1_rvalue_builder<false> { ...@@ -190,8 +190,8 @@ class opt1_rvalue_builder<false> {
public: public:
typedef decltype(on(std::function<optional<std::string>(const std::string&)>())) using sub_type = decltype(on(std::function<optional<std::string>
sub_type; (const std::string&)>()));
template<typename SubType> template<typename SubType>
opt1_rvalue_builder(std::string lopt, SubType&& sub) opt1_rvalue_builder(std::string lopt, SubType&& sub)
......
...@@ -78,13 +78,13 @@ class producer_consumer_list { ...@@ -78,13 +78,13 @@ class producer_consumer_list {
public: public:
typedef T value_type; using value_type = T;
typedef size_t size_type; using size_type = size_t;
typedef ptrdiff_t difference_type; using difference_type = ptrdiff_t;
typedef value_type& reference; using reference = value_type&;
typedef const value_type& const_reference; using const_reference = const value_type&;
typedef value_type* pointer; using pointer = value_type*;
typedef const value_type* const_pointer; using const_pointer = const value_type*;
class node { class node {
......
...@@ -21,8 +21,8 @@ template<class Base, class Derived, class Policies> ...@@ -21,8 +21,8 @@ template<class Base, class Derived, class Policies>
class proper_actor_base class proper_actor_base
: public Policies::resume_policy::template mixin<Base, Derived> { : public Policies::resume_policy::template mixin<Base, Derived> {
typedef typename Policies::resume_policy::template mixin<Base, Derived> using super = typename Policies::resume_policy::template mixin<Base,
super; Derived>;
public: public:
...@@ -36,7 +36,7 @@ class proper_actor_base ...@@ -36,7 +36,7 @@ class proper_actor_base
// member functions from scheduling policy // member functions from scheduling policy
typedef typename Policies::scheduling_policy::timeout_type timeout_type; using timeout_type = typename Policies::scheduling_policy::timeout_type;
void enqueue(const actor_addr& sender, void enqueue(const actor_addr& sender,
message_id mid, message_id mid,
...@@ -84,7 +84,7 @@ class proper_actor_base ...@@ -84,7 +84,7 @@ class proper_actor_base
priority_policy().push_to_cache(std::move(ptr)); priority_policy().push_to_cache(std::move(ptr));
} }
typedef typename Policies::priority_policy::cache_iterator cache_iterator; using cache_iterator = typename Policies::priority_policy::cache_iterator;
inline bool cache_empty() { inline bool cache_empty() {
return priority_policy().cache_empty(); return priority_policy().cache_empty();
...@@ -178,7 +178,7 @@ class proper_actor ...@@ -178,7 +178,7 @@ class proper_actor
: public proper_actor_base<Base, proper_actor<Base, Policies, false>, : public proper_actor_base<Base, proper_actor<Base, Policies, false>,
Policies> { Policies> {
typedef proper_actor_base<Base, proper_actor, Policies> super; using super = proper_actor_base<Base, proper_actor, Policies>;
public: public:
...@@ -230,7 +230,7 @@ class proper_actor< ...@@ -230,7 +230,7 @@ class proper_actor<
true> : public proper_actor_base<Base, proper_actor<Base, Policies, true>, true> : public proper_actor_base<Base, proper_actor<Base, Policies, true>,
Policies> { Policies> {
typedef proper_actor_base<Base, proper_actor, Policies> super; using super = proper_actor_base<Base, proper_actor, Policies>;
public: public:
......
...@@ -29,8 +29,8 @@ namespace detail { ...@@ -29,8 +29,8 @@ namespace detail {
// tuple-like access to an array of void pointers // tuple-like access to an array of void pointers
template<typename... T> template<typename... T>
struct pseudo_tuple { struct pseudo_tuple {
typedef void* pointer; using pointer = void*;
typedef const void* const_pointer; using const_pointer = const void*;
pointer data[sizeof...(T) > 0 ? sizeof...(T) : 1]; pointer data[sizeof...(T) > 0 ? sizeof...(T) : 1];
......
...@@ -28,19 +28,19 @@ namespace detail { ...@@ -28,19 +28,19 @@ namespace detail {
template<typename T> template<typename T>
struct purge_refs_impl { struct purge_refs_impl {
typedef T type; using type = T;
}; };
template<typename T> template<typename T>
struct purge_refs_impl<std::reference_wrapper<T>> { struct purge_refs_impl<std::reference_wrapper<T>> {
typedef T type; using type = T;
}; };
template<typename T> template<typename T>
struct purge_refs_impl<std::reference_wrapper<const T>> { struct purge_refs_impl<std::reference_wrapper<const T>> {
typedef T type; using type = T;
}; };
...@@ -49,8 +49,8 @@ struct purge_refs_impl<std::reference_wrapper<const T>> { ...@@ -49,8 +49,8 @@ struct purge_refs_impl<std::reference_wrapper<const T>> {
*/ */
template<typename T> template<typename T>
struct purge_refs { struct purge_refs {
typedef typename purge_refs_impl< using type = typename purge_refs_impl<
typename detail::rm_const_and_ref<T>::type>::type type; typename detail::rm_const_and_ref<T>::type>::type;
}; };
......
...@@ -52,7 +52,7 @@ typename std::enable_if< std::is_floating_point<T>::value ...@@ -52,7 +52,7 @@ typename std::enable_if< std::is_floating_point<T>::value
bool bool
>::type >::type
safe_equal(const T& lhs, const U& rhs) { safe_equal(const T& lhs, const U& rhs) {
typedef decltype(lhs - rhs) res_type; using res_type = decltype(lhs - rhs);
return std::fabs(lhs - rhs) <= std::numeric_limits<res_type>::epsilon(); return std::fabs(lhs - rhs) <= std::numeric_limits<res_type>::epsilon();
} }
......
...@@ -65,8 +65,8 @@ class single_reader_queue { ...@@ -65,8 +65,8 @@ class single_reader_queue {
public: public:
typedef T value_type; using value_type = T;
typedef value_type* pointer; using pointer = value_type*;
/** /**
* @warning call only from the reader (owner) * @warning call only from the reader (owner)
......
...@@ -29,8 +29,8 @@ namespace cppa { ...@@ -29,8 +29,8 @@ namespace cppa {
namespace detail { namespace detail {
struct tuple_dummy { struct tuple_dummy {
typedef detail::empty_type_list types; using types = detail::empty_type_list;
typedef message_iterator<tuple_dummy> const_iterator; using const_iterator = message_iterator<tuple_dummy>;
inline size_t size() const { return 0; } inline size_t size() const { return 0; }
inline void* mutable_at(size_t) { return nullptr; } inline void* mutable_at(size_t) { return nullptr; }
inline const void* at(size_t) const { return nullptr; } inline const void* at(size_t) const { return nullptr; }
......
...@@ -57,13 +57,13 @@ class tuple_vals : public message_data { ...@@ -57,13 +57,13 @@ class tuple_vals : public message_data {
static_assert(sizeof...(Ts) > 0, "tuple_vals is not allowed to be empty"); static_assert(sizeof...(Ts) > 0, "tuple_vals is not allowed to be empty");
typedef message_data super; using super = message_data;
public: public:
typedef std::tuple<Ts...> data_type; using data_type = std::tuple<Ts...>;
typedef types_array<Ts...> element_types; using element_types = types_array<Ts...>;
tuple_vals(const tuple_vals&) = default; tuple_vals(const tuple_vals&) = default;
......
This diff is collapsed.
...@@ -28,14 +28,14 @@ namespace detail { ...@@ -28,14 +28,14 @@ namespace detail {
*/ */
template<typename First, typename Second> template<typename First, typename Second>
struct type_pair { struct type_pair {
typedef First first; using first = First;
typedef Second second; using second = Second;
}; };
template<typename First, typename Second> template<typename First, typename Second>
struct to_type_pair { struct to_type_pair {
typedef type_pair<First, Second> type; using type = type_pair<First, Second>;
}; };
......
...@@ -42,25 +42,25 @@ namespace detail { ...@@ -42,25 +42,25 @@ namespace detail {
*/ */
template<typename T> template<typename T>
struct rm_const_and_ref { struct rm_const_and_ref {
typedef T type; using type = T;
}; };
template<typename T> template<typename T>
struct rm_const_and_ref<const T&> { struct rm_const_and_ref<const T&> {
typedef T type; using type = T;
}; };
template<typename T> template<typename T>
struct rm_const_and_ref<const T> { struct rm_const_and_ref<const T> {
typedef T type; using type = T;
}; };
template<typename T> template<typename T>
struct rm_const_and_ref<T&> { struct rm_const_and_ref<T&> {
typedef T type; using type = T;
}; };
...@@ -119,8 +119,8 @@ struct is_anything : std::is_same<T, anything> {}; ...@@ -119,8 +119,8 @@ struct is_anything : std::is_same<T, anything> {};
*/ */
template<typename T, typename U> template<typename T, typename U>
struct is_array_of { struct is_array_of {
typedef typename std::remove_all_extents<T>::type step1_type; using step1_type = typename std::remove_all_extents<T>::type;
typedef typename std::remove_cv<step1_type>::type step2_type; using step2_type = typename std::remove_cv<step1_type>::type;
static constexpr bool value = static constexpr bool value =
std::is_array<T>::value && std::is_same<step2_type, U>::value; std::is_array<T>::value && std::is_same<step2_type, U>::value;
...@@ -131,19 +131,19 @@ struct is_array_of { ...@@ -131,19 +131,19 @@ struct is_array_of {
*/ */
template<typename T0, typename T1> template<typename T0, typename T1>
struct deduce_ref_type { struct deduce_ref_type {
typedef typename detail::rm_const_and_ref<T1>::type type; using type = typename detail::rm_const_and_ref<T1>::type;
}; };
template<typename T0, typename T1> template<typename T0, typename T1>
struct deduce_ref_type<T0&, T1> { struct deduce_ref_type<T0&, T1> {
typedef typename detail::rm_const_and_ref<T1>::type& type; using type = typename detail::rm_const_and_ref<T1>::type&;
}; };
template<typename T0, typename T1> template<typename T0, typename T1>
struct deduce_ref_type<const T0&, T1> { struct deduce_ref_type<const T0&, T1> {
typedef const typename detail::rm_const_and_ref<T1>::type& type; using type = const typename detail::rm_const_and_ref<T1>::type&;
}; };
...@@ -209,16 +209,16 @@ class is_comparable { ...@@ -209,16 +209,16 @@ class is_comparable {
template<typename A, typename B> template<typename A, typename B>
static bool cmp_help_fun(const A* arg0, const B* arg1, static bool cmp_help_fun(const A* arg0, const B* arg1,
decltype(*arg0 == *arg1) * = nullptr) { decltype(*arg0 == *arg1)* = nullptr) {
return true; return true;
} }
template<typename A, typename B> template<typename A, typename B>
static void cmp_help_fun(const A*, const B*, void* = nullptr) {} static void cmp_help_fun(const A*, const B*, void* = nullptr) {}
typedef decltype(cmp_help_fun(static_cast<T1*>(nullptr), using result_type = decltype(cmp_help_fun(static_cast<T1*>(nullptr),
static_cast<T2*>(nullptr), static_cast<T2*>(nullptr),
static_cast<bool*>(nullptr))) result_type; static_cast<bool*>(nullptr)));
public: public:
...@@ -251,7 +251,7 @@ class is_forward_iterator { ...@@ -251,7 +251,7 @@ class is_forward_iterator {
static void sfinae_fun(void*) {} static void sfinae_fun(void*) {}
typedef decltype(sfinae_fun(static_cast<T*>(nullptr))) result_type; using result_type = decltype(sfinae_fun(static_cast<T*>(nullptr)));
public: public:
...@@ -283,7 +283,7 @@ class is_iterable { ...@@ -283,7 +283,7 @@ class is_iterable {
// SFNINAE default // SFNINAE default
static void sfinae_fun(const void*) {} static void sfinae_fun(const void*) {}
typedef decltype(sfinae_fun(static_cast<const T*>(nullptr))) result_type; using result_type = decltype(sfinae_fun(static_cast<const T*>(nullptr)));
public: public:
...@@ -318,13 +318,13 @@ struct is_mutable_ref { ...@@ -318,13 +318,13 @@ struct is_mutable_ref {
*/ */
template<typename T> template<typename T>
struct rm_optional { struct rm_optional {
typedef T type; using type = T;
}; };
template<typename T> template<typename T>
struct rm_optional<optional<T>> { struct rm_optional<optional<T>> {
typedef T type; using type = T;
}; };
...@@ -343,50 +343,50 @@ struct callable_trait; ...@@ -343,50 +343,50 @@ struct callable_trait;
// member const function pointer // member const function pointer
template<class C, typename Result, typename... Ts> template<class C, typename Result, typename... Ts>
struct callable_trait<Result (C::*)(Ts...) const> { struct callable_trait<Result (C::*)(Ts...) const> {
typedef Result result_type; using result_type = Result;
typedef type_list<Ts...> arg_types; using arg_types = type_list<Ts...>;
typedef std::function<Result(Ts...)> fun_type; using fun_type = std::function<Result(Ts...)>;
}; };
// member function pointer // member function pointer
template<class C, typename Result, typename... Ts> template<class C, typename Result, typename... Ts>
struct callable_trait<Result (C::*)(Ts...)> { struct callable_trait<Result (C::*)(Ts...)> {
typedef Result result_type; using result_type = Result;
typedef type_list<Ts...> arg_types; using arg_types = type_list<Ts...>;
typedef std::function<Result(Ts...)> fun_type; using fun_type = std::function<Result(Ts...)>;
}; };
// good ol' function // good ol' function
template<typename Result, typename... Ts> template<typename Result, typename... Ts>
struct callable_trait<Result(Ts...)> { struct callable_trait<Result(Ts...)> {
typedef Result result_type; using result_type = Result;
typedef type_list<Ts...> arg_types; using arg_types = type_list<Ts...>;
typedef std::function<Result(Ts...)> fun_type; using fun_type = std::function<Result(Ts...)>;
}; };
// good ol' function pointer // good ol' function pointer
template<typename Result, typename... Ts> template<typename Result, typename... Ts>
struct callable_trait<Result (*)(Ts...)> { struct callable_trait<Result (*)(Ts...)> {
typedef Result result_type; using result_type = Result;
typedef type_list<Ts...> arg_types; using arg_types = type_list<Ts...>;
typedef std::function<Result(Ts...)> fun_type; using fun_type = std::function<Result(Ts...)>;
}; };
// matches (IsFun || IsMemberFun) // matches (IsFun || IsMemberFun)
template<bool IsFun, bool IsMemberFun, typename T> template<bool IsFun, bool IsMemberFun, typename T>
struct get_callable_trait_helper { struct get_callable_trait_helper {
typedef callable_trait<T> type; using type = callable_trait<T>;
}; };
// assume functor providing operator() // assume functor providing operator()
template<typename C> template<typename C>
struct get_callable_trait_helper<false, false, C> { struct get_callable_trait_helper<false, false, C> {
typedef callable_trait<decltype(&C::operator())> type; using type = callable_trait<decltype(&C::operator())>;
}; };
...@@ -398,18 +398,18 @@ struct get_callable_trait_helper<false, false, C> { ...@@ -398,18 +398,18 @@ struct get_callable_trait_helper<false, false, C> {
template<typename T> template<typename T>
struct get_callable_trait { struct get_callable_trait {
// type without cv qualifiers // type without cv qualifiers
typedef typename rm_const_and_ref<T>::type bare_type; using bare_type = typename rm_const_and_ref<T>::type;
// if type is a function pointer, this typedef identifies the function // if T is a function pointer, this type identifies the function
typedef typename std::remove_pointer<bare_type>::type signature_type; using signature_type = typename std::remove_pointer<bare_type>::type;
typedef typename get_callable_trait_helper < using type = typename get_callable_trait_helper<
std::is_function<bare_type>::value || std::is_function<bare_type>::value
std::is_function<signature_type>::value, || std::is_function<signature_type>::value,
std::is_member_function_pointer<bare_type>::value, std::is_member_function_pointer<bare_type>::value,
bare_type > ::type type; bare_type
typedef typename type::result_type result_type; >::type;
typedef typename type::arg_types arg_types; using result_type = typename type::result_type;
typedef typename type::fun_type fun_type; using arg_types = typename type::arg_types;
using fun_type = typename type::fun_type;
}; };
/** /**
...@@ -425,15 +425,16 @@ struct is_callable { ...@@ -425,15 +425,16 @@ struct is_callable {
template<typename C> template<typename C>
static bool static bool
_fun(C*, typename callable_trait<decltype(&C::operator())>::result_type* = _fun(C*,
nullptr) { typename callable_trait<decltype(&C::operator())>::result_type* = 0) {
return true; return true;
} }
static void _fun(void*) {} static void _fun(void*) { }
using pointer = typename rm_const_and_ref<T>::type*;
typedef decltype(_fun( using result_type = decltype(_fun(static_cast<pointer>(nullptr)));
static_cast<typename rm_const_and_ref<T>::type*>(nullptr))) result_type;
public: public:
...@@ -465,14 +466,14 @@ struct is_manipulator { ...@@ -465,14 +466,14 @@ struct is_manipulator {
template<bool IsCallable, typename C> template<bool IsCallable, typename C>
struct map_to_result_type_impl { struct map_to_result_type_impl {
typedef typename get_callable_trait<C>::type trait_type; using trait_type = typename get_callable_trait<C>::type;
typedef typename trait_type::result_type type; using type = typename trait_type::result_type;
}; };
template<typename C> template<typename C>
struct map_to_result_type_impl<false, C> { struct map_to_result_type_impl<false, C> {
typedef unit_t type; using type = unit_t;
}; };
...@@ -482,21 +483,20 @@ struct map_to_result_type_impl<false, C> { ...@@ -482,21 +483,20 @@ struct map_to_result_type_impl<false, C> {
*/ */
template<typename T> template<typename T>
struct map_to_result_type { struct map_to_result_type {
typedef typename map_to_result_type_impl<is_callable<T>::value, T>::type using type = typename map_to_result_type_impl<
type; is_callable<T>::value,
T
>::type;
}; };
template<bool DoReplace, typename T1, typename T2> template<bool DoReplace, typename T1, typename T2>
struct replace_type_impl { struct replace_type_impl {
typedef T1 type; using type = T1;
}; };
template<typename T1, typename T2> template<typename T1, typename T2>
struct replace_type_impl<true, T1, T2> { struct replace_type_impl<true, T1, T2> {
typedef T2 type; using type = T2;
}; };
/** /**
...@@ -505,8 +505,7 @@ struct replace_type_impl<true, T1, T2> { ...@@ -505,8 +505,7 @@ struct replace_type_impl<true, T1, T2> {
template<typename What, typename With, typename... IfStmt> template<typename What, typename With, typename... IfStmt>
struct replace_type { struct replace_type {
static constexpr bool do_replace = disjunction<IfStmt::value...>::value; static constexpr bool do_replace = disjunction<IfStmt::value...>::value;
typedef typename replace_type_impl<do_replace, What, With>::type type; using type = typename replace_type_impl<do_replace, What, With>::type;
}; };
/** /**
...@@ -517,14 +516,12 @@ struct type_at; ...@@ -517,14 +516,12 @@ struct type_at;
template<size_t N, typename T0, typename... Ts> template<size_t N, typename T0, typename... Ts>
struct type_at<N, T0, Ts...> { struct type_at<N, T0, Ts...> {
typedef typename type_at<N - 1, Ts...>::type type; using type = typename type_at<N - 1, Ts...>::type;
}; };
template<typename T0, typename... Ts> template<typename T0, typename... Ts>
struct type_at<0, T0, Ts...> { struct type_at<0, T0, Ts...> {
typedef T0 type; using type = T0;
}; };
/** /**
......
...@@ -39,24 +39,30 @@ template<typename R, typename T> ...@@ -39,24 +39,30 @@ template<typename R, typename T>
struct deduce_signature_helper; struct deduce_signature_helper;
template<typename R, typename... Ts> template<typename R, typename... Ts>
struct deduce_signature_helper<R, detail::type_list<Ts...>> { struct deduce_signature_helper<R, type_list<Ts...>> {
typedef typename replies_to<Ts...>::template with<R> type; using type = typename replies_to<Ts...>::template with<R>;
}; };
template<typename... Rs, typename... Ts> template<typename... Rs, typename... Ts>
struct deduce_signature_helper<std::tuple<Rs...>, detail::type_list<Ts...>> { struct deduce_signature_helper<std::tuple<Rs...>, type_list<Ts...>> {
typedef typename replies_to<Ts...>::template with<Rs...> type; using type = typename replies_to<Ts...>::template with<Rs...>;
}; };
template<typename T> template<typename T>
struct deduce_signature { struct deduce_signature {
typedef typename detail::implicit_conversions<typename T::result_type>::type
result_type; using result_type = typename implicit_conversions<
typedef typename detail::tl_map<typename T::arg_types, typename T::result_type
detail::rm_const_and_ref>::type arg_types; >::type;
typedef typename deduce_signature_helper<result_type, arg_types>::type type;
using arg_types = typename tl_map<
typename T::arg_types,
rm_const_and_ref
>::type;
using type = typename deduce_signature_helper<result_type, arg_types>::type;
}; };
...@@ -72,50 +78,58 @@ struct input_is { ...@@ -72,50 +78,58 @@ struct input_is {
template<typename OutputList, typename F> template<typename OutputList, typename F>
inline void assert_types() { inline void assert_types() {
typedef typename detail::tl_map<
typename detail::get_callable_trait<F>::arg_types, using arg_types = typename tl_map<
detail::rm_const_and_ref>::type arg_types; typename get_callable_trait<F>::arg_types,
static constexpr size_t fun_args = detail::tl_size<arg_types>::value; rm_const_and_ref
static_assert(fun_args <= detail::tl_size<OutputList>::value, >::type;
static constexpr size_t fun_args = tl_size<arg_types>::value;
static_assert(fun_args <= tl_size<OutputList>::value,
"functor takes too much arguments"); "functor takes too much arguments");
typedef typename detail::tl_right<OutputList, fun_args>::type recv_types;
using recv_types = typename tl_right<OutputList, fun_args>::type;
static_assert(std::is_same<arg_types, recv_types>::value, static_assert(std::is_same<arg_types, recv_types>::value,
"wrong functor signature"); "wrong functor signature");
} }
template<typename T> template<typename T>
struct lifted_result_type { struct lifted_result_type {
typedef detail::type_list<typename detail::implicit_conversions<T>::type> using type = type_list<typename implicit_conversions<T>::type>;
type;
}; };
template<typename... Ts> template<typename... Ts>
struct lifted_result_type<std::tuple<Ts...>> { struct lifted_result_type<std::tuple<Ts...>> {
typedef detail::type_list<Ts...> type; using type = type_list<Ts...>;
}; };
template<typename T> template<typename T>
struct deduce_output_type_step2 { struct deduce_output_type_step2 {
typedef T type; using type = T;
}; };
template<typename R> template<typename R>
struct deduce_output_type_step2<detail::type_list<typed_continue_helper<R>>> { struct deduce_output_type_step2<type_list<typed_continue_helper<R>>> {
typedef typename lifted_result_type<R>::type type; using type = typename lifted_result_type<R>::type;
}; };
template<typename Signatures, typename InputTypes> template<typename Signatures, typename InputTypes>
struct deduce_output_type { struct deduce_output_type {
static constexpr int input_pos = detail::tl_find_if< static constexpr int input_pos = tl_find_if<
Signatures, input_is<InputTypes>::template eval>::value; Signatures,
input_is<InputTypes>::template eval
>::value;
static_assert(input_pos >= 0, "typed actor does not support given input"); static_assert(input_pos >= 0, "typed actor does not support given input");
typedef typename detail::tl_at<Signatures, input_pos>::type signature;
typedef typename deduce_output_type_step2< using signature = typename tl_at<Signatures, input_pos>::type;
typename signature::output_types>::type type;
using type = typename deduce_output_type_step2<
typename signature::output_types
>::type;
}; };
......
...@@ -92,7 +92,7 @@ struct types_array_impl { ...@@ -92,7 +92,7 @@ struct types_array_impl {
inline const uniform_type_info* operator[](size_t p) const { inline const uniform_type_info* operator[](size_t p) const {
return data[p]; return data[p];
} }
typedef const uniform_type_info* const* const_iterator; using const_iterator = const uniform_type_info* const*;
inline const_iterator begin() const { return std::begin(data); } inline const_iterator begin() const { return std::begin(data); }
inline const_iterator end() const { return std::end(data); } inline const_iterator end() const { return std::end(data); }
}; };
...@@ -109,10 +109,9 @@ struct types_array_impl<false, T...> { ...@@ -109,10 +109,9 @@ struct types_array_impl<false, T...> {
mutable std::atomic<const uniform_type_info**> pairs; mutable std::atomic<const uniform_type_info**> pairs;
// pairs[sizeof...(T)]; // pairs[sizeof...(T)];
types_array_impl() types_array_impl()
: tinfo_data{ta_util<std_tinf, detail::is_builtin<T>::value, : tinfo_data{ta_util<std_tinf, is_builtin<T>::value, T>::get()...} {
T>::get()...} {
bool static_init[sizeof...(T)] = {!std::is_same<T, anything>::value && bool static_init[sizeof...(T)] = {!std::is_same<T, anything>::value &&
detail::is_builtin<T>::value...}; is_builtin<T>::value...};
for (size_t i = 0; i < sizeof...(T); ++i) { for (size_t i = 0; i < sizeof...(T); ++i) {
if (static_init[i]) { if (static_init[i]) {
data[i].store(uniform_typeid(*(tinfo_data[i])), data[i].store(uniform_typeid(*(tinfo_data[i])),
...@@ -131,7 +130,7 @@ struct types_array_impl<false, T...> { ...@@ -131,7 +130,7 @@ struct types_array_impl<false, T...> {
} }
return result; return result;
} }
typedef const uniform_type_info* const* const_iterator; using const_iterator = const uniform_type_info* const*;
inline const_iterator begin() const { inline const_iterator begin() const {
auto result = pairs.load(); auto result = pairs.load();
if (result == nullptr) { if (result == nullptr) {
...@@ -157,14 +156,16 @@ struct types_array_impl<false, T...> { ...@@ -157,14 +156,16 @@ struct types_array_impl<false, T...> {
template<typename... T> template<typename... T>
struct types_array struct types_array
: types_array_impl< : types_array_impl<
detail::tl_forall<detail::type_list<T...>, detail::is_builtin>::value, tl_forall<type_list<T...>, is_builtin>::value,
T...> { T...> {
static constexpr size_t size = sizeof...(T); static constexpr size_t size = sizeof...(T);
typedef detail::type_list<T...> types; using types = type_list<T...>;
typedef typename detail::tl_filter_not<types, detail::is_anything>::type using filtered_types = typename tl_filter_not<
filtered_types; types,
is_anything
>::type;
static constexpr size_t filtered_size = static constexpr size_t filtered_size =
detail::tl_size<filtered_types>::value; tl_size<filtered_types>::value;
inline bool has_values() const { return false; } inline bool has_values() const { return false; }
}; };
...@@ -182,8 +183,8 @@ template<typename TypeList> ...@@ -182,8 +183,8 @@ template<typename TypeList>
struct static_types_array_from_type_list; struct static_types_array_from_type_list;
template<typename... T> template<typename... T>
struct static_types_array_from_type_list<detail::type_list<T...>> { struct static_types_array_from_type_list<type_list<T...>> {
typedef static_types_array<T...> type; using type = static_types_array<T...>;
}; };
...@@ -194,12 +195,12 @@ template<typename T> ...@@ -194,12 +195,12 @@ template<typename T>
struct static_type_list<T> { struct static_type_list<T> {
static const std::type_info* list; static const std::type_info* list;
static inline const std::type_info* by_offset(size_t offset) { static inline const std::type_info* by_offset(size_t offset) {
return offset == 0 ? list : &typeid(detail::type_list<>); return offset == 0 ? list : &typeid(type_list<>);
} }
}; };
template<typename T> template<typename T>
const std::type_info* static_type_list<T>::list = &typeid(detail::type_list<T>); const std::type_info* static_type_list<T>::list = &typeid(type_list<T>);
// utility for singleton-like access to a type_info instance of a type_list // utility for singleton-like access to a type_info instance of a type_list
template<typename T0, typename T1, typename... Ts> template<typename T0, typename T1, typename... Ts>
...@@ -212,7 +213,7 @@ struct static_type_list<T0, T1, Ts...> { ...@@ -212,7 +213,7 @@ struct static_type_list<T0, T1, Ts...> {
template<typename T0, typename T1, typename... Ts> template<typename T0, typename T1, typename... Ts>
const std::type_info* static_type_list<T0, T1, Ts...>::list = const std::type_info* static_type_list<T0, T1, Ts...>::list =
&typeid(detail::type_list<T0, T1, Ts...>); &typeid(type_list<T0, T1, Ts...>);
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
......
...@@ -28,31 +28,31 @@ namespace detail { ...@@ -28,31 +28,31 @@ namespace detail {
template<typename T> template<typename T>
struct unboxed { struct unboxed {
typedef T type; using type = T;
}; };
template<typename T> template<typename T>
struct unboxed<detail::wrapped<T>> { struct unboxed<detail::wrapped<T>> {
typedef typename detail::wrapped<T>::type type; using type = typename detail::wrapped<T>::type;
}; };
template<typename T> template<typename T>
struct unboxed<detail::wrapped<T>(&)()> { struct unboxed<detail::wrapped<T>(&)()> {
typedef typename detail::wrapped<T>::type type; using type = typename detail::wrapped<T>::type;
}; };
template<typename T> template<typename T>
struct unboxed<detail::wrapped<T>()> { struct unboxed<detail::wrapped<T>()> {
typedef typename detail::wrapped<T>::type type; using type = typename detail::wrapped<T>::type;
}; };
template<typename T> template<typename T>
struct unboxed<detail::wrapped<T>(*)()> { struct unboxed<detail::wrapped<T>(*)()> {
typedef typename detail::wrapped<T>::type type; using type = typename detail::wrapped<T>::type;
}; };
......
...@@ -73,7 +73,7 @@ class uniform_type_info_map { ...@@ -73,7 +73,7 @@ class uniform_type_info_map {
public: public:
typedef const uniform_type_info* pointer; using pointer = const uniform_type_info*;
virtual ~uniform_type_info_map(); virtual ~uniform_type_info_map();
......
...@@ -28,13 +28,13 @@ namespace detail { ...@@ -28,13 +28,13 @@ namespace detail {
*/ */
template<typename T> template<typename T>
struct wrapped { struct wrapped {
typedef T type; using type = T;
}; };
template<typename T> template<typename T>
struct wrapped<wrapped<T>> { struct wrapped<wrapped<T>> {
typedef typename wrapped<T>::type type; using type = typename wrapped<T>::type;
}; };
......
...@@ -28,7 +28,7 @@ struct extend_helper; ...@@ -28,7 +28,7 @@ struct extend_helper;
template<class D, class B> template<class D, class B>
struct extend_helper<D, B> { struct extend_helper<D, B> {
typedef B type; using type = B;
}; };
......
...@@ -55,9 +55,9 @@ struct invalid_actor_addr_t; ...@@ -55,9 +55,9 @@ struct invalid_actor_addr_t;
enum primitive_type : unsigned char; enum primitive_type : unsigned char;
enum class atom_value : uint64_t; enum class atom_value : uint64_t;
// intrusive pointer typedefs // intrusive pointer types
typedef intrusive_ptr<abstract_group> abstract_group_ptr; using abstract_group_ptr = intrusive_ptr<abstract_group>;
typedef intrusive_ptr<actor_proxy> actor_proxy_ptr; using actor_proxy_ptr = intrusive_ptr<actor_proxy>;
// functions // functions
template<typename T, typename U> template<typename T, typename U>
......
...@@ -40,11 +40,11 @@ class intrusive_ptr : detail::comparable<intrusive_ptr<T>>, ...@@ -40,11 +40,11 @@ class intrusive_ptr : detail::comparable<intrusive_ptr<T>>,
public: public:
typedef T* pointer; using pointer = T* ;
typedef const T* const_pointer; using const_pointer = const T*;
typedef T element_type; using element_type = T ;
typedef T& reference; using reference = T& ;
typedef const T& const_reference; using const_reference = const T&;
constexpr intrusive_ptr() : m_ptr(nullptr) { } constexpr intrusive_ptr() : m_ptr(nullptr) { }
......
...@@ -55,7 +55,7 @@ class broker : public extend<local_actor>:: ...@@ -55,7 +55,7 @@ class broker : public extend<local_actor>::
friend class policy::sequential_invoke; friend class policy::sequential_invoke;
typedef combined_type super; using super = combined_type;
public: public:
...@@ -219,8 +219,7 @@ class broker : public extend<local_actor>:: ...@@ -219,8 +219,7 @@ class broker : public extend<local_actor>::
actor fork(F fun, connection_handle hdl, Ts&&... vs) { actor fork(F fun, connection_handle hdl, Ts&&... vs) {
// provoke compile-time errors early // provoke compile-time errors early
using fun_res = decltype(fun(this, hdl, std::forward<Ts>(vs)...)); using fun_res = decltype(fun(this, hdl, std::forward<Ts>(vs)...));
// this static assert only prevents a warning about // prevent warning about unused local type
// unused local typedef
static_assert(std::is_same<fun_res, fun_res>::value, static_assert(std::is_same<fun_res, fun_res>::value,
"your compiler is lying to you"); "your compiler is lying to you");
auto i = m_scribes.find(hdl); auto i = m_scribes.find(hdl);
...@@ -346,7 +345,7 @@ class broker : public extend<local_actor>:: ...@@ -346,7 +345,7 @@ class broker : public extend<local_actor>::
static broker_ptr from(F fun) { static broker_ptr from(F fun) {
// transform to STD function here, because GCC is unable // transform to STD function here, because GCC is unable
// to select proper overload otherwise ... // to select proper overload otherwise ...
typedef decltype(fun((broker*)nullptr)) fres; using fres = decltype(fun((broker*)nullptr));
std::function<fres(broker*)> stdfun{std::move(fun)}; std::function<fres(broker*)> stdfun{std::move(fun)};
return from_impl(std::move(stdfun)); return from_impl(std::move(stdfun));
} }
...@@ -399,9 +398,9 @@ class broker : public extend<local_actor>:: ...@@ -399,9 +398,9 @@ class broker : public extend<local_actor>::
void cleanup(uint32_t reason) override; void cleanup(uint32_t reason) override;
typedef intrusive_ptr<scribe> scribe_pointer; using scribe_pointer = intrusive_ptr<scribe>;
typedef intrusive_ptr<doorman> doorman_pointer; using doorman_pointer = intrusive_ptr<doorman>;
bool initialized() const; bool initialized() const;
......
...@@ -95,11 +95,11 @@ namespace network { ...@@ -95,11 +95,11 @@ namespace network {
// some more annoying platform-dependent bootstrapping // some more annoying platform-dependent bootstrapping
#ifdef CPPA_WINDOWS #ifdef CPPA_WINDOWS
typedef SOCKET native_socket_t; using native_socket_t = SOCKET;
typedef const char* setsockopt_ptr; using setsockopt_ptr = const char*;
typedef const char* socket_send_ptr; using socket_send_ptr = const char*;
typedef char* socket_recv_ptr; using socket_recv_ptr = char*;
typedef int socklen_t; using socklen_t = int;
constexpr native_socket_t invalid_socket = INVALID_SOCKET; constexpr native_socket_t invalid_socket = INVALID_SOCKET;
inline int last_socket_error() { return WSAGetLastError(); } inline int last_socket_error() { return WSAGetLastError(); }
inline bool would_block_or_temporarily_unavailable(int errcode) { inline bool would_block_or_temporarily_unavailable(int errcode) {
...@@ -108,10 +108,10 @@ namespace network { ...@@ -108,10 +108,10 @@ namespace network {
constexpr int ec_out_of_memory = WSAENOBUFS; constexpr int ec_out_of_memory = WSAENOBUFS;
constexpr int ec_interrupted_syscall = WSAEINTR; constexpr int ec_interrupted_syscall = WSAEINTR;
#else #else
typedef int native_socket_t; using native_socket_t = int;
typedef const void* setsockopt_ptr; using setsockopt_ptr = const void*;
typedef const void* socket_send_ptr; using socket_send_ptr = const void*;
typedef void* socket_recv_ptr; using socket_recv_ptr = void*;
constexpr native_socket_t invalid_socket = -1; constexpr native_socket_t invalid_socket = -1;
inline void closesocket(native_socket_t fd) { close(fd); } inline void closesocket(native_socket_t fd) { close(fd); }
inline int last_socket_error() { return errno; } inline int last_socket_error() { return errno; }
......
...@@ -46,7 +46,7 @@ class sync_request_info : public extend<memory_managed>:: ...@@ -46,7 +46,7 @@ class sync_request_info : public extend<memory_managed>::
public: public:
typedef sync_request_info* pointer; using pointer = sync_request_info*;
~sync_request_info(); ~sync_request_info();
...@@ -62,7 +62,7 @@ class sync_request_info : public extend<memory_managed>:: ...@@ -62,7 +62,7 @@ class sync_request_info : public extend<memory_managed>::
class remote_actor_proxy : public actor_proxy { class remote_actor_proxy : public actor_proxy {
typedef actor_proxy super; using super = actor_proxy;
public: public:
......
...@@ -49,7 +49,7 @@ actor spawn_io_client(F fun, const std::string& host, ...@@ -49,7 +49,7 @@ actor spawn_io_client(F fun, const std::string& host,
auto hdl = network::conn_hdl_from_socket(sock); auto hdl = network::conn_hdl_from_socket(sock);
// provoke compiler error early // provoke compiler error early
using fun_res = decltype(fun((broker*) 0, hdl, std::forward<Ts>(args)...)); using fun_res = decltype(fun((broker*) 0, hdl, std::forward<Ts>(args)...));
// prevent warning about unused local typedef // prevent warning about unused local type
static_assert(std::is_same<fun_res, fun_res>::value, static_assert(std::is_same<fun_res, fun_res>::value,
"your compiler is lying to you"); "your compiler is lying to you");
return spawn_class<broker::functor_based>( return spawn_class<broker::functor_based>(
......
...@@ -36,7 +36,7 @@ struct typed_remote_actor_helper; ...@@ -36,7 +36,7 @@ struct typed_remote_actor_helper;
template<typename... Ts> template<typename... Ts>
struct typed_remote_actor_helper<detail::type_list<Ts...>> { struct typed_remote_actor_helper<detail::type_list<Ts...>> {
typedef typed_actor<Ts...> return_type; using return_type = typed_actor<Ts...>;
template<typename... Vs> template<typename... Vs>
return_type operator()(Vs&&... vs) { return_type operator()(Vs&&... vs) {
auto iface = return_type::get_interface(); auto iface = return_type::get_interface();
......
...@@ -59,13 +59,13 @@ class sync_handle_helper; ...@@ -59,13 +59,13 @@ class sync_handle_helper;
*/ */
class local_actor : public extend<abstract_actor>::with<mixin::memory_cached> { class local_actor : public extend<abstract_actor>::with<mixin::memory_cached> {
typedef combined_type super; using super = combined_type;
public: public:
typedef detail::disposer del; using del = detail::disposer;
typedef detail::single_reader_queue<mailbox_element, del> mailbox_type; using mailbox_type = detail::single_reader_queue<mailbox_element, del>;
~local_actor(); ~local_actor();
...@@ -546,7 +546,7 @@ class local_actor : public extend<abstract_actor>::with<mixin::memory_cached> { ...@@ -546,7 +546,7 @@ class local_actor : public extend<abstract_actor>::with<mixin::memory_cached> {
* @brief A smart pointer to a {@link local_actor} instance. * @brief A smart pointer to a {@link local_actor} instance.
* @relates local_actor * @relates local_actor
*/ */
typedef intrusive_ptr<local_actor> local_actor_ptr; using local_actor_ptr = intrusive_ptr<local_actor>;
/****************************************************************************** /******************************************************************************
* inline and template member function implementations * * inline and template member function implementations *
......
...@@ -31,7 +31,7 @@ namespace cppa { ...@@ -31,7 +31,7 @@ namespace cppa {
template<class Base, class Subtype> template<class Base, class Subtype>
class mailbox_based : public Base { class mailbox_based : public Base {
typedef detail::disposer del; using del = detail::disposer;
public: public:
...@@ -55,9 +55,9 @@ class mailbox_based : public Base { ...@@ -55,9 +55,9 @@ class mailbox_based : public Base {
protected: protected:
typedef mailbox_based combined_type; using combined_type = mailbox_based;
typedef detail::single_reader_queue<mailbox_element, del> mailbox_type; using mailbox_type = detail::single_reader_queue<mailbox_element, del>;
template<typename... Ts> template<typename... Ts>
mailbox_based(Ts&&... args) : Base(std::forward<Ts>(args)...) { } mailbox_based(Ts&&... args) : Base(std::forward<Ts>(args)...) { }
......
...@@ -34,8 +34,8 @@ namespace cppa { ...@@ -34,8 +34,8 @@ namespace cppa {
class local_actor; class local_actor;
class mailbox_element class mailbox_element : public extend<memory_managed>::
: public extend<memory_managed>::with<mixin::memory_cached> { with<mixin::memory_cached> {
friend class local_actor; friend class local_actor;
friend class detail::memory; friend class detail::memory;
...@@ -69,8 +69,10 @@ class mailbox_element ...@@ -69,8 +69,10 @@ class mailbox_element
}; };
typedef std::unique_ptr<mailbox_element, detail::disposer> using unique_mailbox_element_pointer = std::unique_ptr<
unique_mailbox_element_pointer; mailbox_element,
detail::disposer
>;
} // namespace cppa } // namespace cppa
......
This diff is collapsed.
...@@ -47,17 +47,17 @@ class message { ...@@ -47,17 +47,17 @@ class message {
/** /**
* @brief A raw pointer to the data. * @brief A raw pointer to the data.
*/ */
typedef detail::message_data* raw_ptr; using raw_ptr = detail::message_data*;
/** /**
* @brief A (COW) smart pointer to the data. * @brief A (COW) smart pointer to the data.
*/ */
typedef detail::message_data::ptr data_ptr; using data_ptr = detail::message_data::ptr;
/** /**
* @brief An iterator to access each element as <tt>const void*</tt>. * @brief An iterator to access each element as <tt>const void*</tt>.
*/ */
typedef detail::message_data::const_iterator const_iterator; using const_iterator = detail::message_data::const_iterator;
/** /**
* @brief Creates an empty tuple. * @brief Creates an empty tuple.
...@@ -247,8 +247,8 @@ typename std::enable_if< ...@@ -247,8 +247,8 @@ typename std::enable_if<
message>::type message>::type
make_message(T&& arg, Ts&&... args) { make_message(T&& arg, Ts&&... args) {
using namespace detail; using namespace detail;
typedef tuple_vals<typename strip_and_convert<T>::type, using data = tuple_vals<typename strip_and_convert<T>::type,
typename strip_and_convert<Ts>::type...> data; typename strip_and_convert<Ts>::type...>;
auto ptr = new data(std::forward<T>(arg), std::forward<Ts>(args)...); auto ptr = new data(std::forward<T>(arg), std::forward<Ts>(args)...);
return message{detail::message_data::ptr{ptr}}; return message{detail::message_data::ptr{ptr}};
} }
......
...@@ -124,7 +124,7 @@ class message_builder { ...@@ -124,7 +124,7 @@ class message_builder {
template<typename T> template<typename T>
message_builder& message_builder&
append_impl(typename detail::implicit_conversions<T>::type what) { append_impl(typename detail::implicit_conversions<T>::type what) {
typedef decltype(what) type; using type = decltype(what);
auto uti = uniform_typeid<type>(); auto uti = uniform_typeid<type>();
auto uval = uti->create(); auto uval = uti->create();
*reinterpret_cast<type*>(uval->val) = std::move(what); *reinterpret_cast<type*>(uval->val) = std::move(what);
......
...@@ -54,7 +54,7 @@ class message_handler { ...@@ -54,7 +54,7 @@ class message_handler {
/** @cond PRIVATE */ /** @cond PRIVATE */
typedef intrusive_ptr<detail::behavior_impl> impl_ptr; using impl_ptr = intrusive_ptr<detail::behavior_impl>;
inline auto as_behavior_impl() const -> impl_ptr; inline auto as_behavior_impl() const -> impl_ptr;
......
...@@ -34,21 +34,23 @@ namespace mixin { ...@@ -34,21 +34,23 @@ namespace mixin {
template<class Base, class Subtype, class BehaviorType> template<class Base, class Subtype, class BehaviorType>
class behavior_stack_based_impl : public single_timeout<Base, Subtype> { class behavior_stack_based_impl : public single_timeout<Base, Subtype> {
typedef single_timeout<Base, Subtype> super; using super = single_timeout<Base, Subtype>;
public: public:
/************************************************************************** /**************************************************************************
* typedefs and constructor * * types and constructor *
**************************************************************************/ **************************************************************************/
typedef BehaviorType behavior_type; using behavior_type = BehaviorType;
typedef behavior_stack_based_impl combined_type; using combined_type = behavior_stack_based_impl;
typedef response_handle<behavior_stack_based_impl, message, using response_handle_type = response_handle<
nonblocking_response_handle_tag> behavior_stack_based_impl,
response_handle_type; message,
nonblocking_response_handle_tag
>;
template<typename... Ts> template<typename... Ts>
behavior_stack_based_impl(Ts&&... vs) behavior_stack_based_impl(Ts&&... vs)
...@@ -158,11 +160,11 @@ class behavior_stack_based { ...@@ -158,11 +160,11 @@ class behavior_stack_based {
template<class Base, class Subtype> template<class Base, class Subtype>
class impl : public behavior_stack_based_impl<Base, Subtype, BehaviorType> { class impl : public behavior_stack_based_impl<Base, Subtype, BehaviorType> {
typedef behavior_stack_based_impl<Base, Subtype, BehaviorType> super; using super = behavior_stack_based_impl<Base, Subtype, BehaviorType>;
public: public:
typedef impl combined_type; using combined_type = impl;
template<typename... Ts> template<typename... Ts>
impl(Ts&&... args) impl(Ts&&... args)
......
...@@ -37,9 +37,9 @@ class functor_based : public Base { ...@@ -37,9 +37,9 @@ class functor_based : public Base {
template<typename F, typename... Ts> template<typename F, typename... Ts>
functor_based(F f, Ts&&... vs) { functor_based(F f, Ts&&... vs) {
typedef typename detail::get_callable_trait<F>::type trait; using trait = typename detail::get_callable_trait<F>::type;
typedef typename trait::arg_types arg_types; using arg_types = typename trait::arg_types;
typedef typename trait::result_type result_type; using result_type = typename trait::result_type;
constexpr bool returns_behavior = constexpr bool returns_behavior =
std::is_convertible<result_type, behavior>::value; std::is_convertible<result_type, behavior>::value;
constexpr bool uses_first_arg = std::is_same< constexpr bool uses_first_arg = std::is_same<
......
...@@ -32,7 +32,7 @@ namespace mixin { ...@@ -32,7 +32,7 @@ namespace mixin {
template<class Base, class Subtype> template<class Base, class Subtype>
class mailbox_based : public Base { class mailbox_based : public Base {
typedef detail::disposer del; using del = detail::disposer;
public: public:
...@@ -56,9 +56,9 @@ class mailbox_based : public Base { ...@@ -56,9 +56,9 @@ class mailbox_based : public Base {
protected: protected:
typedef mailbox_based combined_type; using combined_type = mailbox_based;
typedef detail::single_reader_queue<mailbox_element, del> mailbox_type; using mailbox_type = detail::single_reader_queue<mailbox_element, del>;
template<typename... Ts> template<typename... Ts>
mailbox_based(Ts&&... args) mailbox_based(Ts&&... args)
......
...@@ -41,7 +41,7 @@ class memory_cached : public Base { ...@@ -41,7 +41,7 @@ class memory_cached : public Base {
protected: protected:
typedef memory_cached combined_type; using combined_type = memory_cached;
public: public:
......
...@@ -32,11 +32,11 @@ namespace mixin { ...@@ -32,11 +32,11 @@ namespace mixin {
template<class Base, class Subtype> template<class Base, class Subtype>
class single_timeout : public Base { class single_timeout : public Base {
typedef Base super; using super = Base;
public: public:
typedef single_timeout combined_type; using combined_type = single_timeout;
template<typename... Ts> template<typename... Ts>
single_timeout(Ts&&... args) single_timeout(Ts&&... args)
......
...@@ -35,8 +35,11 @@ class sync_sender_impl : public Base { ...@@ -35,8 +35,11 @@ class sync_sender_impl : public Base {
public: public:
typedef response_handle<Subtype, message, ResponseHandleTag> using response_handle_type = response_handle<
response_handle_type; Subtype,
message,
ResponseHandleTag
>;
/************************************************************************** /**************************************************************************
* sync_send[_tuple](actor, ...) * * sync_send[_tuple](actor, ...) *
......
...@@ -74,7 +74,7 @@ class node_id : detail::comparable<node_id>, ...@@ -74,7 +74,7 @@ class node_id : detail::comparable<node_id>,
/** /**
* @brief Represents a 160 bit hash. * @brief Represents a 160 bit hash.
*/ */
typedef std::array<uint8_t, host_id_size> host_id_type; using host_id_type = std::array<uint8_t, host_id_size>;
/** /**
* @brief A reference counted container for host ID and process ID. * @brief A reference counted container for host ID and process ID.
......
...@@ -47,13 +47,13 @@ namespace detail { ...@@ -47,13 +47,13 @@ namespace detail {
template<bool IsFun, typename T> template<bool IsFun, typename T>
struct add_ptr_to_fun_ { struct add_ptr_to_fun_ {
typedef T* type; using type = T*;
}; };
template<typename T> template<typename T>
struct add_ptr_to_fun_<false, T> { struct add_ptr_to_fun_<false, T> {
typedef T type; using type = T;
}; };
...@@ -62,13 +62,13 @@ struct add_ptr_to_fun : add_ptr_to_fun_<std::is_function<T>::value, T> {}; ...@@ -62,13 +62,13 @@ struct add_ptr_to_fun : add_ptr_to_fun_<std::is_function<T>::value, T> {};
template<bool ToVoid, typename T> template<bool ToVoid, typename T>
struct to_void_impl { struct to_void_impl {
typedef unit_t type; using type = unit_t;
}; };
template<typename T> template<typename T>
struct to_void_impl<false, T> { struct to_void_impl<false, T> {
typedef typename add_ptr_to_fun<T>::type type; using type = typename add_ptr_to_fun<T>::type;
}; };
...@@ -137,13 +137,15 @@ struct tuple_maker { ...@@ -137,13 +137,15 @@ struct tuple_maker {
template<class Transformers, class Pattern> template<class Transformers, class Pattern>
struct rvalue_builder { struct rvalue_builder {
typedef typename detail::tl_back<Pattern>::type back_type; using back_type = typename detail::tl_back<Pattern>::type;
static constexpr bool is_complete = static constexpr bool is_complete =
!std::is_same<detail::arg_match_t, back_type>::value; !std::is_same<detail::arg_match_t, back_type>::value;
typedef typename detail::tl_apply<Transformers, std::tuple>::type using fun_container = typename detail::tl_apply<
fun_container; Transformers,
std::tuple
>::type;
fun_container m_funs; fun_container m_funs;
...@@ -161,11 +163,15 @@ struct rvalue_builder { ...@@ -161,11 +163,15 @@ struct rvalue_builder {
match_expr< match_expr<
typename get_case<is_complete, Expr, Transformers, Pattern>::type> typename get_case<is_complete, Expr, Transformers, Pattern>::type>
operator>>(Expr expr) const { operator>>(Expr expr) const {
typedef typename get_case<is_complete, Expr, Transformers, using lifted_expr = typename get_case<
Pattern>::type lifted_expr; is_complete,
Expr,
Transformers,
Pattern
>::type;
// adjust m_funs to exactly match expected projections in match case // adjust m_funs to exactly match expected projections in match case
typedef typename lifted_expr::projections_list target; using target = typename lifted_expr::projections_list;
typedef typename tl_trim<Transformers>::type trimmed_projections; using trimmed_projections = typename tl_trim<Transformers>::type;
tuple_maker f; tuple_maker f;
auto lhs = apply_args(f, get_indices(trimmed_projections{}), m_funs); auto lhs = apply_args(f, get_indices(trimmed_projections{}), m_funs);
typename tl_apply< typename tl_apply<
...@@ -186,26 +192,28 @@ struct rvalue_builder { ...@@ -186,26 +192,28 @@ struct rvalue_builder {
template<bool IsCallable, typename T> template<bool IsCallable, typename T>
struct pattern_type_ { struct pattern_type_ {
typedef detail::get_callable_trait<T> ctrait; using ctrait = detail::get_callable_trait<T>;
typedef typename ctrait::arg_types args; using args = typename ctrait::arg_types;
static_assert(detail::tl_size<args>::value == 1, static_assert(detail::tl_size<args>::value == 1,
"only unary functions allowed"); "only unary functions allowed");
typedef typename detail::rm_const_and_ref< using type = typename detail::rm_const_and_ref<
typename detail::tl_head<args>::type>::type type; typename detail::tl_head<args>::type
>::type;
}; };
template<typename T> template<typename T>
struct pattern_type_<false, T> { struct pattern_type_<false, T> {
typedef typename implicit_conversions<typename detail::rm_const_and_ref< using type = typename implicit_conversions<
typename detail::unboxed<T>::type>::type>::type type; typename detail::rm_const_and_ref<
typename detail::unboxed<T>::type
>::type
>::type;
}; };
template<typename T> template<typename T>
struct pattern_type struct pattern_type
: pattern_type_< : pattern_type_<
detail::is_callable<T>::value && !detail::is_boxed<T>::value, T> {}; detail::is_callable<T>::value && !detail::is_boxed<T>::value, T> { };
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
...@@ -283,7 +291,7 @@ constexpr typename detail::boxed<T>::type val() { ...@@ -283,7 +291,7 @@ constexpr typename detail::boxed<T>::type val() {
return typename detail::boxed<T>::type(); return typename detail::boxed<T>::type();
} }
typedef typename detail::boxed<detail::arg_match_t>::type boxed_arg_match_t; using boxed_arg_match_t = typename detail::boxed<detail::arg_match_t>::type;
constexpr boxed_arg_match_t arg_match = boxed_arg_match_t(); constexpr boxed_arg_match_t arg_match = boxed_arg_match_t();
...@@ -330,14 +338,17 @@ struct is_optional<optional<T>> : std::true_type {}; ...@@ -330,14 +338,17 @@ struct is_optional<optional<T>> : std::true_type {};
template<typename T> template<typename T>
struct to_guard<T, true> { struct to_guard<T, true> {
typedef typename detail::get_callable_trait<T>::type ct; using ct = typename detail::get_callable_trait<T>::type;
typedef typename ct::arg_types arg_types; using arg_types = typename ct::arg_types;
static_assert(detail::tl_size<arg_types>::value == 1, static_assert(detail::tl_size<arg_types>::value == 1,
"projection/guard must take exactly one argument"); "projection/guard must take exactly one argument");
static_assert(is_optional<typename ct::result_type>::value, static_assert(is_optional<typename ct::result_type>::value,
"projection/guard must return an optional value"); "projection/guard must return an optional value");
typedef typename std::conditional<std::is_function<T>::value, T*, T>::type using value_type = typename std::conditional<
value_type; std::is_function<T>::value,
T*,
T
>::type;
static value_type _(value_type val) { return val; } static value_type _(value_type val) { return val; }
}; };
...@@ -414,8 +425,12 @@ class on_the_fly_rvalue_builder { ...@@ -414,8 +425,12 @@ class on_the_fly_rvalue_builder {
match_expr<typename get_case<false, Expr, detail::empty_type_list, match_expr<typename get_case<false, Expr, detail::empty_type_list,
detail::empty_type_list>::type> detail::empty_type_list>::type>
operator>>(Expr expr) const { operator>>(Expr expr) const {
typedef typename get_case<false, Expr, detail::empty_type_list, using result_type = typename get_case<
detail::empty_type_list>::type result_type; false,
Expr,
detail::empty_type_list,
detail::empty_type_list
>::type;
return result_type{std::move(expr)}; return result_type{std::move(expr)};
} }
......
...@@ -39,13 +39,13 @@ namespace detail { ...@@ -39,13 +39,13 @@ namespace detail {
// converts C arrays, i.e., pointers, to vectors // converts C arrays, i.e., pointers, to vectors
template<typename T> template<typename T>
struct carr_to_vec { struct carr_to_vec {
typedef T type; using type = T;
}; };
template<typename T> template<typename T>
struct carr_to_vec<T*> { struct carr_to_vec<T*> {
typedef std::vector<T> type; using type = std::vector<T>;
}; };
...@@ -146,8 +146,8 @@ spawn_cl(const opencl::program& prog, const char* fname, MapArgs map_args, ...@@ -146,8 +146,8 @@ spawn_cl(const opencl::program& prog, const char* fname, MapArgs map_args,
const opencl::dim_vec& offset = {}, const opencl::dim_vec& offset = {},
const opencl::dim_vec& local_dims = {}, size_t result_size = 0) { const opencl::dim_vec& local_dims = {}, size_t result_size = 0) {
using std::move; using std::move;
typedef typename util::get_callable_trait<MapArgs>::fun_type f0; using f0 = typename util::get_callable_trait<MapArgs>::fun_type;
typedef typename util::get_callable_trait<MapResult>::fun_type f1; using f1 = typename util::get_callable_trait<MapResult>::fun_type;
detail::cl_spawn_helper<f0, f1> f; detail::cl_spawn_helper<f0, f1> f;
return f(f0{move(map_args)}, f1{move(map_result)}, prog, fname, dims, return f(f0{move(map_args)}, f1{move(map_result)}, prog, fname, dims,
offset, local_dims, result_size); offset, local_dims, result_size);
......
...@@ -68,11 +68,10 @@ class actor_facade<Ret(Args...)> : public abstract_actor { ...@@ -68,11 +68,10 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
public: public:
typedef cow_tuple<typename detail::rm_const_and_ref<Args>::type...> using args_tuple = cow_tuple<typename detail::rm_const_and_ref<Args>::type...>;
args_tuple;
typedef std::function<optional<args_tuple>(message)> arg_mapping; using arg_mapping = std::function<optional<args_tuple>(message)>;
typedef std::function<message(Ret&)> result_mapping; using result_mapping = std::function<message(Ret&)>;
static intrusive_ptr<actor_facade> static intrusive_ptr<actor_facade>
create(const program& prog, const char* kernel_name, create(const program& prog, const char* kernel_name,
......
...@@ -48,7 +48,7 @@ namespace opencl { ...@@ -48,7 +48,7 @@ namespace opencl {
/** /**
* @brief A vector of up to three elements used for OpenCL dimensions. * @brief A vector of up to three elements used for OpenCL dimensions.
*/ */
typedef detail::limited_vector<size_t, 3> dim_vec; using dim_vec = detail::limited_vector<size_t, 3>;
std::string get_opencl_error(cl_int err); std::string get_opencl_error(cl_int err);
......
...@@ -42,12 +42,12 @@ namespace opencl { ...@@ -42,12 +42,12 @@ namespace opencl {
template<typename T, cl_int (*ref)(T), cl_int (*deref)(T)> template<typename T, cl_int (*ref)(T), cl_int (*deref)(T)>
class smart_ptr { class smart_ptr {
typedef typename std::remove_pointer<T>::type element_type; using element_type = typename std::remove_pointer<T>::type;
typedef element_type* pointer; using pointer = element_type* ;
typedef element_type& reference; using reference = element_type& ;
typedef const element_type* const_pointer; using const_pointer = const element_type*;
typedef const element_type& const_reference; using const_reference = const element_type&;
public: public:
...@@ -110,11 +110,11 @@ class smart_ptr { ...@@ -110,11 +110,11 @@ class smart_ptr {
}; };
typedef smart_ptr<cl_mem, clRetainMemObject, clReleaseMemObject> mem_ptr; using mem_ptr = smart_ptr<cl_mem, clRetainMemObject, clReleaseMemObject>;
typedef smart_ptr<cl_event, clRetainEvent, clReleaseEvent> event_ptr; using event_ptr = smart_ptr<cl_event, clRetainEvent, clReleaseEvent> ;
typedef smart_ptr<cl_kernel, clRetainKernel, clReleaseKernel> kernel_ptr; using kernel_ptr = smart_ptr<cl_kernel, clRetainKernel, clReleaseKernel> ;
typedef smart_ptr<cl_context, clRetainContext, clReleaseContext> context_ptr; using context_ptr = smart_ptr<cl_context, clRetainContext, clReleaseContext>;
typedef smart_ptr<cl_program, clRetainProgram, clReleaseProgram> program_ptr; using program_ptr = smart_ptr<cl_program, clRetainProgram, clReleaseProgram>;
typedef smart_ptr<cl_device_id, clRetainDeviceDummy, clReleaseDeviceDummy> typedef smart_ptr<cl_device_id, clRetainDeviceDummy, clReleaseDeviceDummy>
device_ptr; device_ptr;
typedef smart_ptr<cl_command_queue, clRetainCommandQueue, clReleaseCommandQueue> typedef smart_ptr<cl_command_queue, clRetainCommandQueue, clReleaseCommandQueue>
......
...@@ -40,7 +40,7 @@ class optional { ...@@ -40,7 +40,7 @@ class optional {
/** /**
* @brief Typdef for @p T. * @brief Typdef for @p T.
*/ */
typedef T type; using type = T;
/* * /* *
* @brief Default constructor. * @brief Default constructor.
...@@ -199,7 +199,7 @@ class optional<T&> { ...@@ -199,7 +199,7 @@ class optional<T&> {
public: public:
typedef T type; using type = T;
optional(const none_t& = none) : m_value(nullptr) { } optional(const none_t& = none) : m_value(nullptr) { }
......
...@@ -66,10 +66,17 @@ struct option_info { ...@@ -66,10 +66,17 @@ struct option_info {
/** /**
* @brief Stores a help text for program options with option groups. * @brief Stores a help text for program options with option groups.
*/ */
typedef std::map<std::string, std::map<std::pair<char, std::string>, option_info>> using options_description = std::map<
options_description; std::string,
std::map<
using opt_rvalue_builder = decltype(on(std::function<optional<std::string> (const std::string&)>{}) || on(std::string{}, val<std::string>)); std::pair<char, std::string>,
option_info
>
>;
using opt_rvalue_builder = decltype( on(std::function<optional<std::string>
(const std::string&)>{})
|| on(std::string{}, val<std::string>));
using opt0_rvalue_builder = decltype(on(std::string{}) || on(std::string{})); using opt0_rvalue_builder = decltype(on(std::string{}) || on(std::string{}));
......
...@@ -60,7 +60,7 @@ enum handle_message_result { ...@@ -60,7 +60,7 @@ enum handle_message_result {
template<receive_policy_flag X> template<receive_policy_flag X>
struct rp_flag { struct rp_flag {
typedef std::integral_constant<receive_policy_flag, X> type; using type = std::integral_constant<receive_policy_flag, X>;
}; };
/** /**
...@@ -103,9 +103,9 @@ class invoke_policy { ...@@ -103,9 +103,9 @@ class invoke_policy {
return result; return result;
} }
typedef typename rp_flag<rp_nestable>::type nestable; using nestable = typename rp_flag<rp_nestable>::type;
typedef typename rp_flag<rp_sequential>::type sequential; using sequential = typename rp_flag<rp_sequential>::type;
private: private:
......
...@@ -42,7 +42,7 @@ class middleman_scheduling { ...@@ -42,7 +42,7 @@ class middleman_scheduling {
public: public:
typedef intrusive_ptr<Actor> pointer; using pointer = intrusive_ptr<Actor>;
continuation(pointer ptr, msg_hdr_cref hdr, message&& msg) continuation(pointer ptr, msg_hdr_cref hdr, message&& msg)
: m_self(std::move(ptr)), m_hdr(hdr), m_data(std::move(msg)) { } : m_self(std::move(ptr)), m_hdr(hdr), m_data(std::move(msg)) { }
......
...@@ -41,11 +41,11 @@ namespace policy { ...@@ -41,11 +41,11 @@ namespace policy {
class no_scheduling { class no_scheduling {
typedef std::unique_lock<std::mutex> lock_type; using lock_type = std::unique_lock<std::mutex>;
public: public:
typedef std::chrono::high_resolution_clock::time_point timeout_type; using timeout_type = std::chrono::high_resolution_clock::time_point;
template<class Actor> template<class Actor>
void enqueue(Actor* self, const actor_addr& sender, message_id mid, void enqueue(Actor* self, const actor_addr& sender, message_id mid,
......
...@@ -33,9 +33,9 @@ class not_prioritizing { ...@@ -33,9 +33,9 @@ class not_prioritizing {
public: public:
typedef std::list<unique_mailbox_element_pointer> cache_type; using cache_type = std::list<unique_mailbox_element_pointer>;
typedef cache_type::iterator cache_iterator; using cache_iterator = cache_type::iterator;
template<class Actor> template<class Actor>
unique_mailbox_element_pointer next_message(Actor* self) { unique_mailbox_element_pointer next_message(Actor* self) {
......
...@@ -28,10 +28,10 @@ class policies { ...@@ -28,10 +28,10 @@ class policies {
public: public:
typedef SchedulingPolicy scheduling_policy; using scheduling_policy = SchedulingPolicy;
typedef PriorityPolicy priority_policy; using priority_policy = PriorityPolicy;
typedef ResumePolicy resume_policy; using resume_policy = ResumePolicy;
typedef InvokePolicy invoke_policy; using invoke_policy = InvokePolicy;
scheduling_policy& get_scheduling_policy() { return m_scheduling_policy; } scheduling_policy& get_scheduling_policy() { return m_scheduling_policy; }
......
...@@ -33,9 +33,9 @@ class prioritizing { ...@@ -33,9 +33,9 @@ class prioritizing {
public: public:
typedef std::list<unique_mailbox_element_pointer> cache_type; using cache_type = std::list<unique_mailbox_element_pointer>;
typedef cache_type::iterator cache_iterator; using cache_iterator = cache_type::iterator;
template<class Actor> template<class Actor>
unique_mailbox_element_pointer next_message(Actor* self) { unique_mailbox_element_pointer next_message(Actor* self) {
......
...@@ -50,9 +50,9 @@ class priority_policy { ...@@ -50,9 +50,9 @@ class priority_policy {
void push_to_cache(unique_mailbox_element_pointer ptr); void push_to_cache(unique_mailbox_element_pointer ptr);
typedef std::vector<unique_mailbox_element_pointer> cache_type; using cache_type = std::vector<unique_mailbox_element_pointer>;
typedef cache_type::iterator cache_iterator; using cache_iterator = cache_type::iterator;
cache_iterator cache_begin(); cache_iterator cache_begin();
......
...@@ -42,7 +42,7 @@ class scheduling_policy { ...@@ -42,7 +42,7 @@ class scheduling_policy {
public: public:
/** /**
* @brief This typedef can be set freely by any implementation and is * @brief This type can be set freely by any implementation and is
* used by callers to pass the result of @p init_timeout back to * used by callers to pass the result of @p init_timeout back to
* @p fetch_messages. * @p fetch_messages.
*/ */
......
...@@ -32,9 +32,23 @@ ...@@ -32,9 +32,23 @@
namespace cppa { namespace cppa {
typedef variant<int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, using primitive_variant = variant<
uint64_t, float, double, long double, std::string, int8_t,
std::u16string, std::u32string, atom_value> primitive_variant; int16_t,
int32_t,
int64_t,
uint8_t,
uint16_t,
uint32_t,
uint64_t,
float,
double,
long double,
std::string,
std::u16string,
std::u32string,
atom_value
>;
} // namespace cppa } // namespace cppa
......
...@@ -35,7 +35,7 @@ class actor_widget_mixin : public Base { ...@@ -35,7 +35,7 @@ class actor_widget_mixin : public Base {
public: public:
typedef typename actor_companion::message_pointer message_pointer; using message_pointer = typename actor_companion::message_pointer;
struct event_type : public QEvent { struct event_type : public QEvent {
......
...@@ -27,8 +27,8 @@ template<typename... Is> ...@@ -27,8 +27,8 @@ template<typename... Is>
struct replies_to { struct replies_to {
template<typename... Os> template<typename... Os>
struct with { struct with {
typedef detail::type_list<Is...> input_types; using input_types = detail::type_list<Is...>;
typedef detail::type_list<Os...> output_types; using output_types = detail::type_list<Os...>;
}; };
}; };
......
...@@ -192,7 +192,7 @@ class response_handle<Self, detail::type_list<Ts...>, ...@@ -192,7 +192,7 @@ class response_handle<Self, detail::type_list<Ts...>,
public: public:
typedef detail::type_list<Ts...> result_types; using result_types = detail::type_list<Ts...>;
response_handle() = delete; response_handle() = delete;
...@@ -202,14 +202,17 @@ class response_handle<Self, detail::type_list<Ts...>, ...@@ -202,14 +202,17 @@ class response_handle<Self, detail::type_list<Ts...>,
template<typename F> template<typename F>
void await(F fun) { void await(F fun) {
typedef typename detail::tl_map< using arg_types = typename detail::tl_map<
typename detail::get_callable_trait<F>::arg_types, typename detail::get_callable_trait<F>::arg_types,
detail::rm_const_and_ref>::type arg_types; detail::rm_const_and_ref
>::type;
static constexpr size_t fun_args = detail::tl_size<arg_types>::value; static constexpr size_t fun_args = detail::tl_size<arg_types>::value;
static_assert(fun_args <= detail::tl_size<result_types>::value, static_assert(fun_args <= detail::tl_size<result_types>::value,
"functor takes too much arguments"); "functor takes too much arguments");
typedef typename detail::tl_right<result_types, fun_args>::type using recv_types = typename detail::tl_right<
recv_types; result_types,
fun_args
>::type;
static_assert(std::is_same<arg_types, recv_types>::value, static_assert(std::is_same<arg_types, recv_types>::value,
"wrong functor signature"); "wrong functor signature");
behavior tmp = detail::fs2bhvr(m_self, fun); behavior tmp = detail::fs2bhvr(m_self, fun);
......
...@@ -40,7 +40,7 @@ class sb_actor : public Base { ...@@ -40,7 +40,7 @@ class sb_actor : public Base {
protected: protected:
typedef sb_actor combined_type; using combined_type = sb_actor;
public: public:
......
...@@ -82,9 +82,9 @@ class worker : public execution_unit { ...@@ -82,9 +82,9 @@ class worker : public execution_unit {
worker& operator=(const worker&) = delete; worker& operator=(const worker&) = delete;
typedef resumable* job_ptr; using job_ptr = resumable*;
typedef detail::producer_consumer_list<resumable> job_queue; using job_queue = detail::producer_consumer_list<resumable>;
/** /**
* @brief Attempt to steal an element from the exposed job queue. * @brief Attempt to steal an element from the exposed job queue.
......
...@@ -33,11 +33,11 @@ namespace cppa { ...@@ -33,11 +33,11 @@ namespace cppa {
template<class Base, class Subtype> template<class Base, class Subtype>
class single_timeout : public Base { class single_timeout : public Base {
typedef Base super; using super = Base;
public: public:
typedef single_timeout combined_type; using combined_type = single_timeout;
template<typename... Ts> template<typename... Ts>
single_timeout(Ts&&... args) single_timeout(Ts&&... args)
......
...@@ -88,7 +88,7 @@ struct spawn_fwd { ...@@ -88,7 +88,7 @@ struct spawn_fwd {
template<typename T, typename... Ts> template<typename T, typename... Ts>
struct spawn_fwd<T(Ts...)> { struct spawn_fwd<T(Ts...)> {
typedef T (*fun_pointer)(Ts...); using fun_pointer = T (*)(Ts...);
static inline fun_pointer fwd(fun_pointer arg) { return arg; } static inline fun_pointer fwd(fun_pointer arg) { return arg; }
}; };
...@@ -114,9 +114,9 @@ intrusive_ptr<C> spawn_class(execution_unit* eu, BeforeLaunch before_launch_fun, ...@@ -114,9 +114,9 @@ intrusive_ptr<C> spawn_class(execution_unit* eu, BeforeLaunch before_launch_fun,
template<spawn_options Os, typename BeforeLaunch, typename F, typename... Ts> template<spawn_options Os, typename BeforeLaunch, typename F, typename... Ts>
actor spawn_functor(execution_unit* eu, BeforeLaunch cb, F fun, Ts&&... args) { actor spawn_functor(execution_unit* eu, BeforeLaunch cb, F fun, Ts&&... args) {
typedef typename detail::get_callable_trait<F>::type trait; using trait = typename detail::get_callable_trait<F>::type;
typedef typename trait::arg_types arg_types; using arg_types = typename trait::arg_types;
typedef typename detail::tl_head<arg_types>::type first_arg; using first_arg = typename detail::tl_head<arg_types>::type;
using base_class = typename std::conditional< using base_class = typename std::conditional<
std::is_pointer<first_arg>::value, std::is_pointer<first_arg>::value,
typename std::remove_pointer<first_arg>::type, typename std::remove_pointer<first_arg>::type,
...@@ -199,22 +199,22 @@ namespace detail { ...@@ -199,22 +199,22 @@ namespace detail {
template<typename... Rs> template<typename... Rs>
class functor_based_typed_actor : public typed_event_based_actor<Rs...> { class functor_based_typed_actor : public typed_event_based_actor<Rs...> {
typedef typed_event_based_actor<Rs...> super; using super = typed_event_based_actor<Rs...>;
public: public:
typedef typed_event_based_actor<Rs...>* pointer; using pointer = typed_event_based_actor<Rs...>*;
typedef typename super::behavior_type behavior_type; using behavior_type = typename super::behavior_type;
typedef std::function<behavior_type()> no_arg_fun; using no_arg_fun = std::function<behavior_type()>;
typedef std::function<behavior_type(pointer)> one_arg_fun1; using one_arg_fun1 = std::function<behavior_type(pointer)>;
typedef std::function<void(pointer)> one_arg_fun2; using one_arg_fun2 = std::function<void(pointer)>;
template<typename F, typename... Ts> template<typename F, typename... Ts>
functor_based_typed_actor(F fun, Ts&&... args) { functor_based_typed_actor(F fun, Ts&&... args) {
typedef typename detail::get_callable_trait<F>::type trait; using trait = typename detail::get_callable_trait<F>::type;
typedef typename trait::arg_types arg_types; using arg_types = typename trait::arg_types;
typedef typename trait::result_type result_type; using result_type = typename trait::result_type;
constexpr bool returns_behavior = constexpr bool returns_behavior =
std::is_same<result_type, behavior_type>::value; std::is_same<result_type, behavior_type>::value;
constexpr bool uses_first_arg = std::is_same< constexpr bool uses_first_arg = std::is_same<
...@@ -276,13 +276,13 @@ struct infer_typed_actor_base; ...@@ -276,13 +276,13 @@ struct infer_typed_actor_base;
template<typename... Rs, class FirstArg> template<typename... Rs, class FirstArg>
struct infer_typed_actor_base<typed_behavior<Rs...>, FirstArg> { struct infer_typed_actor_base<typed_behavior<Rs...>, FirstArg> {
typedef functor_based_typed_actor<Rs...> type; using type = functor_based_typed_actor<Rs...>;
}; };
template<typename... Rs> template<typename... Rs>
struct infer_typed_actor_base<void, typed_event_based_actor<Rs...>*> { struct infer_typed_actor_base<void, typed_event_based_actor<Rs...>*> {
typedef functor_based_typed_actor<Rs...> type; using type = functor_based_typed_actor<Rs...>;
}; };
...@@ -308,10 +308,12 @@ typename detail::infer_typed_actor_handle< ...@@ -308,10 +308,12 @@ typename detail::infer_typed_actor_handle<
typename detail::tl_head< typename detail::tl_head<
typename detail::get_callable_trait<F>::arg_types>::type>::type typename detail::get_callable_trait<F>::arg_types>::type>::type
spawn_typed_functor(execution_unit* eu, BeforeLaunch bl, F fun, Ts&&... args) { spawn_typed_functor(execution_unit* eu, BeforeLaunch bl, F fun, Ts&&... args) {
typedef typename detail::infer_typed_actor_base< using impl = typename detail::infer_typed_actor_base<
typename detail::get_callable_trait<F>::result_type, typename detail::get_callable_trait<F>::result_type,
typename detail::tl_head<typename detail::get_callable_trait< typename detail::tl_head<
F>::arg_types>::type>::type impl; typename detail::get_callable_trait<F>::arg_types
>::type
>::type;
return spawn_class<impl, Os>(eu, bl, fun, std::forward<Ts>(args)...); return spawn_class<impl, Os>(eu, bl, fun, std::forward<Ts>(args)...);
} }
......
...@@ -81,14 +81,14 @@ struct infer_typed_actor_handle; ...@@ -81,14 +81,14 @@ struct infer_typed_actor_handle;
// infer actor type from result type if possible // infer actor type from result type if possible
template<typename... Rs, class FirstArg> template<typename... Rs, class FirstArg>
struct infer_typed_actor_handle<typed_behavior<Rs...>, FirstArg> { struct infer_typed_actor_handle<typed_behavior<Rs...>, FirstArg> {
typedef typed_actor<Rs...> type; using type = typed_actor<Rs...>;
}; };
// infer actor type from first argument if result type is void // infer actor type from first argument if result type is void
template<typename... Rs> template<typename... Rs>
struct infer_typed_actor_handle<void, typed_event_based_actor<Rs...>*> { struct infer_typed_actor_handle<void, typed_event_based_actor<Rs...>*> {
typedef typed_actor<Rs...> type; using type = typed_actor<Rs...>;
}; };
...@@ -97,7 +97,7 @@ struct actor_handle_from_signature_list; ...@@ -97,7 +97,7 @@ struct actor_handle_from_signature_list;
template<typename... Rs> template<typename... Rs>
struct actor_handle_from_signature_list<detail::type_list<Rs...>> { struct actor_handle_from_signature_list<detail::type_list<Rs...>> {
typedef typed_actor<Rs...> type; using type = typed_actor<Rs...>;
}; };
......
...@@ -93,7 +93,7 @@ typename std::enable_if< ...@@ -93,7 +93,7 @@ typename std::enable_if<
bool bool
>::type >::type
safe_equal(const T& lhs, const U& rhs) { safe_equal(const T& lhs, const U& rhs) {
typedef decltype(lhs - rhs) res_type; using res_type = decltype(lhs - rhs);
return std::fabs(lhs - rhs) <= std::numeric_limits<res_type>::epsilon(); return std::fabs(lhs - rhs) <= std::numeric_limits<res_type>::epsilon();
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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