Solved: 32 - Constexpr and Nullptr

This commit is contained in:
2026-08-17 21:38:41 +03:00
parent 8807a9228c
commit 2ec26ecd04
2 changed files with 1 additions and 5 deletions
@@ -7,7 +7,7 @@ namespace cpp11 {
enum class Color { Red, Green, Blue };
[[nodiscard]] auto to_index(Color color) -> int;
[[nodiscard]] auto square(int value) -> int;
[[nodiscard]] constexpr auto square(const int value) -> int { return value * value; }
[[nodiscard]] auto find_null(int* ptr) -> int*;
} // namespace cpp11
@@ -11,10 +11,6 @@ auto to_index(const Color color) -> int {
return -1;
}
auto square(const int value) -> int {
return value * value;
}
auto find_null(int* ptr) -> int* {
return ptr;
}