[all-commits] [llvm/llvm-project] 9fd3c4: [libc++] Fix `unexpected` heterogeneous comparison...

A. Jiang via All-commits all-commits at lists.llvm.org
Thu Nov 7 08:49:52 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9fd3c4115cf2cd3da1405e1f2c38d53582b5dc81
      https://github.com/llvm/llvm-project/commit/9fd3c4115cf2cd3da1405e1f2c38d53582b5dc81
  Author: A. Jiang <de34 at live.cn>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M libcxx/include/__expected/unexpected.h
    M libcxx/test/std/utilities/expected/expected.unexpected/equality.pass.cpp

  Log Message:
  -----------
  [libc++] Fix `unexpected` heterogeneous comparison (#115249)

Currently, libc++ incorrectly rejects heterogeneous comparison of
`unexpected`, because the `operator==` is only a hidden friend of
`unexpected<_Err>` but not of `unexpected<_Err2>`. We need to call the
`error()` member function on `__y`.

Fixes #115326



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