Skip to content
  • Nikolas Klauser's avatar
    b9a2658a
    [libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002) · b9a2658a
    Nikolas Klauser authored
    This patch implements the forwarding to frozen C++03 headers as
    discussed in
    https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
    RFC, we initially proposed selecting the right headers from the Clang
    driver, however consensus seemed to steer towards handling this in the
    library itself. This patch implements that direction.
    
    At a high level, the changes basically amount to making each public
    header look like this:
    
    ```
    // inside <vector>
    #ifdef _LIBCPP_CXX03_LANG
    #  include <__cxx03/vector>
    #else
      // normal <vector> content
    #endif
    ```
    
    In most cases, public headers are simple umbrella headers so there isn't
    much code in the #else branch. In other cases, the #else branch contains
    the actual implementation of the header.
    b9a2658a
    [libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)
    Nikolas Klauser authored
    This patch implements the forwarding to frozen C++03 headers as
    discussed in
    https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
    RFC, we initially proposed selecting the right headers from the Clang
    driver, however consensus seemed to steer towards handling this in the
    library itself. This patch implements that direction.
    
    At a high level, the changes basically amount to making each public
    header look like this:
    
    ```
    // inside <vector>
    #ifdef _LIBCPP_CXX03_LANG
    #  include <__cxx03/vector>
    #else
      // normal <vector> content
    #endif
    ```
    
    In most cases, public headers are simple umbrella headers so there isn't
    much code in the #else branch. In other cases, the #else branch contains
    the actual implementation of the header.
Loading