[libcxx-commits] [libcxx] [libc++][type_traits] Implements "A type trait to detect reference binding to temporary" (PR #128649)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 7 02:07:43 PST 2025
================
@@ -39,9 +39,51 @@ struct A {
A& operator=(const A&);
};
-class Abstract
-{
- virtual ~Abstract() = 0;
+class Abstract {
+ virtual ~Abstract() = 0;
};
+// Types for reference_{constructs/converts}_from_temporary
+
+#if TEST_STD_VER >= 23
+
+struct NonPOD {
+ NonPOD(int);
+};
+enum Enum { EV };
+struct POD {
+ Enum e;
+ int i;
+ float f;
+ NonPOD* p;
+};
+// Not PODs
+struct Derives : POD {};
----------------
frederick-vs-ja wrote:
These type names are confusing. Perhaps we only want to use `Base` and `Derived`.
https://github.com/llvm/llvm-project/pull/128649
More information about the libcxx-commits
mailing list