[all-commits] [llvm/llvm-project] 4331c0: [libc++][NFC] Simplify `optional<T>` and `optional...

William Tran-Viet via All-commits all-commits at lists.llvm.org
Sat Jun 13 23:07:08 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4331c07e8a8d398daf2204b6c4085f992b343308
      https://github.com/llvm/llvm-project/commit/4331c07e8a8d398daf2204b6c4085f992b343308
  Author: William Tran-Viet <wtranviet at proton.me>
  Date:   2026-06-14 (Sun, 14 Jun 2026)

  Changed paths:
    M libcxx/include/optional

  Log Message:
  -----------
  [libc++][NFC] Simplify `optional<T>` and `optional<T&>` a bit (#203665)

- Make `optional<T&>`'s iterator base directly from the storage base
instead of inheriting the empty bases, allowing us to remove the
`is_lvalue_reference_v` conditions in the empty bases
- Move the `__is_constructible_for_optional_{meow}` variables closer to
`make_optional` since that's the only place they're really useful for
now
- Change the SFINAE for the iterator availability to use concepts
instead

The above should make it easier to split up in an upcoming patch.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list