template <typename T1, typename T2, typename T3> struct vector {
vector();
vector(T1,T2,T3);
};
typedef vector< float, float, float > vector3f;
@interface SceneNode
{
vector3f position;
}
@property (assign, nonatomic) vector3f position;
@end
@interface MyOpenGLView
{
@public
vector3f position;
}
@property vector3f position;
@end
@implementation MyOpenGLView
@synthesize position;
-(void)awakeFromNib {
SceneNode *sn;
vector3f VF3(1.0, 1.0, 1.0);
[sn setPosition:VF3];
}
@end
class Int3 { int x, y, z; };
@interface MemPtr {}
- (void) foo: (int (Int3::*)) member;
@end
@implementation MemPtr
- (void) foo: (int (Int3::*)) member {
}
@end
typedef float HGVec4f __attribute__ ((vector_size(16)));
@interface RedBalloonHGXFormWrapper {
HGVec4f m_Transform[4];
}
@end
@implementation RedBalloonHGXFormWrapper
@end
namespace rdar9357400 {
template<int Dim1 = -1, int Dim2 = -1> struct fixed {
template<int D> struct rebind { typedef fixed<D> other; };
};
template<typename Element, int Size>
class fixed_1D
{
public:
typedef Element value_type;
typedef value_type array_impl[Size];
protected:
array_impl m_data;
};
template<typename Element, typename Alloc>
class vector;
template<typename Element, int Size>
class vector< Element, fixed<Size> >
: public fixed_1D<Element,Size> { };
typedef vector< float, fixed<4> > vector4f;
extern const char gg[] = @encode(vector4f);
}
namespace rdar9624314 {
struct B2 { int x; };
struct B3 {};
struct S : B2, B3 {};
extern const char gg[] = @encode(S);
struct S2 { unsigned : 0; int x; unsigned : 0; };
extern const char g2[] = @encode(S2);
}
namespace test {
class Foo {
public:
virtual void f() {};
};
class Bar {
public:
virtual void g() {};
};
class Zoo : virtual public Foo, virtual public Bar {
public:
int x;
int y;
};
extern const char ecd[] = @encode(Zoo);
}
struct Base1 {
char x;
};
struct DBase : public Base1 {
double x;
virtual ~DBase();
};
struct Sub_with_virt : virtual DBase {
long x;
};
struct Sub2 : public Sub_with_virt, public Base1, virtual DBase {
float x;
};
extern const char g1[] = @encode(Base1);
extern const char g2[] = @encode(DBase);
extern const char g3[] = @encode(Sub_with_virt);
extern const char g4[] = @encode(Sub2);
class allocator {
};
class basic_string {
struct _Alloc_hider : allocator {
char* _M_p;
};
_Alloc_hider _M_dataplus;
};
extern const char g5[] = @encode(basic_string);
struct CefBase {
virtual ~CefBase() {}
};
struct CefBrowser : public virtual CefBase {};
struct CefBrowserImpl : public CefBrowser {};
extern const char g6[] = @encode(CefBrowserImpl);
struct CefBase2 {
virtual ~CefBase2() {}
int i;
};
struct CefBrowser2 : public virtual CefBase2 {};
struct CefBrowserImpl2 : public CefBrowser2 {};
extern const char g7[] = @encode(CefBrowserImpl2);
struct Empty {};
struct X : Empty {
int array[10];
};
struct Y : Empty {
X vec;
};
extern const char g8[] = @encode(Y);
class dynamic_class {
public:
virtual ~dynamic_class();
};
@interface has_dynamic_class_ivar
@end
@implementation has_dynamic_class_ivar {
dynamic_class dynamic_class_ivar;
}
@end
namespace PR17142 {
struct A { virtual ~A(); };
struct B : virtual A { int y; };
struct C { virtual ~C(); int z; };
struct D : C, B { int a; };
struct E : D {};
extern const char x[] = @encode(E);
}
template<typename T>
struct S {
typedef T Ty;
Ty *t;
};
@interface N
{
S<N> a;
}
@end
@implementation N
@end
const char *expand_struct() {
return @encode(N);
}
#if __cplusplus >= 202002L
namespace PR48048 {
struct F {};
struct I {
int m;
[[no_unique_address]] F n;
};
extern const char x[] = @encode(I);
}
#endif
namespace test_cxx_template_specialization {
template <class T>
struct B0 {
T a;
};
struct D0 : B0<int> {};
struct D1 : D0 {};
struct D2 : virtual B0<int> {};
struct S0 {
B0<int> a;
};
struct S1 {
B0<int> *a;
};
struct S2 {
S1 *a;
};
template <class T>
union U0 {
T a;
};
typedef B0<int> TD0;
typedef B0<int> *Array0[4];
template <class T>
struct Outer0 {
struct Inner0 {
int a;
};
template <class T1>
struct Inner1 {
T a;
T1 b;
};
};
const char *b0 = @encode(B0<int>);
const char *b01 = @encode(B0<int> *);
const char *b02 = @encode(B0<int> &);
const char *d0 = @encode(D0 *);
const char *d1 = @encode(D1 *);
const char *d2 = @encode(D2 *);
const char *d21 = @encode(D2 **);
const char *s0 = @encode(S0 *);
const char *s1 = @encode(S1 *);
const char *s2 = @encode(S2 *);
const char *u0 = @encode(U0<int> *);
const char *td0 = @encode(TD0 *);
const char *a0 = @encode(Array0);
const char *inner0 = @encode(Outer0<int>::Inner0 *);
const char *inner1 = @encode(Outer0<int>::Inner1<float> *);
}