Modify the test files to see what exactly happens.

This commit is contained in:
Charles Descamps 2024-10-10 08:38:42 -07:00
parent 06bcc9edc9
commit 56e27589c0
2 changed files with 26 additions and 2 deletions

Binary file not shown.

View file

@ -10,9 +10,33 @@
using namespace std;
class A
{
int i;
public:
A(int ii = 0) : i(ii) {}
void show() { cout << i << endl; }
};
class B
{
int x;
public:
B(int xx) : x(xx) {}
operator A() const { return A(x); }
};
void g(A a)
{
a.show();
}
int main()
{
//
cout << boolalpha << ((7 >= 7) && (true || 99 < 1) || !(3 > 5 && 7 < 10) && 2 != 4) << endl;
B b(10);
g(b);
g(20);
return 0;
}