diff --git a/include/return_types.hpp b/include/return_types.hpp index 28cdca5..f7e7f03 100644 --- a/include/return_types.hpp +++ b/include/return_types.hpp @@ -39,7 +39,7 @@ using std::string_view; * | --------: |:-------------------------------------------------------------| * | 0 | No error. | */ -struct answer +struct answer_type { /*! * @brief @ref error "Error code". @@ -85,7 +85,8 @@ struct answer * * @since 0.1.0 */ - friend std::ostream &operator <<(std::ostream &out, const answer &answer); + friend std::ostream &operator <<(std::ostream &out, + const answer_type &answer); }; } // namespace mastodonpp diff --git a/src/return_types.cpp b/src/return_types.cpp index 6367f7c..3a7b30f 100644 --- a/src/return_types.cpp +++ b/src/return_types.cpp @@ -19,17 +19,17 @@ namespace mastodonpp { -answer::operator bool() const +answer_type::operator bool() const { return (error_code == 0); } -answer::operator string_view() const +answer_type::operator string_view() const { return body; } -std::ostream &operator <<(std::ostream &out, const answer &answer) +std::ostream &operator <<(std::ostream &out, const answer_type &answer) { out << answer.body; return out;