[glibmm/std-string-msvc-fixes: 3/6] fileattributeinfo.hg: Avoid exporting classes with std::string members




commit 1c9772fc78d6ee308eb2ed70e996a0fd8a410976
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri May 7 12:15:32 2021 +0800

    fileattributeinfo.hg: Avoid exporting classes with std::string members
    
    ...and templates that inherit std::string.  This will help us to also eliminate
    C4251 warnings from code that use thid class and related items, and avoid ABI
    compatibility issues when building code that link and run aginst glibmm on
    Visual Studio builds.

 gio/src/fileattributeinfo.hg | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gio/src/fileattributeinfo.hg b/gio/src/fileattributeinfo.hg
index 5447efd3..377206e2 100644
--- a/gio/src/fileattributeinfo.hg
+++ b/gio/src/fileattributeinfo.hg
@@ -33,25 +33,25 @@ _WRAP_ENUM(FileAttributeStatus, GFileAttributeStatus, decl_prefix GIOMM_API)
  *
  * @newin{2,16}
  */
-class GIOMM_API FileAttributeInfo
+class FileAttributeInfo
 {
   _CLASS_GENERIC(FileAttributeInfo, GFileAttributeInfo, decl_prefix GIOMM_API)
 public:
   _WRAP_ENUM(Flags, GFileAttributeInfoFlags)
 
-  explicit FileAttributeInfo(const GFileAttributeInfo* ginfo);
+  GIOMM_API explicit FileAttributeInfo(const GFileAttributeInfo* ginfo);
 
-  FileAttributeInfo(const FileAttributeInfo& other);
-  FileAttributeInfo& operator=(const FileAttributeInfo& other);
+  GIOMM_API FileAttributeInfo(const FileAttributeInfo& other);
+  GIOMM_API FileAttributeInfo& operator=(const FileAttributeInfo& other);
 
-  FileAttributeInfo(FileAttributeInfo&& other) noexcept;
-  FileAttributeInfo& operator=(FileAttributeInfo&& other) noexcept;
+  GIOMM_API FileAttributeInfo(FileAttributeInfo&& other) noexcept;
+  GIOMM_API FileAttributeInfo& operator=(FileAttributeInfo&& other) noexcept;
 
-  ~FileAttributeInfo();
+  GIOMM_API ~FileAttributeInfo();
 
-  std::string get_name() const;
-  FileAttributeType get_type() const;
-  Flags get_flags() const;
+  GIOMM_API std::string get_name() const;
+  GIOMM_API FileAttributeType get_type() const;
+  GIOMM_API Flags get_flags() const;
 
 protected:
   std::string m_name;


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