summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/string_view_template.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/fxcrt/string_view_template.h b/core/fxcrt/string_view_template.h
index 1780e47b03..d774e3f4bd 100644
--- a/core/fxcrt/string_view_template.h
+++ b/core/fxcrt/string_view_template.h
@@ -234,8 +234,12 @@ inline bool operator<(const T* lhs, const StringViewTemplate<T>& rhs) {
return rhs > lhs;
}
+// Workaround for one of the cases external template classes are
+// failing in GCC before version 7 with -O0
+#if !defined(__GNUC__) || __GNUC__ >= 7
extern template class StringViewTemplate<char>;
extern template class StringViewTemplate<wchar_t>;
+#endif
using ByteStringView = StringViewTemplate<char>;
using WideStringView = StringViewTemplate<wchar_t>;