Quellcode durchsuchen

Set hidden visibility for StringView

This avoids templates using StringView to be exported, such as
std::vector<StringView*>::emplace_back().

Gbp-Dch: ignore
Julian Andres Klode vor 10 Jahren
Ursprung
Commit
5359675e6c
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      apt-pkg/contrib/string_view.h

+ 2 - 1
apt-pkg/contrib/string_view.h

@@ -13,6 +13,7 @@
 #define APT_STRINGVIEW_H
 #include <string.h>
 #include <string>
+#include <apt-pkg/macros.h>
 
 namespace APT {
 
@@ -23,7 +24,7 @@ namespace APT {
  * used by APT. It is not meant to be used in programs, only inside the
  * library for performance critical paths.
  */
-class StringView {
+class APT_HIDDEN StringView {
     const char *data_;
     size_t size_;