[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)
Yitzhak Mandelbaum via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 10 08:23:48 PDT 2023
================
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional<int>&& opt) {
std::forward<absl::optional<int>>(opt).value();
}
+
+namespace std {
+
+template<typename T>
+class optional {
+public:
+ template <typename U>
+ optional& operator=(const U &u){
----------------
ymand wrote:
The issue isn't specifix to `std::optional`. Please just use the `absl` version we already include, rather than adding another optional definition.
https://github.com/llvm/llvm-project/pull/68510
More information about the cfe-commits
mailing list