2
0
mirror of https://github.com/boostorg/tti.git synced 2026-01-25 06:42:25 +00:00
Files
tti/test/TestStructs.hpp
Edward Diener a8a106ed91 Updated tests and test data
[SVN r67766]
2011-01-08 00:49:41 +00:00

93 lines
1.9 KiB
C++

#if !defined(TEST_STRUCTS_HPP)
#define TEST_STRUCTS_HPP
struct AType
{
// Type
typedef int AnIntType;
struct AStructType
{
template <class> struct MStrMemberTemplate { };
};
typedef int & AnIntTypeReference;
struct BType
{
typedef int AnIntegerType;
struct CType
{
typedef int AnotherIntegerType;
template <class,class,int,short,class,template <class,int> class InnerTemplate,class> struct CTManyParameters { };
};
};
// Template
template <class> struct ATPMemberTemplate { };
template <int> struct AMemberTemplate { };
template <int,int> struct AnotherMemberTemplate { };
template <class,class> struct CLMemberTemplate { };
// Data
int AnInt;
BType IntBT;
BType::CType NestedCT;
// Function
void VoidFunction() { }
int IntFunction() { return 0; }
// Static Data
static short DSMember;
// Static Function
static int SIntFunction(long,double) { return 2; }
};
struct AnotherType
{
// Type
typedef AType::AnIntType someOtherType;
// Template
template <class,class,class,class,class,class> struct SomeMemberTemplate { };
template <class,class,int,class,template <class> class InnerTemplate,class,long> struct ManyParameters { };
template <class,class,class,class> struct SimpleTMP { };
// Data
bool aMember;
bool cMem;
long AnInt;
AType OtherAT;
AType::AStructType ONestStr;
// Function
AType aFunction(int) { return AType(); }
int anotherFunction(AType) { return 0; }
AType::AnIntType sFunction(int,long,double) { return 0; }
double IntFunction(int) { return 0; }
// Static Data
// Static Function
static AType TIntFunction(long,double) { return AType(); }
static AType::AStructType TSFunction(AType::AnIntType,double) { return AType::AStructType(); }
};
short AType::DSMember(5622);
#endif // TEST_STRUCTS_HPP