================ @@ -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){ + data = u; + } +private: + T data; +}; + +template <typename T> +class vector { +public: + vector() {} + T &operator[](unsigned long index) { return data[index]; } + bool empty() { return size == 0UL; } + +private: + T *data; + unsigned long size; ---------------- ymand wrote:
I think simpler would be better here -- please leave out the definitions of the methods and the private data. https://github.com/llvm/llvm-project/pull/68510 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits