C++11 standard library support enabled on all Tier-1 platforms

Nathan Froyd nfroyd at mozilla.com
Fri May 27 01:50:56 UTC 2016

[CC mobile-firefox-dev and dev-fxos for notes below.]

Bug 1246743 (Mac libc++ support) and bug 1273934 (Android libc++
support for local development builds) have landed on mozilla-central.
This change means that all of our Tier-1 platforms now have a
more-or-less conformant C++11 standard library.  We can therefore
begin removing a decent amount of code that we required to support
pre-C++11 standard libraries and use standard facilities instead.  You
are still strongly encouraged to use Gecko-specific data structures
(nsTArray ns{C,}String, etc.) in preference to the standard library
ones, unless you need to interface with a third-party library.

Given the standard library's pervasive use of exceptions, and our
aversion to the same, if you are using a standard library header
that's not listed here:


you need to ask for review to get that header added to the list, per
policy in that file.

This change also means that any non-Tier-1 platforms (FxOS, for
instance) that don't provide a C++11 standard library will probably
break in very short order as various code is removed from the tree.

Developers who work on the C++ side of Firefox for Android are
strongly encouraged to upgrade to an r11 NDK; the r10 NDK should work,
but test results in the presence of crashes might be slightly wonky.


More information about the dev-platform mailing list