From b3b9d5fda6c7f53b069848e7e79454f3618ca356 Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Thu, 23 Nov 2023 00:06:09 -0600 Subject: [PATCH 1/2] Remove CPPTRACE_EXPORT from nullable --- include/cpptrace/cpptrace.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cpptrace/cpptrace.hpp b/include/cpptrace/cpptrace.hpp index b35bed1..27b626b 100644 --- a/include/cpptrace/cpptrace.hpp +++ b/include/cpptrace/cpptrace.hpp @@ -90,7 +90,7 @@ namespace cpptrace { // This is used over std::optional because the library is C++11 and also std::optional is a bit heavy-duty for this // use. template::value, int>::type = 0> - struct CPPTRACE_EXPORT nullable { + struct nullable { T raw_value; nullable& operator=(T value) { raw_value = value; From 07dea09dfc80d5bd3a8c10b1d265a38bb6b158b9 Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Sun, 3 Dec 2023 13:14:35 -0500 Subject: [PATCH 2/2] Add CPPTRACE_EXPORT tags to exception classes --- include/cpptrace/cpptrace.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/cpptrace/cpptrace.hpp b/include/cpptrace/cpptrace.hpp index 27b626b..156e348 100644 --- a/include/cpptrace/cpptrace.hpp +++ b/include/cpptrace/cpptrace.hpp @@ -312,55 +312,55 @@ namespace cpptrace { const char* message() const noexcept override; }; - class logic_error : public exception_with_message { + class CPPTRACE_EXPORT logic_error : public exception_with_message { public: explicit logic_error(std::string&& message_arg) noexcept : exception_with_message(std::move(message_arg), 1) {} }; - class domain_error : public exception_with_message { + class CPPTRACE_EXPORT domain_error : public exception_with_message { public: explicit domain_error(std::string&& message_arg) noexcept : exception_with_message(std::move(message_arg), 1) {} }; - class invalid_argument : public exception_with_message { + class CPPTRACE_EXPORT invalid_argument : public exception_with_message { public: explicit invalid_argument(std::string&& message_arg) noexcept : exception_with_message(std::move(message_arg), 1) {} }; - class length_error : public exception_with_message { + class CPPTRACE_EXPORT length_error : public exception_with_message { public: explicit length_error(std::string&& message_arg) noexcept : exception_with_message(std::move(message_arg), 1) {} }; - class out_of_range : public exception_with_message { + class CPPTRACE_EXPORT out_of_range : public exception_with_message { public: explicit out_of_range(std::string&& message_arg) noexcept : exception_with_message(std::move(message_arg), 1) {} }; - class runtime_error : public exception_with_message { + class CPPTRACE_EXPORT runtime_error : public exception_with_message { public: explicit runtime_error(std::string&& message_arg) noexcept : exception_with_message(std::move(message_arg), 1) {} }; - class range_error : public exception_with_message { + class CPPTRACE_EXPORT range_error : public exception_with_message { public: explicit range_error(std::string&& message_arg) noexcept : exception_with_message(std::move(message_arg), 1) {} }; - class overflow_error : public exception_with_message { + class CPPTRACE_EXPORT overflow_error : public exception_with_message { public: explicit overflow_error(std::string&& message_arg) noexcept : exception_with_message(std::move(message_arg), 1) {} }; - class underflow_error : public exception_with_message { + class CPPTRACE_EXPORT underflow_error : public exception_with_message { public: explicit underflow_error(std::string&& message_arg) noexcept : exception_with_message(std::move(message_arg), 1) {}