diff --git a/README.md b/README.md index 339e7bc..ce5dc6d 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ leveraged by this project: | Concatenation of array | C++17 | [`include/forfun/array_concatenation.hpp`](include/forfun/array_concatenation.hpp) | | Contains duplicate | C++20 | [`include/forfun/contains_duplicate.hpp`](include/forfun/contains_duplicate.hpp) | | Depth-first search | C++20 | [`include/forfun/graph/depth_first_search.hpp`](include/forfun/graph/depth_first_search.hpp) | -| Evaluate reverse polish notation | C++20 | [`include/forfun/evaluate_reverse_polish_notation.hpp`](include/forfun/evaluate_reverse_polish_notation.hpp) | +| Evaluate reverse polish notation | C++23 | [`include/forfun/evaluate_reverse_polish_notation.hpp`](include/forfun/evaluate_reverse_polish_notation.hpp) | | Factorial | C++23 | [`include/forfun/factorial.hpp`](include/forfun/factorial.hpp) | | Fibonacci sequence | C++20 | [`include/forfun/fibonacci_sequence.hpp`](include/forfun/fibonacci_sequence.hpp) | | First missing positive | C++20 | [`include/forfun/first_missing_positive.hpp`](include/forfun/first_missing_positive.hpp) | diff --git a/include/forfun/evaluate_reverse_polish_notation.hpp b/include/forfun/evaluate_reverse_polish_notation.hpp index f1ab014..f1d6846 100644 --- a/include/forfun/evaluate_reverse_polish_notation.hpp +++ b/include/forfun/evaluate_reverse_polish_notation.hpp @@ -156,7 +156,7 @@ template <std::contiguous_iterator Iter, std::sentinel_for<Iter> Sentinel> accumulator /= operand_2; break; default: - assert(false); + std::unreachable(); } } } @@ -224,7 +224,7 @@ template <std::contiguous_iterator Iter, std::sentinel_for<Iter> Sentinel> accumulator /= operand_2; break; default: - assert(false); + std::unreachable(); } } }