fixes #25803: add genCppConstructorExpr for full type-prefixed expression

This commit is contained in:
ringabout
2026-05-15 19:41:16 +08:00
parent 2c946950f4
commit 3daf154d0d
4 changed files with 63 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
#ifndef TCPP_DEFAULT_CTOR_ASSIGNMENT_H
#define TCPP_DEFAULT_CTOR_ASSIGNMENT_H
struct AmbiguousAssign {
int x;
const char* y;
AmbiguousAssign(): x(0), y(nullptr) {}
AmbiguousAssign(int x, const char* y): x(x), y(y) {}
AmbiguousAssign& operator=(int v) {
x = v;
y = nullptr;
return *this;
}
AmbiguousAssign& operator=(const char* s) {
x = 0;
y = s;
return *this;
}
AmbiguousAssign& operator=(const AmbiguousAssign& other) {
x = other.x;
y = other.y;
return *this;
}
};
#endif