From 1a28ac59192f42d1f4566175382d5d0421cec62b Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Thu, 4 Jan 2024 12:01:21 +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..7cfb53a 100644 --- a/include/errors/error.hpp +++ b/include/errors/error.hpp @@ -6,6 +6,10 @@ #include #include +// Prevent conflicting name with nil macros 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.