protected:
template <class T, class... Args> T* new_context(Args&&... args)
{
- T* context = new T(std::forward<Args>(args)...);
+ auto* context = new T(std::forward<Args>(args)...);
context->declare_context(sizeof(T));
return context;
}
bool wannadie() const { return iwannadie_; }
void set_wannadie(bool value = true) { iwannadie_ = value; }
- void operator()() { code_(); }
+ void operator()() const { code_(); }
bool has_code() const { return static_cast<bool>(code_); }
- actor::ActorImpl* get_actor() { return this->actor_; }
+ actor::ActorImpl* get_actor() const { return this->actor_; }
// Scheduling methods
virtual void stop();