[clang] Remove dangling conversion to `optional &` (PR #93385)
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/93385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Remove dangling conversion to `optional &` (PR #93385)
davidstone wrote: Yes please https://github.com/llvm/llvm-project/pull/93385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Remove dangling conversion to `optional &` (PR #93385)
cor3ntin wrote: @davidstone you need me to merge that for you? https://github.com/llvm/llvm-project/pull/93385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Remove dangling conversion to `optional &` (PR #93385)
https://github.com/cor3ntin approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/93385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Remove dangling conversion to `optional &` (PR #93385)
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Stone (davidstone) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/93385.diff 1 Files Affected: - (modified) clang/include/clang/Basic/CustomizableOptional.h (-8) ``diff diff --git a/clang/include/clang/Basic/CustomizableOptional.h b/clang/include/clang/Basic/CustomizableOptional.h index 84d40025ee41b..2d6ae6a781a55 100644 --- a/clang/include/clang/Basic/CustomizableOptional.h +++ b/clang/include/clang/Basic/CustomizableOptional.h @@ -97,14 +97,6 @@ template class CustomizableOptional { template T value_or(U &) && { return has_value() ? std::move(operator*()) : std::forward(alt); } - - // Allow conversion to std::optional. - explicit operator std::optional &() const & { -return *this ? **this : std::optional(); - } - explicit operator std::optional &&() const && { -return *this ? std::move(**this) : std::optional(); - } }; template `` https://github.com/llvm/llvm-project/pull/93385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Remove dangling conversion to `optional &` (PR #93385)
https://github.com/davidstone created https://github.com/llvm/llvm-project/pull/93385 None >From 8c2ae501a09df7248117fa7d69cb0621aef14c1f Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 25 May 2024 14:32:56 -0600 Subject: [PATCH] Remove dangling conversion to `optional &` --- clang/include/clang/Basic/CustomizableOptional.h | 8 1 file changed, 8 deletions(-) diff --git a/clang/include/clang/Basic/CustomizableOptional.h b/clang/include/clang/Basic/CustomizableOptional.h index 84d40025ee41b..2d6ae6a781a55 100644 --- a/clang/include/clang/Basic/CustomizableOptional.h +++ b/clang/include/clang/Basic/CustomizableOptional.h @@ -97,14 +97,6 @@ template class CustomizableOptional { template T value_or(U &) && { return has_value() ? std::move(operator*()) : std::forward(alt); } - - // Allow conversion to std::optional. - explicit operator std::optional &() const & { -return *this ? **this : std::optional(); - } - explicit operator std::optional &&() const && { -return *this ? std::move(**this) : std::optional(); - } }; template ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits