ultimatepp/uppdev/TestGCCPB/TestGCCPB.cpp
cxl 3cd394812c Merge continued
git-svn-id: svn://ultimatepp.org/upp/trunk@10263 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2016-10-04 08:34:39 +00:00

26 lines
404 B
C++

#include <Core/Core.h>
struct Bar {
int x;
int y;
};
struct Foo {
int a;
int b;
operator Bar() const { return *(Bar *)this; }
};
CONSOLE_APP_MAIN
{
Size sz(1000, 1000);
POINT pt = Point(sz);
Cout() << "Size = " << sz << ", Point = " << Point(sz) << ", POINT = " << Point(pt) << "\n";
Foo f;
f.a = 12345;
f.b = 54321;
Bar b = f;
Cout() << b.x << ", " << b.y;
}