Bug 1390752 - Avoid std::basic_ios<char, std::char_traits<char>>::operator bool() references. r?froydnj draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 16 Aug 2017 15:03:43 +0900
changeset 647348 08627be76d92634a912a3f62158ec594dc5680d0
parent 647347 c87b92e26edc46059b237eea8b9e4d5b205a2ecf
child 726460 90c13966ff51e839750d6602a4c928b57d98c1eb
push id74358
push userbmo:mh+mozilla@glandium.org
push dateWed, 16 Aug 2017 06:59:21 +0000
reviewersfroydnj
bugs1390752, 1278456
milestone57.0a1
Bug 1390752 - Avoid std::basic_ios<char, std::char_traits<char>>::operator bool() references. r?froydnj This is similar to what we had until bug 1278456 removed them when we dropped support for older libstdc++, but for a different symbol.
build/unix/stdc++compat/stdc++compat.cpp
--- a/build/unix/stdc++compat/stdc++compat.cpp
+++ b/build/unix/stdc++compat/stdc++compat.cpp
@@ -155,8 +155,17 @@ namespace std {
   }
 
   /* For some reason this is a symbol exported by new versions of libstdc++,
    * even though the destructor is default there too */
   __attribute__((weak)) thread::_State::~_State() = default;
 #endif
 }
 #endif
+
+#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21)
+namespace std
+{
+  /* Instantiate this template to avoid GLIBCXX_3.4.21 symbol versions
+   * depending on optimization level */
+  template basic_ios<char, char_traits<char> >::operator bool() const;
+}
+#endif