Skip to content

Commit

Permalink
make gcc happy
Browse files Browse the repository at this point in the history
  • Loading branch information
hrzlgnm committed Dec 28, 2024
1 parent 3e9706f commit 0438263
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions source/object/object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ struct object
return static_cast<const T*>(this);
}

template<>
[[nodiscard]] auto as() const -> const hashable*
{
return dynamic_cast<const hashable*>(this);
}

[[nodiscard]] virtual auto cast_to(object_type /*type*/) const -> const object* { return nullptr; }

[[nodiscard]] auto is_error() const -> bool { return type() == object_type::error; }
Expand Down Expand Up @@ -130,6 +124,12 @@ struct object
[[nodiscard]] virtual auto operator>>(const object& /*other*/) const -> const object* { return nullptr; }
};

template<>
[[nodiscard]] inline auto object::as() const -> const hashable*
{
return dynamic_cast<const hashable*>(this);
}

auto operator<<(std::ostream& ostrm, object::object_type type) -> std::ostream&;

template<>
Expand Down

0 comments on commit 0438263

Please sign in to comment.