Skip to content

Commit

Permalink
Remove code that was commented out
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzicheng1987 committed Dec 17, 2024
1 parent 8076d16 commit 850990a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions include/rfl/Result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,22 +316,18 @@ class Result {
}

T& get_t() noexcept {
// return *internal::ptr_cast<T*>(t_or_err_.data());
return *std::launder(reinterpret_cast<T*>(t_or_err_.data()));
}

const T& get_t() const noexcept {
// return *internal::ptr_cast<const T*>(t_or_err_.data());
return *std::launder(reinterpret_cast<const T*>(t_or_err_.data()));
}

Error& get_err() noexcept {
// return *internal::ptr_cast<Error*>(t_or_err_.data());
return *std::launder(reinterpret_cast<Error*>(t_or_err_.data()));
}

const Error& get_err() const noexcept {
// return *internal::ptr_cast<const Error*>(t_or_err_.data());
return *std::launder(reinterpret_cast<const Error*>(t_or_err_.data()));
}

Expand Down

0 comments on commit 850990a

Please sign in to comment.