lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 89b7e1eb 5/5: Add missing LMI_SO to declarati


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 89b7e1eb 5/5: Add missing LMI_SO to declarations of classes in lmi DLL
Date: Tue, 14 Feb 2023 19:30:37 -0500 (EST)

branch: master
commit 89b7e1eb092cd3a99dab6aa6c057dc0fae48d9eb
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Add missing LMI_SO to declarations of classes in lmi DLL
    
    When using explicit DLL import/export declarations, i.e. in the
    "so_test" build kind, all DLL-exported classes should be using LMI_SO,
    otherwise using them might still work due to auto-importing, but this
    seems to be very fragile and can stop working even due to completely
    unrelated changes, so avoid relying on it.
---
 ce_skin_name.hpp | 2 +-
 datum_string.hpp | 4 +++-
 mc_enum.hpp      | 2 +-
 tn_range.hpp     | 2 +-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ce_skin_name.hpp b/ce_skin_name.hpp
index 12df18a5..28a59596 100644
--- a/ce_skin_name.hpp
+++ b/ce_skin_name.hpp
@@ -42,7 +42,7 @@
 /// to end users, but skin names are more esoteric and it is less
 /// confusing to show them as file names rather than apparent phrases.
 
-class ce_skin_name final
+class LMI_SO ce_skin_name final
     :public mc_enum_base
 {
   public:
diff --git a/datum_string.hpp b/datum_string.hpp
index a7b3739f..d77c6bbf 100644
--- a/datum_string.hpp
+++ b/datum_string.hpp
@@ -30,7 +30,9 @@
 
 #include <string>
 
-class datum_string_base
+// Implicitly-declared special member functions do the right thing.
+
+class LMI_SO datum_string_base
     :public datum_base
 {
   public:
diff --git a/mc_enum.hpp b/mc_enum.hpp
index 73ab6647..ff2bb2b4 100644
--- a/mc_enum.hpp
+++ b/mc_enum.hpp
@@ -89,7 +89,7 @@ class LMI_SO mc_enum_base
 /// explained in the documentation for class mc_enum_data.
 
 template<typename T>
-class mc_enum final
+class LMI_SO mc_enum final
     :public mc_enum_base
 {
     static_assert(std::is_enum_v<T>);
diff --git a/tn_range.hpp b/tn_range.hpp
index 70683d6e..edd640c6 100644
--- a/tn_range.hpp
+++ b/tn_range.hpp
@@ -226,7 +226,7 @@ class LMI_SO tn_range_base
 /// the right thing.
 
 template<typename Number, typename Trammel>
-class tn_range final
+class LMI_SO tn_range final
     :public tn_range_base
 {
     static_assert(std::is_base_of_v<trammel_base<Number>,Trammel>);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]