#ifndef HEADER1
#define HEADER1
void f();
void pf();
namespace ns {
void g();
void pg();
}
template <typename T>
struct S { typedef int G; };
template <typename T>
struct S<T *> { typedef int H; };
template <typename T> struct TS2;
typedef TS2<int> TS2int;
template <typename T> struct TestBaseSpecifiers { };
template<typename T> struct TestBaseSpecifiers2 : TestBaseSpecifiers<T> { };
template <typename T>
struct TS3 {
static const int value = 0;
static const int value2;
};
template <typename T>
const int TS3<T>::value;
template <typename T>
const int TS3<T>::value2 = 1;
struct instantiate : TS3<int> {};
typedef int Integer;
#elif not defined(HEADER2)
#define HEADER2
#if !defined(HEADER1)
#error Header inclusion order messed up
#endif
void f(int);
void f2();
namespace ns {
void g(int);
void g2();
}
template <>
struct S<int> { typedef int I; };
template <typename T>
struct S<T &> { typedef int J; };
template <>
struct S<int *> { typedef int K; };
template <>
struct S<int &> { typedef int L; };
template <typename T> struct TS2 { };
struct TestBaseSpecifiers3 { };
struct TestBaseSpecifiers4 : TestBaseSpecifiers3 { };
struct A { };
struct B : A { };
static const int ts3m1 = TS3<int>::value;
extern int arr[TS3<int>::value2];
typedef int Integer;
#else
void test() {
f();
f(1);
pf();
f2();
ns::g();
ns::g(1);
ns::pg();
ns::g2();
typedef S<double>::G T1;
typedef S<double *>::H T2;
typedef S<int>::I T3;
typedef S<double &>::J T4;
typedef S<int *>::K T5;
typedef S<int &>::L T6;
TS2int ts2;
B b;
Integer i = 17;
}
static const int ts3m2 = TS3<int>::value;
int arr[TS3<int>::value2];
#endif