Skip to content

Commit

Permalink
Move State operator<< to correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
dziegel committed Aug 23, 2024
1 parent fb7aaee commit 5666088
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/cpp_event_framework/Statemachine.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,14 @@ public:
return name_;
}

/**
* @brief Stream operator for logging
*/
friend inline std::ostream& operator<<(std::ostream& os, StateRef state)
{
return os << state.Name();
}

protected:
/**
* @brief Construct a new Statemachine State object
Expand All @@ -329,14 +337,6 @@ public:
const char* name_ = "Unnamed";
};

/**
* @brief Stream operator for logging
*/
friend inline std::ostream& operator<<(std::ostream& os, StateRef state)
{
return os << state.Name();
}

/**
* @brief History statemachine state
*
Expand Down

0 comments on commit 5666088

Please sign in to comment.