[libc++] Remove C++03 extensions for std::allocator_arg & friends
authorLouis Dionne <ldionne.2@gmail.com>
Mon, 6 Mar 2023 20:43:26 +0000 (15:43 -0500)
committerLouis Dionne <ldionne.2@gmail.com>
Sun, 19 Mar 2023 14:14:32 +0000 (10:14 -0400)
commitc0cde79e9e3b3c5bb54c55b0eabe8142674028a4
tree7a5e46d64b03c7e2d23b37ec1cdee85e528044ec
parentfb066c4622c8665612961cc74d2715ff32943272
[libc++] Remove C++03 extensions for std::allocator_arg & friends

As explained in the release note, libc++ used to provide various
global variables as an extension in C++03 mode. Unfortunately, that
made our definition non-conforming in all standard modes. This was
never a big problem until recently, since we are trying to support
C++20 Modules in libc++, and that requires cleaning up the definition
of these variables.

This change is the first in a series of changes to achieve our end goal.
This patch removes the ability for users to rely on the (incorrect)
definition of those global variables inside the shared library. The
plan is to then remove those definitions from the shared library
(which is an ABI break but I don't think it will have impact), and
finally to make our definition of those variables conforming in all
standard modes.

Differential Revision: https://reviews.llvm.org/D145422
19 files changed:
libcxx/docs/ReleaseNotes.rst
libcxx/include/__memory/allocator_arg_t.h
libcxx/include/__mutex_base
libcxx/include/__utility/piecewise_construct.h
libcxx/include/condition_variable
libcxx/include/experimental/__memory
libcxx/include/future
libcxx/include/mutex
libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/adopt_lock.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_adopt_lock.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_defer_lock.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_try_to_lock.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/lock.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_for.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_until.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp
libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp