hanchenye-llvm-project/libcxx/docs
Eric Fiselier 5de7cacf07 Make GCC in C++03 Unsupported
Summary:
This patch make G++03 explicitly unsupported with libc++, as discussed on the mailing lists.


Below is the rational for this decision.
----------------------------------------------------------------------------------------------------

libc++ claims to support GCC with C++03 ("G++03"), and this is a problem for our users.

Our C++03 users are all using Clang. They must be.  Less than 9% of the C++03 tests pass with GCC [1][2]. No non-trivial C++ program could work.

Attempting to support G++03 impacts our QoI considerably. Unlike Clang, G++03 offers almost no C++11 extensions. If we could remove all the fallbacks for G++03, it would mean libc++ could::

* Improve Correctness:

Every `#ifdef _LIBCPP_HAS_NO_<C++11-feature>` is a bug manifest. It exists to admit for deviant semantics.

* Achieve ABI stability between C++03 and C++11

Differences between our C++03 and C++Rest branches contain ABI bugs. For example `std::nullptr_t` and `std::function::operator()(...)` are currently incompatible between C++11 and C++03, but could be fixed.

* Decrease Compile Times and Memory Usage:

Writing efficient SFINAE requires C++11. Using alias templates, libc++ could reduce the number of instantiations it produces substantially.

* Decrease Binary Size

Similar to the last point, G++03 forces metaprogramming techniques that emit more debug information [3] [4]. Compared to libstdc++, debug information size increases of +10% are not uncommon.

Reviewers: ldionne, mclow.lists, EricWF

Reviewed By: ldionne, EricWF

Subscribers: zoecarver, aprantl, dexonsmith, arphaman, libcxx-commits, #libc

Differential Revision: https://reviews.llvm.org/D63154

llvm-svn: 363219
2019-06-13 00:37:25 +00:00
..
DesignDocs Add documentation and tests for Clangs C++11 extensions in C++03. 2019-06-11 22:53:49 +00:00
BuildingLibcxx.rst [Docs] Modernize references to macOS 2019-05-30 16:46:22 +00:00
CMakeLists.txt
FeatureTestMacroTable.rst P0722R3: Implement library support for destroying delete 2019-05-23 23:46:44 +00:00
Makefile.sphinx
README.txt
ReleaseNotes.rst Bump the trunk version to 9.0.0svn 2019-01-16 10:57:02 +00:00
TestingLibcxx.rst [CMake] Support compiler-rt builtins library in tests 2019-02-05 19:50:47 +00:00
UsingLibcxx.rst [libcxx] Slightly improved policy for handling experimental features 2019-06-11 14:48:40 +00:00
conf.py Bump the trunk version to 9.0.0svn 2019-01-16 10:57:02 +00:00
index.rst Make GCC in C++03 Unsupported 2019-06-13 00:37:25 +00:00

README.txt

libc++ Documentation
====================

The libc++ documentation is written using the Sphinx documentation generator. It is
currently tested with Sphinx 1.1.3.

To build the documents into html configure libc++ with the following cmake options:

  * -DLLVM_ENABLE_SPHINX=ON
  * -DLIBCXX_INCLUDE_DOCS=ON

After configuring libc++ with these options the make rule `docs-libcxx-html`
should be available.