Bug 654082 - Add C++0x support to the libstdc++ compatibility hack. r=tglek
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 03 May 2011 10:33:30 +0200
changeset 68898 316b764ae6c01ed1b91dc9f1690572b6d5364658
parent 68897 eebcd14c9c46d7e541e5fce138b6e656dcdfca6d
child 68899 7528b2718827d83082b7ceea33df49df4d97bf38
push id19790
push usermh@glandium.org
push dateTue, 03 May 2011 08:37:06 +0000
treeherdermozilla-central@7528b2718827 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstglek
bugs654082
milestone6.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 654082 - Add C++0x support to the libstdc++ compatibility hack. r=tglek
build/stdc++compat.cpp
--- a/build/stdc++compat.cpp
+++ b/build/stdc++compat.cpp
@@ -49,20 +49,29 @@ namespace std {
     template ostream& ostream::_M_insert(unsigned long);
     template ostream& __ostream_insert(ostream&, const char*, streamsize);
     template istream& istream::_M_extract(double&);
 #endif
 #ifdef DEBUG
 #if (__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)
     /* Instantiate these templates to avoid GLIBCXX_3.4.14 symbol versions
      * in debug builds */
-    template char *basic_string<char, char_traits<char>, allocator<char> >::_S_construct_aux_2(size_type, char, allocator<char> const&);
-    template wchar_t *basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >::_S_construct_aux_2(size_type, wchar_t, allocator<wchar_t> const&);
-#endif
-#endif
+    template char *string::_S_construct_aux_2(size_type, char, allocator<char> const&);
+#ifdef _GLIBCXX_USE_WCHAR_T
+    template wchar_t *wstring::_S_construct_aux_2(size_type, wchar_t, allocator<wchar_t> const&);
+#endif /* _GLIBCXX_USE_WCHAR_T */
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    template string::basic_string(string&&);
+    template string& string::operator=(string&&);
+    template wstring::basic_string(wstring&&);
+    template wstring& wstring::operator=(wstring&&);
+    template wstring& wstring::assign(wstring&&);
+#endif /* __GXX_EXPERIMENTAL_CXX0X__ */
+#endif /* (__GNUC__ == 4) && (__GNUC_MINOR__ >= 5) */
+#endif /* DEBUG */
 }
 
 namespace std __attribute__((visibility("default"))) {
 #if (__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)
     /* Hack to avoid GLIBCXX_3.4.14 symbol versions */
     struct _List_node_base
     {
         void hook(_List_node_base * const __position) throw ();