[clang] [Clang] prevent null explicit object argument from being deduced (PR #104328)
Oleksandr T. via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 15 00:38:08 PDT 2024
================
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++2b -verify %s
+
+namespace std {
+struct rv {};
+
+template <bool B, typename T> struct enable_if;
+template <typename T> struct enable_if<true, T> { typedef T type; };
+
+template <typename U, typename T>
+typename enable_if<__is_convertible(T, rv), U>::type forward(T &);
+template <typename U, typename T>
+typename enable_if<!__is_convertible(T, rv), U &>::type forward(T &);
+}
----------------
a-tarasyuk wrote:
@cor3ntin Thanks for the review. I’ve removed unnecessary deps and moved the test to the appropriate file.
https://github.com/llvm/llvm-project/pull/104328
More information about the cfe-commits
mailing list