Modify the test files to see what exactly happens.
This commit is contained in:
parent
06bcc9edc9
commit
56e27589c0
2 changed files with 26 additions and 2 deletions
BIN
examples/test
BIN
examples/test
Binary file not shown.
|
|
@ -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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue