Skip to content

Commit

Permalink
Fixes #676: Was not returning a value from optional::value_or() in …
Browse files Browse the repository at this point in the history
…our optional implementation for pre-C++17 compilation
  • Loading branch information
eyalroz committed Sep 7, 2024
1 parent b2e023c commit fd49e5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cuda/api/detail/optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ struct poor_mans_optional {
template<typename U>
T value_or(U&& fallback_value)
{
has_value_ ? maybe_value.value : static_cast<T>(::std::forward<U>(fallback_value));
return has_value_ ? maybe_value.value : static_cast<T>(::std::forward<U>(fallback_value));
}

T& operator*() noexcept { return maybe_value.value; }
Expand Down

0 comments on commit fd49e5a

Please sign in to comment.