From a04d12cbf7150501110b27365bbaedfee32b0fa2 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Thu, 4 Jan 2024 12:03:57 +0700 Subject: [PATCH] fix: undefine `nil` macro to prevent conflicting name --- include/errors/error.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/errors/error.hpp b/include/errors/error.hpp index ec7a1d7..3638873 100644 --- a/include/errors/error.hpp +++ b/include/errors/error.hpp @@ -6,6 +6,10 @@ #include #include +// Prevent conflicting name with the nil macro in Objective-C. +// See: https://github.com/threeal/errors-cpp/issues/128 +#undef nil + namespace errors { /** @@ -78,7 +82,6 @@ class [[nodiscard]] Error { */ Error make(std::string_view msg); - /** * @brief Gets a constant reference of an empty error. * @return A constant reference of an empty error.