[all-commits] [llvm/llvm-project] 400b33: [libc++] Disallow volatile types in std::allocator

Joseph Loser via All-commits all-commits at lists.llvm.org
Wed Sep 22 08:48:01 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 400b33e18d27d801ec5ad1cc52b34c6d8bed64aa
      https://github.com/llvm/llvm-project/commit/400b33e18d27d801ec5ad1cc52b34c6d8bed64aa
  Author: Joe Loser <joeloser93 at gmail.com>
  Date:   2021-09-22 (Wed, 22 Sep 2021)

  Changed paths:
    M libcxx/TODO.TXT
    M libcxx/include/__memory/allocator.h
    A libcxx/test/libcxx/memory/allocator_volatile.verify.cpp
    M libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp
    M libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
    R libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.volatile.pass.cpp

  Log Message:
  -----------
  [libc++] Disallow volatile types in std::allocator

LWG 2447 is marked as `Complete`, but there is no `static_assert` to
reject volatile types in `std::allocator`. See the discussion at
https://reviews.llvm.org/D108856.

Add `static_assert` in `std::allocator` to disallow volatile types. Since this
is an implementation choice, mark the binding test as `libc++` only.

Remove tests that use containers backed by `std::allocator` that test
the container when used with a volatile type.

Reviewed By: ldionne, #libc

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




More information about the All-commits mailing list