[all-commits] [llvm/llvm-project] 21f73d: [libc++] Remove workaround for C11 features on com...

Louis Dionne via All-commits all-commits at lists.llvm.org
Fri Mar 11 06:07:25 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 21f73d5826fb5024a27eaacafadfa316f58949c5
      https://github.com/llvm/llvm-project/commit/21f73d5826fb5024a27eaacafadfa316f58949c5
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2022-03-11 (Fri, 11 Mar 2022)

  Changed paths:
    M libcxx/include/__config
    M libcxx/include/cstdlib
    M libcxx/include/ctime

  Log Message:
  -----------
  [libc++] Remove workaround for C11 features on compilers that don't support using_if_exists

Instead of carrying around #ifdefs to determine whether those functions
are available on the platform, unconditionally use the using_if_exists
attribute to import it into namespace std only when available. That was
the purpose of this attribute from the start.

This change means that trying to use libc++ with an old SDK (or on an
old platform for platforms that ship system headers in /usr/include)
will require a recent Clang that supports the using_if_exists attribute.
When using an older Clang or GCC, the underlying platform has to support
a C11 standard library.

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




More information about the All-commits mailing list