This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal compiler bug in g++ 3.2.3
- From: Norbert Nemec <Norbert dot Nemec at theorie3 dot physik dot uni-erlangen dot de>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 25 Feb 2003 15:57:36 +0100
- Subject: Internal compiler bug in g++ 3.2.3
Hi there,
I encountered a internal compiler bug in g++ 3.2.3
Haven't gone into the details yet. If you can't reproduce it from the
information given, please contact me again, and I'll try to dig into the
matter a little deeper myself.
Ciao,
Nobbi
--
-- __________________Norbert "Nobbi" Nemec <Norbert at Nemec-online dot de>
--
-- Universität Erlangen-Nürnberg, Germany
-- Institut für Theoretische Physik III
-- Staudtstr. 7 ... D-91058 Erlangen ... Room No. U1.526
-- Tel: +49 9131 / 85-28816
-- privat:__________________________________________________________
-- Hindenburgstr. 44 ... D-91054 Erlangen ... Tel: +49 9131 / 204180
Script started on Tue Feb 25 15:54:37 2003
[35mnobbi at spiritus:~/Physik/dLatCalc $[0m g++-3.2 -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.3 20030221 (Debian prerelease)
[35mnobbi at spiritus:~/Physik/dLatCalc $[0m g++-3.2 -v buggy.ii
buggy.cpp: In instantiation of `Field<4, etLAP::Vector<etLAP::Vector<double, 3, etLAP::Smart>, 4, etLAP::Packed>, double>':
buggy.cpp:54: instantiated from `VectorField<4, etLAP::Vector<double, 3, etLAP::Smart>, double>'
buggy.cpp:54: instantiated from `GaugeFieldNonCompact<4, 2, double>'
buggy.cpp:54: instantiated from here
buggy.cpp:22: Internal compiler error in lookup_template_class, at cp/pt.c:4008
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
[35mnobbi at spiritus:~/Physik/dLatCalc $[0m exit
Script done on Tue Feb 25 15:54:49 2003
# 1 "buggy.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "buggy.cpp"
template<int NDIM,typename REAL=double>
class Lattice {
template <int xNDIM,typename T,typename xREAL>
friend class Field;
public:
Lattice<NDIM,REAL>() {
};
};
Lattice<4> lattice;
template<int NDIM,typename T,typename REAL=double>
class Field {
public:
Field(const Lattice<NDIM,REAL> &lattice_) {
};
};
# 1 "/home/nobbi/Physik/include/etLAP/Vector.h" 1
# 23 "/home/nobbi/Physik/include/etLAP/Vector.h"
# 1 "/home/nobbi/Physik/include/etLAP/Common.h" 1
# 36 "/home/nobbi/Physik/include/etLAP/Common.h"
# 1 "/home/nobbi/Physik/include/etLAP/Tags.h" 1
# 23 "/home/nobbi/Physik/include/etLAP/Tags.h"
namespace etLAP {
class Smart;
class Packed;
class ExtPtr;
class Diagonal;
class Scalar;
class Zero;
class One;
template <class A,class Op>
class ElemUnOp;
template <class A,class B,class Op>
class ElemBinOp;
template <class A,typename T,class Op>
class ScalarOp;
template <class A>
class Transposed;
template <class A,class B>
class Multiplied;
template <class T>
class Row;
template <class T>
class Column;
class Buffer;
template <class A>
class NoBuffer;
class OpIdent;
class OpNeg;
class OpConj;
class OpAbs;
class OpReal;
class OpImag;
class OpSqr;
class OpExp;
class OpTranspose;
class OpAdj;
class OpTrace;
class OpDet;
class OpInv;
class OpMax;
class OpAdd;
class OpSub;
class OpMul;
class OpDiv;
class OpIsEq;
class OpIsNeq;
class OpRevMul;
};
# 37 "/home/nobbi/Physik/include/etLAP/Common.h" 2
namespace etLAP {
template <class _SAME>
class Common;
template <class _SAME,typename T>
class Common_Smart;
template <class _SAME,typename T>
class Common_Packed;
template <typename T=double,int N=0,class EngineTag=Smart>
class Vector;
template <typename T=double,int R=0,int C=0,class EngineTag=Smart>
class Matrix;
};
# 1 "/home/nobbi/Physik/include/etLAP/Util.h" 1
# 23 "/home/nobbi/Physik/include/etLAP/Util.h"
namespace etLAP {
template <bool COND,typename IF_TRUE,typename IF_FALSE>
struct IF;
template <typename IF_TRUE,typename IF_FALSE> struct IF<true,IF_TRUE,IF_FALSE> { typedef IF_TRUE T; };
template <typename IF_TRUE,typename IF_FALSE> struct IF<false,IF_TRUE,IF_FALSE> { typedef IF_FALSE T; };
template <typename A,typename B>
struct TypeEqual { static const bool res = false; };
template <typename A>
struct TypeEqual<A,A> { static const bool res = true; };
template<bool B> struct CTAssertClass {};
template<> struct CTAssertClass<true> { static void test() {} };
};
# 58 "/home/nobbi/Physik/include/etLAP/Common.h" 2
# 1 "/home/nobbi/Physik/include/etLAP/Types.h" 1
# 28 "/home/nobbi/Physik/include/etLAP/Types.h"
namespace std {
template <typename T>
class complex;
};
namespace etLAP {
struct AnyType;
class NoCast {};
typedef class NoClass {} *NoType;
template <typename Dest,typename Src> struct TypeCast {
static const bool valid = false;
typedef NoCast Cast_t;
typedef NoType Dest_t;
};
template <typename T> struct TypeCast<T,T> {
static const bool valid = true;
typedef TypeCast<T,T> Cast_t;
typedef T Dest_t;
static T cast(T x) { return x; }
};
# 70 "/home/nobbi/Physik/include/etLAP/Types.h"
template <> struct TypeCast<float,int> { static const bool valid = true; typedef TypeCast<float,int> Cast_t; typedef float Dest_t; static float cast(int x) { return x; } };
template <> struct TypeCast<double,int> { static const bool valid = true; typedef TypeCast<double,int> Cast_t; typedef double Dest_t; static double cast(int x) { return x; } };
template <> struct TypeCast<double,float> { static const bool valid = true; typedef TypeCast<double,float> Cast_t; typedef double Dest_t; static double cast(float x) { return x; } };
template <> struct TypeCast<long double,int> { static const bool valid = true; typedef TypeCast<long double,int> Cast_t; typedef long double Dest_t; static long double cast(int x) { return x; } };
template <> struct TypeCast<long double,float> { static const bool valid = true; typedef TypeCast<long double,float> Cast_t; typedef long double Dest_t; static long double cast(float x) { return x; } };
template <> struct TypeCast<long double,double> { static const bool valid = true; typedef TypeCast<long double,double> Cast_t; typedef long double Dest_t; static long double cast(double x) { return x; } };
template <typename Dest,typename Src>
struct TypeCast<std::complex<Dest>,std::complex<Src> > {
static const bool valid = TypeCast<Dest,Src>::valid;
typedef typename IF<valid,TypeCast<std::complex<Dest>,std::complex<Src> >,NoCast>::T Cast_t;
typedef typename IF<valid,std::complex<typename TypeCast<Dest,Src>::Dest_t>,NoType>::T Dest_t;
static std::complex<Dest> cast(std::complex<Src> x) { return std::complex<Dest>(TypeCast<Dest,Src>::cast(real(x)),TypeCast<Dest,Src>::cast(imag(x))); };
};
template <typename Dest,typename Src>
struct TypeCast<std::complex<Dest>,Src > {
static const bool valid = TypeCast<Dest,Src>::valid;
typedef typename IF<valid,TypeCast<std::complex<Dest>,Src >,NoCast>::T Cast_t;
typedef typename IF<valid,std::complex<typename TypeCast<Dest,Src>::Dest_t>,NoType>::T Dest_t;
static std::complex<Dest> cast(Src x) { return std::complex<Dest>(TypeCast<Dest,Src>::cast(x)); };
};
template <typename T>
struct TypeCast<std::complex<T>,std::complex<T> > {
static const bool valid = true;
typedef TypeCast<std::complex<T>,std::complex<T> > Cast_t;
typedef std::complex<T> Dest_t;
static std::complex<T> cast(std::complex<T> x) { return x; };
};
int sqr(int x) { return x*x; };
float sqr(float x) { return x*x; };
double sqr(double x) { return x*x; };
long double sqr(long double x) { return x*x; };
template <typename T>
T sqr(std::complex<T> x) { T r=real(x),i=imag(x); return r*r+i*i; };
template <class OpTag,typename T=AnyType> struct UnaryOp;
template <class OpTag> struct UnaryOp<OpTag,AnyType> {
template <typename T>
static typename UnaryOp<OpTag,T>::Result_t apply(T a) { return UnaryOp<OpTag,T>::apply(a); };
};
template <class OpTag,typename RES,typename T> struct _RawUnOp;
template <typename RES,typename T> struct _RawUnOp<OpIdent,RES,T> { static RES apply(T a) { return a; }; };
template <typename RES,typename T> struct _RawUnOp<OpNeg ,RES,T> { static RES apply(T a) { return -a; }; };
template <typename RES,typename T> struct _RawUnOp<OpConj ,RES,T> { static RES apply(T a) { return conj(a); }; };
template <typename RES,typename T> struct _RawUnOp<OpExp ,RES,T> { static RES apply(T a) { return exp(a); }; };
template <typename RES,typename T> struct _RawUnOp<OpAbs ,RES,T> { static RES apply(T a) { return abs(a); }; };
template <typename RES,typename T> struct _RawUnOp<OpReal ,RES,T> { static RES apply(T a) { return real(a); }; };
template <typename RES,typename T> struct _RawUnOp<OpImag ,RES,T> { static RES apply(T a) { return imag(a); }; };
template <typename RES,typename T> struct _RawUnOp<OpSqr ,RES,T> { static RES apply(T a) { return sqr(a); }; };
# 144 "/home/nobbi/Physik/include/etLAP/Types.h"
template <class OpTag> struct UnaryOp<OpTag,int> { typedef int Result_t; static Result_t apply(int a) { return _RawUnOp<OpTag,Result_t,int>::apply(a); }; };
template <class OpTag> struct UnaryOp<OpTag,float> { typedef float Result_t; static Result_t apply(float a) { return _RawUnOp<OpTag,Result_t,float>::apply(a); }; };
template <class OpTag> struct UnaryOp<OpTag,double> { typedef double Result_t; static Result_t apply(double a) { return _RawUnOp<OpTag,Result_t,double>::apply(a); }; };
template <class OpTag> struct UnaryOp<OpTag,long double> { typedef long double Result_t; static Result_t apply(long double a) { return _RawUnOp<OpTag,Result_t,long double>::apply(a); }; };
template <typename T> struct UnaryOp<OpIdent,std::complex<T> > { typedef std::complex<T> Result_t; static Result_t apply(std::complex<T> a) { return a; }; };
template <typename T> struct UnaryOp<OpNeg,std::complex<T> > { typedef std::complex<T> Result_t; static Result_t apply(std::complex<T> a) { return -a; }; };
template <typename T> struct UnaryOp<OpConj,std::complex<T> > { typedef std::complex<T> Result_t; static Result_t apply(std::complex<T> a) { return conj(a); }; };
template <typename T> struct UnaryOp<OpExp,std::complex<T> > { typedef std::complex<T> Result_t; static Result_t apply(std::complex<T> a) { return exp(a); }; };
template <typename T> struct UnaryOp<OpAbs,std::complex<T> > { typedef T Result_t; static Result_t apply(std::complex<T> a) { return abs(a); }; };
template <typename T> struct UnaryOp<OpReal,std::complex<T> > { typedef T Result_t; static Result_t apply(std::complex<T> a) { return real(a); }; };
template <typename T> struct UnaryOp<OpImag,std::complex<T> > { typedef T Result_t; static Result_t apply(std::complex<T> a) { return imag(a); }; };
template <typename T> struct UnaryOp<OpSqr,std::complex<T> > { typedef T Result_t; static Result_t apply(std::complex<T> a) { return sqr(a); }; };
template <class OpTag,typename T1=AnyType,typename T2=AnyType> struct BinaryOp;
template <class OpTag> struct BinaryOp<OpTag,AnyType,AnyType> {
template <typename T1,typename T2>
static typename BinaryOp<OpTag,T1,T2>::Result_t apply(T1 a,T2 b) { return BinaryOp<OpTag,T1,T2>::apply(a,b); };
};
template <> struct BinaryOp<OpRevMul,AnyType,AnyType> {
template <typename T1,typename T2>
static typename BinaryOp<OpMul,T2,T1>::Result_t apply(T1 a,T2 b) { return BinaryOp<OpMul,T2,T1>::apply(b,a); };
};
template <typename T1,typename T2>
struct BinaryOp<OpRevMul,T1,T2> {
typedef typename BinaryOp<OpMul,T2,T1>::Result_t Result_t;
static Result_t apply(T1 a,T2 b) { return BinaryOp<OpMul,T2,T1>::apply(cast1(b),cast2(a)); };
};
template <typename T>
struct BinaryOp<OpRevMul,T,T> {
typedef typename BinaryOp<OpMul,T,T>::Result_t Result_t;
static Result_t apply(T a,T b) { return BinaryOp<OpMul,T,T>::apply(cast1(b),cast2(a)); };
};
template <class OpTag,typename RES,typename T1,typename T2> struct _RawBinOp;
template <typename RES,typename T1,typename T2> struct _RawBinOp<OpAdd,RES,T1,T2> { static RES apply(T1 a,T2 b) { return a + b; }; };
template <typename RES,typename T1,typename T2> struct _RawBinOp<OpSub,RES,T1,T2> { static RES apply(T1 a,T2 b) { return a - b; }; };
template <typename RES,typename T1,typename T2> struct _RawBinOp<OpMul,RES,T1,T2> { static RES apply(T1 a,T2 b) { return a * b; }; };
template <typename RES,typename T1,typename T2> struct _RawBinOp<OpDiv,RES,T1,T2> { static RES apply(T1 a,T2 b) { return a / b; }; };
template <typename RES,typename T1,typename T2> struct _RawBinOp<OpRevMul,RES,T1,T2> { static RES apply(T1 a,T2 b) { return b * a; }; };
# 206 "/home/nobbi/Physik/include/etLAP/Types.h"
template <class OpTag> struct BinaryOp<OpTag,int,int> { typedef int Result_t; static Result_t apply(int a,int b) { return _RawBinOp<OpTag,int,int,int>::apply(a,b); } };
template <class OpTag> struct BinaryOp<OpTag,float,float> { typedef float Result_t; static Result_t apply(float a,float b) { return _RawBinOp<OpTag,float,float,float>::apply(a,b); } };
template <class OpTag> struct BinaryOp<OpTag,double,double> { typedef double Result_t; static Result_t apply(double a,double b) { return _RawBinOp<OpTag,double,double,double>::apply(a,b); } };
template <class OpTag> struct BinaryOp<OpTag,long double,long double> { typedef long double Result_t; static Result_t apply(long double a,long double b) { return _RawBinOp<OpTag,long double,long double,long double>::apply(a,b); } };
# 224 "/home/nobbi/Physik/include/etLAP/Types.h"
template <typename OpTag> struct BinaryOp<OpTag,float,int> { typedef float Result_t; static Result_t apply(float a,int b) { return BinaryOp<OpTag,float,float>::apply((float)a,(float)b); } }; template <typename OpTag> struct BinaryOp<OpTag,int,float> { typedef float Result_t; static Result_t apply(int a,float b) { return BinaryOp<OpTag,float,float>::apply((float)a,(float)b); } };
template <typename OpTag> struct BinaryOp<OpTag,double,int> { typedef double Result_t; static Result_t apply(double a,int b) { return BinaryOp<OpTag,double,double>::apply((double)a,(double)b); } }; template <typename OpTag> struct BinaryOp<OpTag,int,double> { typedef double Result_t; static Result_t apply(int a,double b) { return BinaryOp<OpTag,double,double>::apply((double)a,(double)b); } };
template <typename OpTag> struct BinaryOp<OpTag,double,float> { typedef double Result_t; static Result_t apply(double a,float b) { return BinaryOp<OpTag,double,double>::apply((double)a,(double)b); } }; template <typename OpTag> struct BinaryOp<OpTag,float,double> { typedef double Result_t; static Result_t apply(float a,double b) { return BinaryOp<OpTag,double,double>::apply((double)a,(double)b); } };
template <typename OpTag> struct BinaryOp<OpTag,long double,int> { typedef long double Result_t; static Result_t apply(long double a,int b) { return BinaryOp<OpTag,long double,long double>::apply((long double)a,(long double)b); } }; template <typename OpTag> struct BinaryOp<OpTag,int,long double> { typedef long double Result_t; static Result_t apply(int a,long double b) { return BinaryOp<OpTag,long double,long double>::apply((long double)a,(long double)b); } };
template <typename OpTag> struct BinaryOp<OpTag,long double,float> { typedef long double Result_t; static Result_t apply(long double a,float b) { return BinaryOp<OpTag,long double,long double>::apply((long double)a,(long double)b); } }; template <typename OpTag> struct BinaryOp<OpTag,float,long double> { typedef long double Result_t; static Result_t apply(float a,long double b) { return BinaryOp<OpTag,long double,long double>::apply((long double)a,(long double)b); } };
template <typename OpTag> struct BinaryOp<OpTag,long double,double> { typedef long double Result_t; static Result_t apply(long double a,double b) { return BinaryOp<OpTag,long double,long double>::apply((long double)a,(long double)b); } }; template <typename OpTag> struct BinaryOp<OpTag,double,long double> { typedef long double Result_t; static Result_t apply(double a,long double b) { return BinaryOp<OpTag,long double,long double>::apply((long double)a,(long double)b); } };
template <class OpTag,typename T1,typename T2>
struct BinaryOp<OpTag,std::complex<T1>,T2> {
typedef typename BinaryOp<OpTag,T1,T2>::Result_t Real_t;
typedef std::complex<Real_t> Result_t;
static Result_t cast1(std::complex<T1> a){return TypeCast<Result_t,std::complex<T1> >::cast(a);};
static Real_t cast2(T2 a){return TypeCast<Real_t,T2>::cast(a);};
static Result_t apply(std::complex<T1> a,T2 b) { return _RawBinOp<OpTag,Result_t,Result_t,Real_t>::apply(cast1(a),cast2(b)); };
};
template <class OpTag,typename T1,typename T2>
struct BinaryOp<OpTag,T1,std::complex<T2> > {
typedef typename BinaryOp<OpTag,T1,T2>::Result_t Real_t;
typedef std::complex<Real_t> Result_t;
static Real_t cast1(T1 a){return TypeCast<Real_t,T1>::cast(a);};
static Result_t cast2(std::complex<T2> a){return TypeCast<Result_t,std::complex<T2> >::cast(a);};
static Result_t apply(T1 a,std::complex<T2> b) { return _RawBinOp<OpTag,Result_t,Real_t,Result_t>::apply(cast1(a),cast2(b)); };
};
template <class OpTag,typename T1,typename T2>
struct BinaryOp<OpTag,std::complex<T1>,std::complex<T2> > {
typedef std::complex<typename BinaryOp<OpTag,T1,T2>::Result_t> Result_t;
static Result_t cast1(std::complex<T1> a){return TypeCast<Result_t,std::complex<T1> >::cast(a);};
static Result_t cast2(std::complex<T2> a){return TypeCast<Result_t,std::complex<T2> >::cast(a);};
static Result_t apply(std::complex<T1> a,std::complex<T2> b) { return _RawBinOp<OpTag,Result_t,Result_t,Result_t>::apply(cast1(a),cast2(b)); };
};
template <class OpTag,typename T>
struct BinaryOp<OpTag,std::complex<T>,std::complex<T> > {
typedef std::complex<T> Result_t;
static Result_t apply(std::complex<T> a,std::complex<T> b) { return _RawBinOp<OpTag,Result_t,Result_t,Result_t>::apply(a,b); };
};
template <int N1,int N2>
struct SizeCombine;
template <int N>
struct SizeCombine<N,N> { static const int n = N; };
template <int N>
struct SizeCombine<0,N> { static const int n = N; };
template <int N>
struct SizeCombine<N,0> { static const int n = N; };
template <>
struct SizeCombine<0,0> { static const int n = 0; };
# 297 "/home/nobbi/Physik/include/etLAP/Types.h"
template <typename TS> inline void assign(int &__restrict__ dest,TS src) { dest = TypeCast<int,TS>::cast(src); }; template <typename TS> inline void assign_add(int &__restrict__ dest,TS src) { dest += TypeCast<int,TS>::cast(src); }; template <typename TS> inline void assign_sub(int &__restrict__ dest,TS src) { dest -= TypeCast<int,TS>::cast(src); }; template <typename TS> inline void assign_mul(int &__restrict__ dest,TS src) { dest *= TypeCast<int,TS>::cast(src); }; template <typename TS> inline void assign_div(int &__restrict__ dest,TS src) { dest /= TypeCast<int,TS>::cast(src); };
template <typename TS> inline void assign(float &__restrict__ dest,TS src) { dest = TypeCast<float,TS>::cast(src); }; template <typename TS> inline void assign_add(float &__restrict__ dest,TS src) { dest += TypeCast<float,TS>::cast(src); }; template <typename TS> inline void assign_sub(float &__restrict__ dest,TS src) { dest -= TypeCast<float,TS>::cast(src); }; template <typename TS> inline void assign_mul(float &__restrict__ dest,TS src) { dest *= TypeCast<float,TS>::cast(src); }; template <typename TS> inline void assign_div(float &__restrict__ dest,TS src) { dest /= TypeCast<float,TS>::cast(src); };
template <typename TS> inline void assign(double &__restrict__ dest,TS src) { dest = TypeCast<double,TS>::cast(src); }; template <typename TS> inline void assign_add(double &__restrict__ dest,TS src) { dest += TypeCast<double,TS>::cast(src); }; template <typename TS> inline void assign_sub(double &__restrict__ dest,TS src) { dest -= TypeCast<double,TS>::cast(src); }; template <typename TS> inline void assign_mul(double &__restrict__ dest,TS src) { dest *= TypeCast<double,TS>::cast(src); }; template <typename TS> inline void assign_div(double &__restrict__ dest,TS src) { dest /= TypeCast<double,TS>::cast(src); };
template <typename TS> inline void assign(long double &__restrict__ dest,TS src) { dest = TypeCast<long double,TS>::cast(src); }; template <typename TS> inline void assign_add(long double &__restrict__ dest,TS src) { dest += TypeCast<long double,TS>::cast(src); }; template <typename TS> inline void assign_sub(long double &__restrict__ dest,TS src) { dest -= TypeCast<long double,TS>::cast(src); }; template <typename TS> inline void assign_mul(long double &__restrict__ dest,TS src) { dest *= TypeCast<long double,TS>::cast(src); }; template <typename TS> inline void assign_div(long double &__restrict__ dest,TS src) { dest /= TypeCast<long double,TS>::cast(src); };
# 311 "/home/nobbi/Physik/include/etLAP/Types.h"
template <typename TD,typename TS> inline void assign(std::complex<TD> &__restrict__ dest,TS src) { dest = TypeCast<std::complex<TD>,TS>::cast(src); }; template <typename TD,typename TS> inline void assign_add(std::complex<TD> &__restrict__ dest,TS src) { dest += TypeCast<std::complex<TD>,TS>::cast(src); }; template <typename TD,typename TS> inline void assign_sub(std::complex<TD> &__restrict__ dest,TS src) { dest -= TypeCast<std::complex<TD>,TS>::cast(src); }; template <typename TD,typename TS> inline void assign_mul(std::complex<TD> &__restrict__ dest,TS src) { dest *= TypeCast<std::complex<TD>,TS>::cast(src); }; template <typename TD,typename TS> inline void assign_div(std::complex<TD> &__restrict__ dest,TS src) { dest /= TypeCast<std::complex<TD>,TS>::cast(src); };
};
# 59 "/home/nobbi/Physik/include/etLAP/Common.h" 2
# 1 "/home/nobbi/Physik/include/etLAP/Traits.h" 1
# 23 "/home/nobbi/Physik/include/etLAP/Traits.h"
namespace etLAP {
template <class C> struct Traits;
};
namespace etLAP {
template <> struct Traits<int> { static const int costs = 0; static const bool flataccess = true; };
template <> struct Traits<Smart> { static const int costs = 0; static const bool flataccess = true; };
template <> struct Traits<Packed> { static const int costs = 0; static const bool flataccess = true; };
template <> struct Traits<ExtPtr> { static const int costs = 0; static const bool flataccess = true; };
template <> struct Traits<Diagonal> { static const int costs = 0; static const bool flataccess = false; };
template <> struct Traits<Scalar> { static const int costs = 0; static const bool flataccess = false; };
template <> struct Traits<Zero> { static const int costs = 0; static const bool flataccess = true; };
template <> struct Traits<One> { static const int costs = 0; static const bool flataccess = false; };
template <class A,class Op>
struct Traits<ElemUnOp<A,Op> > {
static const int costs = Traits<A>::costs + Traits<Op>::costs;
static const bool flataccess = Traits<A>::flataccess;
};
template <class A,class B,class Op>
struct Traits<ElemBinOp<A,B,Op> > {
static const int costs = Traits<A>::costs + Traits<B>::costs + Traits<Op>::costs;
static const bool flataccess = Traits<A>::flataccess && Traits<B>::flataccess;
};
template <class A,typename T,class Op>
struct Traits<ScalarOp<A,T,Op> > {
static const int costs = Traits<A>::costs + Traits<Op>::costs;
static const bool flataccess = Traits<A>::flataccess;
};
template <class A>
struct Traits<Transposed<A> > { static const int costs = Traits<A>::costs; static const bool flataccess = false; };
template <class T>
struct Traits<Row<T> > { static const int costs = Traits<T>::costs; static const bool flataccess = true; };
template <class T>
struct Traits<Column<T> > { static const int costs = Traits<T>::costs; static const bool flataccess = true; };
template <> struct Traits<Buffer> { static const int costs = 0; static const bool flataccess = true; };
template <class A>
struct Traits<NoBuffer<A> > { static const int costs = 0; static const bool flataccess = Traits<A>::flataccess; };
template <> struct Traits<OpIdent> { static const int costs = 0; };
template <> struct Traits<OpNeg> { static const int costs = 1; };
template <> struct Traits<OpConj> { static const int costs = 1; };
template <> struct Traits<OpAbs> { static const int costs = 1; };
template <> struct Traits<OpReal> { static const int costs = 0; };
template <> struct Traits<OpImag> { static const int costs = 0; };
template <> struct Traits<OpAdd> { static const int costs = 1; };
template <> struct Traits<OpSub> { static const int costs = 1; };
template <> struct Traits<OpMul> { static const int costs = 1; };
template <> struct Traits<OpDiv> { static const int costs = 1; };
template <> struct Traits<OpRevMul> { static const int costs = 1; };
};
namespace etLAP {
template <typename T,int N,class E>
struct Traits<Vector<T,N,E> > { static const int costs = Traits<E>::costs; static const bool flataccess = false; };
template <int R,int C,typename T,class E>
struct Traits<Matrix<T,R,C,E> > { static const int costs = Traits<E>::costs; static const bool flataccess = Traits<E>::flataccess; };
template <typename T1,int R1,int C1,class E1,typename T2,int R2,int C2,class E2>
struct Traits<Multiplied<Matrix<T1,R1,C1,E1>,Matrix<T2,R2,C2,E2> > > {
static const int M = SizeCombine<C1,R2>::n;
static const int factor = M?M:5;
static const int costs = factor * (Traits<E1>::costs + Traits<E2>::costs + Traits<OpMul>::costs);
static const bool flataccess = false;
};
template <typename T1,int R1,int C1,class E1,typename T2,int N2,class E2>
struct Traits<Multiplied<Matrix<T1,R1,C1,E1>,Vector<T2,N2,E2> > > {
static const int M = SizeCombine<C1,N2>::n;
static const int factor = M?M:5;
static const int costs = factor * (Traits<E1>::costs + Traits<E2>::costs + Traits<OpMul>::costs);
};
template <typename T1,int N1,class E1,typename T2,int R2,int C2,class E2>
struct Traits<Multiplied<Vector<T1,N1,E1>,Matrix<T2,R2,C2,E2> > > {
static const int M = SizeCombine<N1,R2>::n;
static const int factor = M?M:5;
static const int costs = factor * (Traits<E1>::costs + Traits<E2>::costs + Traits<OpMul>::costs);
};
};
# 60 "/home/nobbi/Physik/include/etLAP/Common.h" 2
# 1 "/home/nobbi/Physik/include/etLAP/Storage.h" 1
# 23 "/home/nobbi/Physik/include/etLAP/Storage.h"
# 1 "/usr/include/c++/3.2/memory" 1 3
# 53 "/usr/include/c++/3.2/memory" 3
# 1 "/usr/include/c++/3.2/bits/stl_algobase.h" 1 3
# 64 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
# 1 "/usr/include/c++/3.2/i386-linux/bits/c++config.h" 1 3
# 34 "/usr/include/c++/3.2/i386-linux/bits/c++config.h" 3
# 1 "/usr/include/c++/3.2/i386-linux/bits/os_defines.h" 1 3
# 39 "/usr/include/c++/3.2/i386-linux/bits/os_defines.h" 3
# 1 "/usr/include/features.h" 1 3
# 283 "/usr/include/features.h" 3
# 1 "/usr/include/sys/cdefs.h" 1 3
# 284 "/usr/include/features.h" 2 3
# 312 "/usr/include/features.h" 3
# 1 "/usr/include/gnu/stubs.h" 1 3
# 313 "/usr/include/features.h" 2 3
# 40 "/usr/include/c++/3.2/i386-linux/bits/os_defines.h" 2 3
# 35 "/usr/include/c++/3.2/i386-linux/bits/c++config.h" 2 3
# 65 "/usr/include/c++/3.2/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/3.2/cstring" 1 3
# 48 "/usr/include/c++/3.2/cstring" 3
# 1 "/usr/include/c++/3.2/cstddef" 1 3
# 47 "/usr/include/c++/3.2/cstddef" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 151 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 3
typedef int ptrdiff_t;
# 213 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 3
typedef unsigned int size_t;
# 49 "/usr/include/c++/3.2/cstddef" 2 3
namespace std
{
using ::ptrdiff_t;
using ::size_t;
}
# 50 "/usr/include/c++/3.2/cstring" 2 3
# 1 "/usr/include/string.h" 1 3
# 28 "/usr/include/string.h" 3
extern "C" {
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 34 "/usr/include/string.h" 2 3
extern void *memcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n) throw ();
extern void *memmove (void *__dest, __const void *__src, size_t __n)
throw ();
extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
int __c, size_t __n)
throw ();
extern void *memset (void *__s, int __c, size_t __n) throw ();
extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
throw () __attribute__ ((__pure__));
extern void *memchr (__const void *__s, int __c, size_t __n)
throw () __attribute__ ((__pure__));
extern void *rawmemchr (__const void *__s, int __c) throw () __attribute__ ((__pure__));
extern void *memrchr (__const void *__s, int __c, size_t __n)
throw () __attribute__ ((__pure__));
extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
throw ();
extern char *strncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n) throw ();
extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
throw ();
extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
size_t __n) throw ();
extern int strcmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__));
extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
throw () __attribute__ ((__pure__));
extern int strcoll (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__));
extern size_t strxfrm (char *__restrict __dest,
__const char *__restrict __src, size_t __n) throw ();
# 1 "/usr/include/xlocale.h" 1 3
# 28 "/usr/include/xlocale.h" 3
typedef struct __locale_struct
{
struct locale_data *__locales[13];
const unsigned short int *__ctype_b;
const int *__ctype_tolower;
const int *__ctype_toupper;
} *__locale_t;
# 109 "/usr/include/string.h" 2 3
extern int __strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
throw () __attribute__ ((__pure__));
extern size_t __strxfrm_l (char *__dest, __const char *__src, size_t __n,
__locale_t __l) throw ();
extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__));
extern char *strndup (__const char *__string, size_t __n)
throw () __attribute__ ((__malloc__));
# 155 "/usr/include/string.h" 3
extern char *strchr (__const char *__s, int __c) throw () __attribute__ ((__pure__));
extern char *strrchr (__const char *__s, int __c) throw () __attribute__ ((__pure__));
extern char *strchrnul (__const char *__s, int __c) throw () __attribute__ ((__pure__));
extern size_t strcspn (__const char *__s, __const char *__reject)
throw () __attribute__ ((__pure__));
extern size_t strspn (__const char *__s, __const char *__accept)
throw () __attribute__ ((__pure__));
extern char *strpbrk (__const char *__s, __const char *__accept)
throw () __attribute__ ((__pure__));
extern char *strstr (__const char *__haystack, __const char *__needle)
throw () __attribute__ ((__pure__));
extern char *strcasestr (__const char *__haystack, __const char *__needle)
throw () __attribute__ ((__pure__));
extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
throw ();
extern char *__strtok_r (char *__restrict __s,
__const char *__restrict __delim,
char **__restrict __save_ptr) throw ();
extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
char **__restrict __save_ptr) throw ();
extern void *memmem (__const void *__haystack, size_t __haystacklen,
__const void *__needle, size_t __needlelen)
throw () __attribute__ ((__pure__));
extern void *__mempcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n) throw ();
extern void *mempcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n) throw ();
extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__));
extern size_t strnlen (__const char *__string, size_t __maxlen)
throw () __attribute__ ((__pure__));
extern char *strerror (int __errnum) throw ();
extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw ();
extern void __bzero (void *__s, size_t __n) throw ();
extern void bcopy (__const void *__src, void *__dest, size_t __n) throw ();
extern void bzero (void *__s, size_t __n) throw ();
extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
throw () __attribute__ ((__pure__));
extern char *index (__const char *__s, int __c) throw () __attribute__ ((__pure__));
extern char *rindex (__const char *__s, int __c) throw () __attribute__ ((__pure__));
extern int ffs (int __i) throw () __attribute__ ((__const__));
extern int ffsl (long int __l) throw () __attribute__ ((__const__));
__extension__ extern int ffsll (long long int __ll)
throw () __attribute__ ((__const__));
extern int strcasecmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__));
extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
throw () __attribute__ ((__pure__));
extern int __strcasecmp_l (__const char *__s1, __const char *__s2,
__locale_t __loc) throw () __attribute__ ((__pure__));
extern int __strncasecmp_l (__const char *__s1, __const char *__s2,
size_t __n, __locale_t __loc)
throw () __attribute__ ((__pure__));
extern char *strsep (char **__restrict __stringp,
__const char *__restrict __delim) throw ();
extern int strverscmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__));
extern char *strsignal (int __sig) throw ();
extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
throw ();
extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
throw ();
extern char *__stpncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n) throw ();
extern char *stpncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n) throw ();
extern char *strfry (char *__string) throw ();
extern void *memfrob (void *__s, size_t __n) throw ();
extern char *basename (__const char *__filename) throw ();
# 364 "/usr/include/string.h" 3
}
# 52 "/usr/include/c++/3.2/cstring" 2 3
# 77 "/usr/include/c++/3.2/cstring" 3
namespace std
{
using ::memcpy;
using ::memmove;
using ::strcpy;
using ::strncpy;
using ::strcat;
using ::strncat;
using ::memcmp;
using ::strcmp;
using ::strcoll;
using ::strncmp;
using ::strxfrm;
using ::strcspn;
using ::strspn;
using ::strtok;
using ::memset;
using ::strerror;
using ::strlen;
using ::memchr;
inline void*
memchr(void* __p, int __c, size_t __n)
{ return memchr(const_cast<const void*>(__p), __c, __n); }
using ::strchr;
inline char*
strchr(char* __s1, int __n)
{ return __builtin_strchr(const_cast<const char*>(__s1), __n); }
using ::strpbrk;
inline char*
strpbrk(char* __s1, const char* __s2)
{ return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); }
using ::strrchr;
inline char*
strrchr(char* __s1, int __n)
{ return __builtin_strrchr(const_cast<const char*>(__s1), __n); }
using ::strstr;
inline char*
strstr(char* __s1, const char* __s2)
{ return __builtin_strstr(const_cast<const char*>(__s1), __s2); }
}
# 66 "/usr/include/c++/3.2/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/3.2/climits" 1 3
# 48 "/usr/include/c++/3.2/climits" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/limits.h" 1 3
# 11 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/limits.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/syslimits.h" 1 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/limits.h" 1 3
# 132 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/limits.h" 3
# 1 "/usr/include/limits.h" 1 3
# 144 "/usr/include/limits.h" 3
# 1 "/usr/include/bits/posix1_lim.h" 1 3
# 126 "/usr/include/bits/posix1_lim.h" 3
# 1 "/usr/include/bits/local_lim.h" 1 3
# 36 "/usr/include/bits/local_lim.h" 3
# 1 "/usr/include/linux/limits.h" 1 3
# 37 "/usr/include/bits/local_lim.h" 2 3
# 127 "/usr/include/bits/posix1_lim.h" 2 3
# 145 "/usr/include/limits.h" 2 3
# 1 "/usr/include/bits/posix2_lim.h" 1 3
# 149 "/usr/include/limits.h" 2 3
# 1 "/usr/include/bits/xopen_lim.h" 1 3
# 34 "/usr/include/bits/xopen_lim.h" 3
# 1 "/usr/include/bits/stdio_lim.h" 1 3
# 35 "/usr/include/bits/xopen_lim.h" 2 3
# 136 "/usr/include/bits/xopen_lim.h" 3
# 1 "/usr/include/bits/wordsize.h" 1 3
# 137 "/usr/include/bits/xopen_lim.h" 2 3
# 153 "/usr/include/limits.h" 2 3
# 133 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/limits.h" 2 3
# 8 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/syslimits.h" 2 3
# 12 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/limits.h" 2 3
# 50 "/usr/include/c++/3.2/climits" 2 3
# 67 "/usr/include/c++/3.2/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/3.2/cstdlib" 1 3
# 48 "/usr/include/c++/3.2/cstdlib" 3
# 1 "/usr/include/stdlib.h" 1 3
# 33 "/usr/include/stdlib.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 34 "/usr/include/stdlib.h" 2 3
extern "C" {
# 1 "/usr/include/bits/waitflags.h" 1 3
# 43 "/usr/include/stdlib.h" 2 3
# 1 "/usr/include/bits/waitstatus.h" 1 3
# 63 "/usr/include/bits/waitstatus.h" 3
# 1 "/usr/include/endian.h" 1 3
# 37 "/usr/include/endian.h" 3
# 1 "/usr/include/bits/endian.h" 1 3
# 38 "/usr/include/endian.h" 2 3
# 64 "/usr/include/bits/waitstatus.h" 2 3
union wait
{
int w_status;
struct
{
unsigned int __w_termsig:7;
unsigned int __w_coredump:1;
unsigned int __w_retcode:8;
unsigned int:16;
} __wait_terminated;
struct
{
unsigned int __w_stopval:8;
unsigned int __w_stopsig:8;
unsigned int:16;
} __wait_stopped;
};
# 44 "/usr/include/stdlib.h" 2 3
# 94 "/usr/include/stdlib.h" 3
typedef struct
{
int quot;
int rem;
} div_t;
typedef struct
{
long int quot;
long int rem;
} ldiv_t;
__extension__ typedef struct
{
long long int quot;
long long int rem;
} lldiv_t;
# 133 "/usr/include/stdlib.h" 3
extern size_t __ctype_get_mb_cur_max (void) throw ();
extern double atof (__const char *__nptr) throw () __attribute__ ((__pure__));
extern int atoi (__const char *__nptr) throw () __attribute__ ((__pure__));
extern long int atol (__const char *__nptr) throw () __attribute__ ((__pure__));
__extension__ extern long long int atoll (__const char *__nptr)
throw () __attribute__ ((__pure__));
extern double strtod (__const char *__restrict __nptr,
char **__restrict __endptr) throw ();
extern float strtof (__const char *__restrict __nptr,
char **__restrict __endptr) throw ();
extern long double strtold (__const char *__restrict __nptr,
char **__restrict __endptr) throw ();
extern long int strtol (__const char *__restrict __nptr,
char **__restrict __endptr, int __base) throw ();
extern unsigned long int strtoul (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw ();
__extension__
extern long long int strtoq (__const char *__restrict __nptr,
char **__restrict __endptr, int __base) throw ();
__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw ();
__extension__
extern long long int strtoll (__const char *__restrict __nptr,
char **__restrict __endptr, int __base) throw ();
__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw ();
# 215 "/usr/include/stdlib.h" 3
extern long int __strtol_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
__locale_t __loc) throw ();
extern unsigned long int __strtoul_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc) throw ();
__extension__
extern long long int __strtoll_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
__locale_t __loc) throw ();
__extension__
extern unsigned long long int __strtoull_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
throw ();
extern double __strtod_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
throw ();
extern float __strtof_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc) throw ();
extern long double __strtold_l (__const char *__restrict __nptr,
char **__restrict __endptr,
__locale_t __loc) throw ();
extern double __strtod_internal (__const char *__restrict __nptr,
char **__restrict __endptr, int __group)
throw ();
extern float __strtof_internal (__const char *__restrict __nptr,
char **__restrict __endptr, int __group)
throw ();
extern long double __strtold_internal (__const char *__restrict __nptr,
char **__restrict __endptr,
int __group) throw ();
extern long int __strtol_internal (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, int __group) throw ();
extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, int __group) throw ();
__extension__
extern long long int __strtoll_internal (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, int __group) throw ();
__extension__
extern unsigned long long int __strtoull_internal (__const char *
__restrict __nptr,
char **__restrict __endptr,
int __base, int __group)
throw ();
extern __inline double
strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
{
return __strtod_internal (__nptr, __endptr, 0);
}
extern __inline long int
strtol (__const char *__restrict __nptr, char **__restrict __endptr,
int __base) throw ()
{
return __strtol_internal (__nptr, __endptr, __base, 0);
}
extern __inline unsigned long int
strtoul (__const char *__restrict __nptr, char **__restrict __endptr,
int __base) throw ()
{
return __strtoul_internal (__nptr, __endptr, __base, 0);
}
extern __inline float
strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
{
return __strtof_internal (__nptr, __endptr, 0);
}
extern __inline long double
strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
{
return __strtold_internal (__nptr, __endptr, 0);
}
__extension__ extern __inline long long int
strtoq (__const char *__restrict __nptr, char **__restrict __endptr,
int __base) throw ()
{
return __strtoll_internal (__nptr, __endptr, __base, 0);
}
__extension__ extern __inline unsigned long long int
strtouq (__const char *__restrict __nptr, char **__restrict __endptr,
int __base) throw ()
{
return __strtoull_internal (__nptr, __endptr, __base, 0);
}
__extension__ extern __inline long long int
strtoll (__const char *__restrict __nptr, char **__restrict __endptr,
int __base) throw ()
{
return __strtoll_internal (__nptr, __endptr, __base, 0);
}
__extension__ extern __inline unsigned long long int
strtoull (__const char * __restrict __nptr, char **__restrict __endptr,
int __base) throw ()
{
return __strtoull_internal (__nptr, __endptr, __base, 0);
}
extern __inline double
atof (__const char *__nptr) throw ()
{
return strtod (__nptr, (char **) __null);
}
extern __inline int
atoi (__const char *__nptr) throw ()
{
return (int) strtol (__nptr, (char **) __null, 10);
}
extern __inline long int
atol (__const char *__nptr) throw ()
{
return strtol (__nptr, (char **) __null, 10);
}
__extension__ extern __inline long long int
atoll (__const char *__nptr) throw ()
{
return strtoll (__nptr, (char **) __null, 10);
}
# 384 "/usr/include/stdlib.h" 3
extern char *l64a (long int __n) throw ();
extern long int a64l (__const char *__s) throw () __attribute__ ((__pure__));
# 1 "/usr/include/sys/types.h" 1 3
# 28 "/usr/include/sys/types.h" 3
extern "C" {
# 1 "/usr/include/bits/types.h" 1 3
# 29 "/usr/include/bits/types.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 30 "/usr/include/bits/types.h" 2 3
typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;
__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;
# 49 "/usr/include/bits/types.h" 3
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
typedef __quad_t *__qaddr_t;
typedef __u_quad_t __dev_t;
typedef __u_int __uid_t;
typedef __u_int __gid_t;
typedef __u_long __ino_t;
typedef __u_int __mode_t;
typedef __u_int __nlink_t;
typedef long int __off_t;
typedef __quad_t __loff_t;
typedef int __pid_t;
typedef int __ssize_t;
typedef __u_long __rlim_t;
typedef __u_quad_t __rlim64_t;
typedef __u_int __id_t;
typedef struct
{
int __val[2];
} __fsid_t;
typedef int __daddr_t;
typedef char *__caddr_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
typedef long int __swblk_t;
typedef long int __clock_t;
typedef int __clockid_t;
typedef int __timer_t;
typedef int __key_t;
typedef unsigned short int __ipc_pid_t;
typedef long int __blksize_t;
typedef long int __blkcnt_t;
typedef __quad_t __blkcnt64_t;
typedef __u_long __fsblkcnt_t;
typedef __u_quad_t __fsblkcnt64_t;
typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;
typedef __u_quad_t __ino64_t;
typedef __loff_t __off64_t;
typedef long int __t_scalar_t;
typedef unsigned long int __t_uscalar_t;
typedef int __intptr_t;
typedef unsigned int __socklen_t;
# 1 "/usr/include/bits/pthreadtypes.h" 1 3
# 23 "/usr/include/bits/pthreadtypes.h" 3
# 1 "/usr/include/bits/sched.h" 1 3
# 68 "/usr/include/bits/sched.h" 3
struct __sched_param
{
int __sched_priority;
};
# 24 "/usr/include/bits/pthreadtypes.h" 2 3
typedef int __atomic_lock_t;
struct _pthread_fastlock
{
long int __status;
__atomic_lock_t __spinlock;
};
typedef struct _pthread_descr_struct *_pthread_descr;
typedef struct __pthread_attr_s
{
int __detachstate;
int __schedpolicy;
struct __sched_param __schedparam;
int __inheritsched;
int __scope;
size_t __guardsize;
int __stackaddr_set;
void *__stackaddr;
size_t __stacksize;
} pthread_attr_t;
typedef struct
{
struct _pthread_fastlock __c_lock;
_pthread_descr __c_waiting;
} pthread_cond_t;
typedef struct
{
int __dummy;
} pthread_condattr_t;
typedef unsigned int pthread_key_t;
typedef struct
{
int __m_reserved;
int __m_count;
_pthread_descr __m_owner;
int __m_kind;
struct _pthread_fastlock __m_lock;
} pthread_mutex_t;
typedef struct
{
int __mutexkind;
} pthread_mutexattr_t;
typedef int pthread_once_t;
typedef struct _pthread_rwlock_t
{
struct _pthread_fastlock __rw_lock;
int __rw_readers;
_pthread_descr __rw_writer;
_pthread_descr __rw_read_waiting;
_pthread_descr __rw_write_waiting;
int __rw_kind;
int __rw_pshared;
} pthread_rwlock_t;
typedef struct
{
int __lockkind;
int __pshared;
} pthread_rwlockattr_t;
typedef volatile int pthread_spinlock_t;
typedef struct {
struct _pthread_fastlock __ba_lock;
int __ba_required;
int __ba_present;
_pthread_descr __ba_waiting;
} pthread_barrier_t;
typedef struct {
int __pshared;
} pthread_barrierattr_t;
typedef unsigned long int pthread_t;
# 144 "/usr/include/bits/types.h" 2 3
# 31 "/usr/include/sys/types.h" 2 3
typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
typedef __loff_t loff_t;
typedef __ino_t ino_t;
typedef __ino64_t ino64_t;
typedef __dev_t dev_t;
typedef __gid_t gid_t;
typedef __mode_t mode_t;
typedef __nlink_t nlink_t;
typedef __uid_t uid_t;
typedef __off_t off_t;
typedef __off64_t off64_t;
typedef __pid_t pid_t;
typedef __id_t id_t;
typedef __ssize_t ssize_t;
typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
typedef __key_t key_t;
# 132 "/usr/include/sys/types.h" 3
# 1 "/usr/include/time.h" 1 3
# 59 "/usr/include/time.h" 3
typedef __clock_t clock_t;
# 70 "/usr/include/time.h" 3
typedef __time_t time_t;
# 82 "/usr/include/time.h" 3
typedef __clockid_t clockid_t;
# 94 "/usr/include/time.h" 3
typedef __timer_t timer_t;
# 133 "/usr/include/sys/types.h" 2 3
typedef __useconds_t useconds_t;
typedef __suseconds_t suseconds_t;
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 147 "/usr/include/sys/types.h" 2 3
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int unsigned int;
# 190 "/usr/include/sys/types.h" 3
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
typedef int register_t __attribute__ ((__mode__ (__word__)));
# 215 "/usr/include/sys/types.h" 3
# 1 "/usr/include/sys/select.h" 1 3
# 31 "/usr/include/sys/select.h" 3
# 1 "/usr/include/bits/select.h" 1 3
# 32 "/usr/include/sys/select.h" 2 3
# 1 "/usr/include/bits/sigset.h" 1 3
# 23 "/usr/include/bits/sigset.h" 3
typedef int __sig_atomic_t;
typedef struct
{
unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
} __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3
typedef __sigset_t sigset_t;
# 1 "/usr/include/time.h" 1 3
# 106 "/usr/include/time.h" 3
struct timespec
{
__time_t tv_sec;
long int tv_nsec;
};
# 45 "/usr/include/sys/select.h" 2 3
# 1 "/usr/include/bits/time.h" 1 3
# 67 "/usr/include/bits/time.h" 3
struct timeval
{
__time_t tv_sec;
__suseconds_t tv_usec;
};
# 47 "/usr/include/sys/select.h" 2 3
# 55 "/usr/include/sys/select.h" 3
typedef long int __fd_mask;
typedef struct
{
__fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];
} fd_set;
typedef __fd_mask fd_mask;
# 95 "/usr/include/sys/select.h" 3
extern "C" {
extern int select (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
struct timeval *__restrict __timeout) throw ();
extern int pselect (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
const struct timespec *__restrict __timeout,
const __sigset_t *__restrict __sigmask) throw ();
}
# 216 "/usr/include/sys/types.h" 2 3
# 1 "/usr/include/sys/sysmacros.h" 1 3
# 219 "/usr/include/sys/types.h" 2 3
typedef __blksize_t blksize_t;
typedef __blkcnt_t blkcnt_t;
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
# 257 "/usr/include/sys/types.h" 3
typedef __blkcnt64_t blkcnt64_t;
typedef __fsblkcnt64_t fsblkcnt64_t;
typedef __fsfilcnt64_t fsfilcnt64_t;
}
# 391 "/usr/include/stdlib.h" 2 3
extern long int random (void) throw ();
extern void srandom (unsigned int __seed) throw ();
extern char *initstate (unsigned int __seed, char *__statebuf,
size_t __statelen) throw ();
extern char *setstate (char *__statebuf) throw ();
struct random_data
{
int32_t *fptr;
int32_t *rptr;
int32_t *state;
int rand_type;
int rand_deg;
int rand_sep;
int32_t *end_ptr;
};
extern int random_r (struct random_data *__restrict __buf,
int32_t *__restrict __result) throw ();
extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw ();
extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
size_t __statelen,
struct random_data *__restrict __buf) throw ();
extern int setstate_r (char *__restrict __statebuf,
struct random_data *__restrict __buf) throw ();
extern int rand (void) throw ();
extern void srand (unsigned int __seed) throw ();
extern int rand_r (unsigned int *__seed) throw ();
extern double drand48 (void) throw ();
extern double erand48 (unsigned short int __xsubi[3]) throw ();
extern long int lrand48 (void) throw ();
extern long int nrand48 (unsigned short int __xsubi[3]) throw ();
extern long int mrand48 (void) throw ();
extern long int jrand48 (unsigned short int __xsubi[3]) throw ();
extern void srand48 (long int __seedval) throw ();
extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw ();
extern void lcong48 (unsigned short int __param[7]) throw ();
struct drand48_data
{
unsigned short int __x[3];
unsigned short int __old_x[3];
unsigned short int __c;
unsigned short int __init;
unsigned long long int __a;
};
extern int drand48_r (struct drand48_data *__restrict __buffer,
double *__restrict __result) throw ();
extern int erand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
double *__restrict __result) throw ();
extern int lrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result) throw ();
extern int nrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result) throw ();
extern int mrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result) throw ();
extern int jrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result) throw ();
extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
throw ();
extern int seed48_r (unsigned short int __seed16v[3],
struct drand48_data *__buffer) throw ();
extern int lcong48_r (unsigned short int __param[7],
struct drand48_data *__buffer) throw ();
# 527 "/usr/include/stdlib.h" 3
extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__));
extern void *calloc (size_t __nmemb, size_t __size)
throw () __attribute__ ((__malloc__));
extern void *realloc (void *__ptr, size_t __size) throw () __attribute__ ((__malloc__));
extern void free (void *__ptr) throw ();
extern void cfree (void *__ptr) throw ();
# 1 "/usr/include/alloca.h" 1 3
# 25 "/usr/include/alloca.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 26 "/usr/include/alloca.h" 2 3
extern "C" {
extern void *alloca (size_t __size) throw ();
}
# 547 "/usr/include/stdlib.h" 2 3
extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__));
extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
throw () __attribute__ ((__malloc__));
extern void abort (void) throw () __attribute__ ((__noreturn__));
extern int atexit (void (*__func) (void)) throw ();
extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
throw ();
extern void exit (int __status) throw () __attribute__ ((__noreturn__));
extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
extern char *getenv (__const char *__name) throw ();
extern char *__secure_getenv (__const char *__name) throw ();
extern int putenv (char *__string) throw ();
extern int setenv (__const char *__name, __const char *__value, int __replace)
throw ();
extern int unsetenv (__const char *__name) throw ();
extern int clearenv (void) throw ();
# 623 "/usr/include/stdlib.h" 3
extern char *mktemp (char *__template) throw ();
extern int mkstemp (char *__template) throw ();
# 640 "/usr/include/stdlib.h" 3
extern int mkstemp64 (char *__template) throw ();
# 650 "/usr/include/stdlib.h" 3
extern char *mkdtemp (char *__template) throw ();
extern int system (__const char *__command) throw ();
extern char *canonicalize_file_name (__const char *__name) throw ();
# 672 "/usr/include/stdlib.h" 3
extern char *realpath (__const char *__restrict __name,
char *__restrict __resolved) throw ();
typedef int (*__compar_fn_t) (__const void *, __const void *);
typedef __compar_fn_t comparison_fn_t;
extern void *bsearch (__const void *__key, __const void *__base,
size_t __nmemb, size_t __size, __compar_fn_t __compar);
extern void qsort (void *__base, size_t __nmemb, size_t __size,
__compar_fn_t __compar);
extern int abs (int __x) throw () __attribute__ ((__const__));
extern long int labs (long int __x) throw () __attribute__ ((__const__));
__extension__ extern long long int llabs (long long int __x)
throw () __attribute__ ((__const__));
extern div_t div (int __numer, int __denom)
throw () __attribute__ ((__const__));
extern ldiv_t ldiv (long int __numer, long int __denom)
throw () __attribute__ ((__const__));
__extension__ extern lldiv_t lldiv (long long int __numer,
long long int __denom)
throw () __attribute__ ((__const__));
# 728 "/usr/include/stdlib.h" 3
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) throw ();
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) throw ();
extern char *gcvt (double __value, int __ndigit, char *__buf) throw ();
extern char *qecvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign) throw ();
extern char *qfcvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign) throw ();
extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw ();
extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) throw ();
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) throw ();
extern int qecvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len) throw ();
extern int qfcvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len) throw ();
extern int mblen (__const char *__s, size_t __n) throw ();
extern int mbtowc (wchar_t *__restrict __pwc,
__const char *__restrict __s, size_t __n) throw ();
extern int wctomb (char *__s, wchar_t __wchar) throw ();
extern size_t mbstowcs (wchar_t *__restrict __pwcs,
__const char *__restrict __s, size_t __n) throw ();
extern size_t wcstombs (char *__restrict __s,
__const wchar_t *__restrict __pwcs, size_t __n)
throw ();
extern int rpmatch (__const char *__response) throw ();
# 808 "/usr/include/stdlib.h" 3
extern int getsubopt (char **__restrict __optionp,
char *__const *__restrict __tokens,
char **__restrict __valuep) throw ();
extern void setkey (__const char *__key) throw ();
extern int posix_openpt (int __oflag) throw ();
extern int grantpt (int __fd) throw ();
extern int unlockpt (int __fd) throw ();
extern char *ptsname (int __fd) throw ();
extern int ptsname_r (int __fd, char *__buf, size_t __buflen) throw ();
extern int getpt (void) throw ();
extern int getloadavg (double __loadavg[], int __nelem) throw ();
}
# 53 "/usr/include/c++/3.2/cstdlib" 2 3
# 84 "/usr/include/c++/3.2/cstdlib" 3
namespace std
{
using ::div_t;
using ::ldiv_t;
using ::abort;
using ::abs;
using ::atexit;
using ::atof;
using ::atoi;
using ::atol;
using ::bsearch;
using ::calloc;
using ::div;
using ::exit;
using ::free;
using ::getenv;
using ::labs;
using ::ldiv;
using ::malloc;
using ::mblen;
using ::mbstowcs;
using ::mbtowc;
using ::qsort;
using ::rand;
using ::realloc;
using ::srand;
using ::strtod;
using ::strtol;
using ::strtoul;
using ::system;
using ::wcstombs;
using ::wctomb;
inline long
abs(long __i) { return labs(__i); }
inline ldiv_t
div(long __i, long __j) { return ldiv(__i, __j); }
}
# 136 "/usr/include/c++/3.2/cstdlib" 3
namespace __gnu_cxx
{
using ::lldiv_t;
using ::_Exit;
inline long long
abs(long long __x) { return __x >= 0 ? __x : -__x; }
inline long long
llabs(long long __x) { return __x >= 0 ? __x : -__x; }
inline lldiv_t
div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline lldiv_t
lldiv(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
using ::atoll;
using ::strtof;
using ::strtoll;
using ::strtoull;
using ::strtold;
}
namespace std
{
using __gnu_cxx::lldiv_t;
using __gnu_cxx::_Exit;
using __gnu_cxx::abs;
using __gnu_cxx::llabs;
using __gnu_cxx::div;
using __gnu_cxx::lldiv;
using __gnu_cxx::atoll;
using __gnu_cxx::strtof;
using __gnu_cxx::strtoll;
using __gnu_cxx::strtoull;
using __gnu_cxx::strtold;
}
# 68 "/usr/include/c++/3.2/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/3.2/new" 1 3
# 42 "/usr/include/c++/3.2/new" 3
# 1 "/usr/include/c++/3.2/exception" 1 3
# 40 "/usr/include/c++/3.2/exception" 3
extern "C++" {
namespace std
{
class exception
{
public:
exception() throw() { }
virtual ~exception() throw();
virtual const char* what() const throw();
};
class bad_exception : public exception
{
public:
bad_exception() throw() { }
virtual ~bad_exception() throw();
};
typedef void (*terminate_handler) ();
typedef void (*unexpected_handler) ();
terminate_handler set_terminate(terminate_handler) throw();
void terminate() __attribute__ ((__noreturn__));
unexpected_handler set_unexpected(unexpected_handler) throw();
void unexpected() __attribute__ ((__noreturn__));
# 98 "/usr/include/c++/3.2/exception" 3
bool uncaught_exception() throw();
}
namespace __gnu_cxx
{
# 111 "/usr/include/c++/3.2/exception" 3
void __verbose_terminate_handler ();
}
}
# 43 "/usr/include/c++/3.2/new" 2 3
extern "C++" {
namespace std
{
class bad_alloc : public exception
{
public:
bad_alloc() throw() { }
virtual ~bad_alloc() throw();
};
struct nothrow_t { };
extern const nothrow_t nothrow;
typedef void (*new_handler)();
new_handler set_new_handler(new_handler) throw();
}
# 79 "/usr/include/c++/3.2/new" 3
void* operator new(std::size_t) throw (std::bad_alloc);
void* operator new[](std::size_t) throw (std::bad_alloc);
void operator delete(void*) throw();
void operator delete[](void*) throw();
void* operator new(std::size_t, const std::nothrow_t&) throw();
void* operator new[](std::size_t, const std::nothrow_t&) throw();
void operator delete(void*, const std::nothrow_t&) throw();
void operator delete[](void*, const std::nothrow_t&) throw();
inline void* operator new(std::size_t, void* __p) throw() { return __p; }
inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
inline void operator delete (void*, void*) throw() { };
inline void operator delete[](void*, void*) throw() { };
}
# 70 "/usr/include/c++/3.2/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/3.2/iosfwd" 1 3
# 43 "/usr/include/c++/3.2/iosfwd" 3
# 1 "/usr/include/c++/3.2/bits/stringfwd.h" 1 3
# 43 "/usr/include/c++/3.2/bits/stringfwd.h" 3
namespace std
{
template<typename _Alloc>
class allocator;
template<class _CharT>
struct char_traits;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_string;
template<> struct char_traits<char>;
typedef basic_string<char> string;
template<> struct char_traits<wchar_t>;
typedef basic_string<wchar_t> wstring;
}
# 46 "/usr/include/c++/3.2/iosfwd" 2 3
# 1 "/usr/include/c++/3.2/bits/fpos.h" 1 3
# 43 "/usr/include/c++/3.2/bits/fpos.h" 3
# 1 "/usr/include/c++/3.2/i386-linux/bits/c++io.h" 1 3
# 35 "/usr/include/c++/3.2/i386-linux/bits/c++io.h" 3
# 1 "/usr/include/c++/3.2/cstdio" 1 3
# 48 "/usr/include/c++/3.2/cstdio" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 1 3
# 39 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
extern "C" {
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 44 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 2 3
# 54 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
typedef struct _IO_FILE FILE;
# 64 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
typedef struct _IO_FILE __FILE;
# 74 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
# 1 "/usr/include/libio.h" 1 3
# 32 "/usr/include/libio.h" 3
# 1 "/usr/include/_G_config.h" 1 3
# 14 "/usr/include/_G_config.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 354 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 3
typedef unsigned int wint_t;
# 15 "/usr/include/_G_config.h" 2 3
# 24 "/usr/include/_G_config.h" 3
# 1 "/usr/include/wchar.h" 1 3
# 48 "/usr/include/wchar.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 49 "/usr/include/wchar.h" 2 3
# 1 "/usr/include/bits/wchar.h" 1 3
# 51 "/usr/include/wchar.h" 2 3
# 67 "/usr/include/wchar.h" 3
typedef struct
{
int __count;
union
{
wint_t __wch;
char __wchb[4];
} __value;
} __mbstate_t;
# 25 "/usr/include/_G_config.h" 2 3
typedef struct
{
__off_t __pos;
__mbstate_t __state;
} _G_fpos_t;
typedef struct
{
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
# 44 "/usr/include/_G_config.h" 3
# 1 "/usr/include/gconv.h" 1 3
# 28 "/usr/include/gconv.h" 3
# 1 "/usr/include/wchar.h" 1 3
# 48 "/usr/include/wchar.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 49 "/usr/include/wchar.h" 2 3
# 29 "/usr/include/gconv.h" 2 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 32 "/usr/include/gconv.h" 2 3
enum
{
__GCONV_OK = 0,
__GCONV_NOCONV,
__GCONV_NODB,
__GCONV_NOMEM,
__GCONV_EMPTY_INPUT,
__GCONV_FULL_OUTPUT,
__GCONV_ILLEGAL_INPUT,
__GCONV_INCOMPLETE_INPUT,
__GCONV_ILLEGAL_DESCRIPTOR,
__GCONV_INTERNAL_ERROR
};
enum
{
__GCONV_IS_LAST = 0x0001,
__GCONV_IGNORE_ERRORS = 0x0002
};
struct __gconv_step;
struct __gconv_step_data;
struct __gconv_loaded_object;
struct __gconv_trans_data;
typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
__const unsigned char **, __const unsigned char *,
unsigned char **, size_t *, int, int);
typedef int (*__gconv_init_fct) (struct __gconv_step *);
typedef void (*__gconv_end_fct) (struct __gconv_step *);
typedef int (*__gconv_trans_fct) (struct __gconv_step *,
struct __gconv_step_data *, void *,
__const unsigned char *,
__const unsigned char **,
__const unsigned char *, unsigned char **,
size_t *);
typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
__const unsigned char *,
unsigned char *, unsigned char *);
typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
size_t *);
typedef int (*__gconv_trans_init_fct) (void **, const char *);
typedef void (*__gconv_trans_end_fct) (void *);
struct __gconv_trans_data
{
__gconv_trans_fct __trans_fct;
__gconv_trans_context_fct __trans_context_fct;
__gconv_trans_end_fct __trans_end_fct;
void *__data;
struct __gconv_trans_data *__next;
};
struct __gconv_step
{
struct __gconv_loaded_object *__shlib_handle;
__const char *__modname;
int __counter;
char *__from_name;
char *__to_name;
__gconv_fct __fct;
__gconv_init_fct __init_fct;
__gconv_end_fct __end_fct;
int __min_needed_from;
int __max_needed_from;
int __min_needed_to;
int __max_needed_to;
int __stateful;
void *__data;
};
struct __gconv_step_data
{
unsigned char *__outbuf;
unsigned char *__outbufend;
int __flags;
int __invocation_counter;
int __internal_use;
__mbstate_t *__statep;
__mbstate_t __state;
struct __gconv_trans_data *__trans;
};
typedef struct __gconv_info
{
size_t __nsteps;
struct __gconv_step *__steps;
__extension__ struct __gconv_step_data __data [];
} *__gconv_t;
# 45 "/usr/include/_G_config.h" 2 3
typedef union
{
struct __gconv_info __cd;
struct
{
struct __gconv_info __cd;
struct __gconv_step_data __data;
} __combined;
} _G_iconv_t;
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 33 "/usr/include/libio.h" 2 3
# 53 "/usr/include/libio.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdarg.h" 1 3
# 43 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdarg.h" 3
typedef __builtin_va_list __gnuc_va_list;
# 54 "/usr/include/libio.h" 2 3
# 160 "/usr/include/libio.h" 3
struct _IO_jump_t; struct _IO_FILE;
# 170 "/usr/include/libio.h" 3
typedef void _IO_lock_t;
struct _IO_marker {
struct _IO_marker *_next;
struct _IO_FILE *_sbuf;
int _pos;
# 193 "/usr/include/libio.h" 3
};
enum __codecvt_result
{
__codecvt_ok,
__codecvt_partial,
__codecvt_error,
__codecvt_noconv
};
struct _IO_codecvt
{
void (*__codecvt_destr) (struct _IO_codecvt *);
enum __codecvt_result (*__codecvt_do_out) (struct _IO_codecvt *,
__mbstate_t *,
const wchar_t *,
const wchar_t *,
const wchar_t **, char *,
char *, char **);
enum __codecvt_result (*__codecvt_do_unshift) (struct _IO_codecvt *,
__mbstate_t *, char *,
char *, char **);
enum __codecvt_result (*__codecvt_do_in) (struct _IO_codecvt *,
__mbstate_t *,
const char *, const char *,
const char **, wchar_t *,
wchar_t *, wchar_t **);
int (*__codecvt_do_encoding) (struct _IO_codecvt *);
int (*__codecvt_do_always_noconv) (struct _IO_codecvt *);
int (*__codecvt_do_length) (struct _IO_codecvt *, __mbstate_t *,
const char *, const char *, size_t);
int (*__codecvt_do_max_length) (struct _IO_codecvt *);
_G_iconv_t __cd_in;
_G_iconv_t __cd_out;
};
struct _IO_wide_data
{
wchar_t *_IO_read_ptr;
wchar_t *_IO_read_end;
wchar_t *_IO_read_base;
wchar_t *_IO_write_base;
wchar_t *_IO_write_ptr;
wchar_t *_IO_write_end;
wchar_t *_IO_buf_base;
wchar_t *_IO_buf_end;
wchar_t *_IO_save_base;
wchar_t *_IO_backup_base;
wchar_t *_IO_save_end;
__mbstate_t _IO_state;
__mbstate_t _IO_last_state;
struct _IO_codecvt _codecvt;
wchar_t _shortbuf[1];
struct _IO_jump_t *_wide_vtable;
};
struct _IO_FILE {
int _flags;
char* _IO_read_ptr;
char* _IO_read_end;
char* _IO_read_base;
char* _IO_write_base;
char* _IO_write_ptr;
char* _IO_write_end;
char* _IO_buf_base;
char* _IO_buf_end;
char *_IO_save_base;
char *_IO_backup_base;
char *_IO_save_end;
struct _IO_marker *_markers;
struct _IO_FILE *_chain;
int _fileno;
int _blksize;
__off_t _old_offset;
unsigned short _cur_column;
signed char _vtable_offset;
char _shortbuf[1];
_IO_lock_t *_lock;
# 305 "/usr/include/libio.h" 3
__off64_t _offset;
struct _IO_codecvt *_codecvt;
struct _IO_wide_data *_wide_data;
int _mode;
char _unused2[15 * sizeof (int) - 2 * sizeof (void *)];
};
struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 344 "/usr/include/libio.h" 3
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
size_t __n);
typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
typedef int __io_close_fn (void *__cookie);
typedef __io_read_fn cookie_read_function_t;
typedef __io_write_fn cookie_write_function_t;
typedef __io_seek_fn cookie_seek_function_t;
typedef __io_close_fn cookie_close_function_t;
typedef struct
{
__io_read_fn *read;
__io_write_fn *write;
__io_seek_fn *seek;
__io_close_fn *close;
} _IO_cookie_io_functions_t;
typedef _IO_cookie_io_functions_t cookie_io_functions_t;
struct _IO_cookie_file;
extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
void *__cookie, _IO_cookie_io_functions_t __fns);
extern "C" {
extern int __underflow (_IO_FILE *) throw ();
extern int __uflow (_IO_FILE *) throw ();
extern int __overflow (_IO_FILE *, int) throw ();
extern wint_t __wunderflow (_IO_FILE *) throw ();
extern wint_t __wuflow (_IO_FILE *) throw ();
extern wint_t __woverflow (_IO_FILE *, wint_t) throw ();
# 426 "/usr/include/libio.h" 3
extern int _IO_getc (_IO_FILE *__fp) throw ();
extern int _IO_putc (int __c, _IO_FILE *__fp) throw ();
extern int _IO_feof (_IO_FILE *__fp) throw ();
extern int _IO_ferror (_IO_FILE *__fp) throw ();
extern int _IO_peekc_locked (_IO_FILE *__fp) throw ();
extern void _IO_flockfile (_IO_FILE *) throw ();
extern void _IO_funlockfile (_IO_FILE *) throw ();
extern int _IO_ftrylockfile (_IO_FILE *) throw ();
# 456 "/usr/include/libio.h" 3
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
__gnuc_va_list, int *__restrict) throw ();
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
__gnuc_va_list) throw ();
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw ();
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw ();
extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw ();
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw ();
extern void _IO_free_backup_area (_IO_FILE *) throw ();
extern wint_t _IO_getwc (_IO_FILE *__fp) throw ();
extern wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp) throw ();
extern int _IO_fwide (_IO_FILE *__fp, int __mode) throw ();
# 505 "/usr/include/libio.h" 3
extern int _IO_vfwscanf (_IO_FILE * __restrict, const wchar_t * __restrict,
__gnuc_va_list, int *__restrict) throw ();
extern int _IO_vfwprintf (_IO_FILE *__restrict, const wchar_t *__restrict,
__gnuc_va_list) throw ();
extern __ssize_t _IO_wpadn (_IO_FILE *, wint_t, __ssize_t) throw ();
extern void _IO_free_wbackup_area (_IO_FILE *) throw ();
}
# 75 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 2 3
typedef __gnuc_va_list __not_va_list__;
# 89 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
typedef _G_fpos_t fpos_t;
typedef _G_fpos64_t fpos64_t;
# 138 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
# 1 "/usr/include/bits/stdio_lim.h" 1 3
# 139 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 2 3
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;
extern int remove (__const char *__filename) throw ();
extern int rename (__const char *__old, __const char *__new) throw ();
extern FILE *tmpfile (void) throw ();
# 167 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
extern FILE *tmpfile64 (void) throw ();
extern char *tmpnam (char *__s) throw ();
extern char *tmpnam_r (char *__s) throw ();
# 187 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
extern char *tempnam (__const char *__dir, __const char *__pfx)
throw () __attribute__ ((__malloc__));
extern int fclose (FILE *__stream) throw ();
extern int fflush (FILE *__stream) throw ();
extern int fflush_unlocked (FILE *__stream) throw ();
extern int fcloseall (void) throw ();
extern FILE *fopen (__const char *__restrict __filename,
__const char *__restrict __modes) throw ();
extern FILE *freopen (__const char *__restrict __filename,
__const char *__restrict __modes,
FILE *__restrict __stream) throw ();
# 231 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
extern FILE *fopen64 (__const char *__restrict __filename,
__const char *__restrict __modes) throw ();
extern FILE *freopen64 (__const char *__restrict __filename,
__const char *__restrict __modes,
FILE *__restrict __stream) throw ();
extern FILE *fdopen (int __fd, __const char *__modes) throw ();
extern FILE *fopencookie (void *__restrict __magic_cookie,
__const char *__restrict __modes,
_IO_cookie_io_functions_t __io_funcs) throw ();
extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw ();
extern FILE *open_memstream (char **__restrict __bufloc,
size_t *__restrict __sizeloc) throw ();
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
int __modes, size_t __n) throw ();
extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
size_t __size) throw ();
extern void setlinebuf (FILE *__stream) throw ();
extern int fprintf (FILE *__restrict __stream,
__const char *__restrict __format, ...) throw ();
extern int printf (__const char *__restrict __format, ...) throw ();
extern int sprintf (char *__restrict __s,
__const char *__restrict __format, ...) throw ();
extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg) throw ();
extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg)
throw ();
extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg) throw ();
extern int snprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, ...)
throw () __attribute__ ((__format__ (__printf__, 3, 4)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 3, 0)));
extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
__gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 2, 0)));
extern int __asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3)));
extern int asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3)));
extern int vdprintf (int __fd, __const char *__restrict __fmt,
__gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3)));
extern int fscanf (FILE *__restrict __stream,
__const char *__restrict __format, ...) throw ();
extern int scanf (__const char *__restrict __format, ...) throw ();
extern int sscanf (__const char *__restrict __s,
__const char *__restrict __format, ...) throw ();
extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__scanf__, 1, 0)));
extern int vsscanf (__const char *__restrict __s,
__const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
extern int fgetc (FILE *__stream) throw ();
extern int getc (FILE *__stream) throw ();
extern int getchar (void) throw ();
extern int getc_unlocked (FILE *__stream) throw ();
extern int getchar_unlocked (void) throw ();
extern int fgetc_unlocked (FILE *__stream) throw ();
extern int fputc (int __c, FILE *__stream) throw ();
extern int putc (int __c, FILE *__stream) throw ();
extern int putchar (int __c) throw ();
extern int fputc_unlocked (int __c, FILE *__stream) throw ();
extern int putc_unlocked (int __c, FILE *__stream) throw ();
extern int putchar_unlocked (int __c) throw ();
extern int getw (FILE *__stream) throw ();
extern int putw (int __w, FILE *__stream) throw ();
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
throw ();
extern char *fgets_unlocked (char *__restrict __s, int __n,
FILE *__restrict __stream) throw ();
extern char *gets (char *__s) throw ();
# 435 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
extern __ssize_t __getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) throw ();
extern __ssize_t getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) throw ();
extern __ssize_t getline (char **__restrict __lineptr,
size_t *__restrict __n,
FILE *__restrict __stream) throw ();
extern int fputs (__const char *__restrict __s, FILE *__restrict __stream)
throw ();
extern int fputs_unlocked (__const char *__restrict __s,
FILE *__restrict __stream) throw ();
extern int puts (__const char *__s) throw ();
extern int ungetc (int __c, FILE *__stream) throw ();
extern size_t fread (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) throw ();
extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __s) throw ();
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) throw ();
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) throw ();
extern int fseek (FILE *__stream, long int __off, int __whence) throw ();
extern long int ftell (FILE *__stream) throw ();
extern void rewind (FILE *__stream) throw ();
# 498 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
extern int fseeko (FILE *__stream, __off_t __off, int __whence) throw ();
extern __off_t ftello (FILE *__stream) throw ();
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos)
throw ();
extern int fsetpos (FILE *__stream, __const fpos_t *__pos) throw ();
# 532 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence) throw ();
extern __off64_t ftello64 (FILE *__stream) throw ();
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos)
throw ();
extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos) throw ();
extern void clearerr (FILE *__stream) throw ();
extern int feof (FILE *__stream) throw ();
extern int ferror (FILE *__stream) throw ();
extern void clearerr_unlocked (FILE *__stream) throw ();
extern int feof_unlocked (FILE *__stream) throw ();
extern int ferror_unlocked (FILE *__stream) throw ();
extern void perror (__const char *__s) throw ();
# 1 "/usr/include/bits/sys_errlist.h" 1 3
# 27 "/usr/include/bits/sys_errlist.h" 3
extern int sys_nerr;
extern __const char *__const sys_errlist[];
extern int _sys_nerr;
extern __const char *__const _sys_errlist[];
# 562 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 2 3
extern int fileno (FILE *__stream) throw ();
extern int fileno_unlocked (FILE *__stream) throw ();
extern FILE *popen (__const char *__command, __const char *__modes) throw ();
extern int pclose (FILE *__stream) throw ();
extern char *ctermid (char *__s) throw ();
extern char *cuserid (char *__s) throw ();
struct obstack;
extern int obstack_printf (struct obstack *__restrict __obstack,
__const char *__restrict __format, ...) throw ();
extern int obstack_vprintf (struct obstack *__restrict __obstack,
__const char *__restrict __format,
__gnuc_va_list __args) throw ();
extern void flockfile (FILE *__stream) throw ();
extern int ftrylockfile (FILE *__stream) throw ();
extern void funlockfile (FILE *__stream) throw ();
# 634 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 3
# 1 "/usr/include/bits/stdio.h" 1 3
# 33 "/usr/include/bits/stdio.h" 3
inline int
vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) throw ()
{
return vfprintf (stdout, __fmt, __arg);
}
inline int
getchar (void) throw ()
{
return _IO_getc (stdin);
}
inline int
getc_unlocked (FILE *__fp) throw ()
{
return ((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
}
inline int
getchar_unlocked (void) throw ()
{
return ((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
}
inline int
putchar (int __c) throw ()
{
return _IO_putc (__c, stdout);
}
inline int
fputc_unlocked (int __c, FILE *__stream) throw ()
{
return (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}
inline int
putc_unlocked (int __c, FILE *__stream) throw ()
{
return (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}
inline int
putchar_unlocked (int __c) throw ()
{
return (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
}
inline __ssize_t
getline (char **__lineptr, size_t *__n, FILE *__stream) throw ()
{
return __getdelim (__lineptr, __n, '\n', __stream);
}
inline int
feof_unlocked (FILE *__stream) throw ()
{
return (((__stream)->_flags & 0x10) != 0);
}
inline int
ferror_unlocked (FILE *__stream) throw ()
{
return (((__stream)->_flags & 0x20) != 0);
}
# 635 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdio.h" 2 3
}
# 53 "/usr/include/c++/3.2/cstdio" 2 3
# 97 "/usr/include/c++/3.2/cstdio" 3
namespace std
{
using ::FILE;
using ::fpos_t;
using ::clearerr;
using ::fclose;
using ::feof;
using ::ferror;
using ::fflush;
using ::fgetc;
using ::fgetpos;
using ::fgets;
using ::fopen;
using ::fprintf;
using ::fputc;
using ::fputs;
using ::fread;
using ::freopen;
using ::fscanf;
using ::fseek;
using ::fsetpos;
using ::ftell;
using ::fwrite;
using ::getc;
using ::getchar;
using ::gets;
using ::perror;
using ::printf;
using ::putc;
using ::putchar;
using ::puts;
using ::remove;
using ::rename;
using ::rewind;
using ::scanf;
using ::setbuf;
using ::setvbuf;
using ::sprintf;
using ::sscanf;
using ::tmpfile;
using ::tmpnam;
using ::ungetc;
using ::vfprintf;
using ::vprintf;
using ::vsprintf;
}
# 153 "/usr/include/c++/3.2/cstdio" 3
namespace __gnu_cxx
{
using ::snprintf;
using ::vfscanf;
using ::vscanf;
using ::vsnprintf;
using ::vsscanf;
}
namespace std
{
using __gnu_cxx::snprintf;
using __gnu_cxx::vfscanf;
using __gnu_cxx::vscanf;
using __gnu_cxx::vsnprintf;
using __gnu_cxx::vsscanf;
}
# 36 "/usr/include/c++/3.2/i386-linux/bits/c++io.h" 2 3
# 1 "/usr/include/c++/3.2/i386-linux/bits/gthr.h" 1 3
# 98 "/usr/include/c++/3.2/i386-linux/bits/gthr.h" 3
# 1 "/usr/include/c++/3.2/i386-linux/bits/gthr-default.h" 1 3
# 37 "/usr/include/c++/3.2/i386-linux/bits/gthr-default.h" 3
# 1 "/usr/include/pthread.h" 1 3
# 20 "/usr/include/pthread.h" 3
# 1 "/usr/include/sched.h" 1 3
# 29 "/usr/include/sched.h" 3
# 1 "/usr/include/time.h" 1 3
# 30 "/usr/include/sched.h" 2 3
# 1 "/usr/include/bits/sched.h" 1 3
# 47 "/usr/include/bits/sched.h" 3
struct sched_param
{
int __sched_priority;
};
extern "C" {
extern int clone (int (*__fn) (void *__arg), void *__child_stack,
int __flags, void *__arg) throw ();
}
# 33 "/usr/include/sched.h" 2 3
extern "C" {
extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
throw ();
extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw ();
extern int sched_setscheduler (__pid_t __pid, int __policy,
__const struct sched_param *__param) throw ();
extern int sched_getscheduler (__pid_t __pid) throw ();
extern int sched_yield (void) throw ();
extern int sched_get_priority_max (int __algorithm) throw ();
extern int sched_get_priority_min (int __algorithm) throw ();
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw ();
}
# 21 "/usr/include/pthread.h" 2 3
# 1 "/usr/include/time.h" 1 3
# 30 "/usr/include/time.h" 3
extern "C" {
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 39 "/usr/include/time.h" 2 3
# 1 "/usr/include/bits/time.h" 1 3
# 43 "/usr/include/time.h" 2 3
# 118 "/usr/include/time.h" 3
struct tm
{
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
long int tm_gmtoff;
__const char *tm_zone;
};
struct itimerspec
{
struct timespec it_interval;
struct timespec it_value;
};
struct sigevent;
# 163 "/usr/include/time.h" 3
extern clock_t clock (void) throw ();
extern time_t time (time_t *__timer) throw ();
extern double difftime (time_t __time1, time_t __time0)
throw () __attribute__ ((__const__));
extern time_t mktime (struct tm *__tp) throw ();
extern size_t strftime (char *__restrict __s, size_t __maxsize,
__const char *__restrict __format,
__const struct tm *__restrict __tp) throw ();
extern char *strptime (__const char *__restrict __s,
__const char *__restrict __fmt, struct tm *__tp)
throw ();
extern struct tm *gmtime (__const time_t *__timer) throw ();
extern struct tm *localtime (__const time_t *__timer) throw ();
extern struct tm *gmtime_r (__const time_t *__restrict __timer,
struct tm *__restrict __tp) throw ();
extern struct tm *localtime_r (__const time_t *__restrict __timer,
struct tm *__restrict __tp) throw ();
extern char *asctime (__const struct tm *__tp) throw ();
extern char *ctime (__const time_t *__timer) throw ();
extern char *asctime_r (__const struct tm *__restrict __tp,
char *__restrict __buf) throw ();
extern char *ctime_r (__const time_t *__restrict __timer,
char *__restrict __buf) throw ();
extern char *__tzname[2];
extern int __daylight;
extern long int __timezone;
extern char *tzname[2];
extern void tzset (void) throw ();
extern int daylight;
extern long int timezone;
extern int stime (__const time_t *__when) throw ();
# 271 "/usr/include/time.h" 3
extern time_t timegm (struct tm *__tp) throw ();
extern time_t timelocal (struct tm *__tp) throw ();
extern int dysize (int __year) throw () __attribute__ ((__const__));
extern int nanosleep (__const struct timespec *__requested_time,
struct timespec *__remaining) throw ();
extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw ();
extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw ();
extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
throw ();
extern int clock_nanosleep (clockid_t __clock_id, int __flags,
__const struct timespec *__req,
struct timespec *__rem) throw ();
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw ();
extern int timer_create (clockid_t __clock_id,
struct sigevent *__restrict __evp,
timer_t *__restrict __timerid) throw ();
extern int timer_delete (timer_t __timerid) throw ();
extern int timer_settime (timer_t __timerid, int __flags,
__const struct itimerspec *__restrict __value,
struct itimerspec *__restrict __ovalue) throw ();
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
throw ();
extern int timer_getoverrun (timer_t __timerid) throw ();
# 342 "/usr/include/time.h" 3
extern int getdate_err;
extern struct tm *getdate (__const char *__string) throw ();
# 357 "/usr/include/time.h" 3
extern int getdate_r (__const char *__restrict __string,
struct tm *__restrict __resbufp) throw ();
}
# 22 "/usr/include/pthread.h" 2 3
# 1 "/usr/include/signal.h" 1 3
# 31 "/usr/include/signal.h" 3
extern "C" {
# 1 "/usr/include/bits/sigset.h" 1 3
# 34 "/usr/include/signal.h" 2 3
# 371 "/usr/include/signal.h" 3
}
# 25 "/usr/include/pthread.h" 2 3
# 1 "/usr/include/bits/pthreadtypes.h" 1 3
# 26 "/usr/include/pthread.h" 2 3
# 1 "/usr/include/bits/initspin.h" 1 3
# 27 "/usr/include/pthread.h" 2 3
extern "C" {
# 59 "/usr/include/pthread.h" 3
enum
{
PTHREAD_CREATE_JOINABLE,
PTHREAD_CREATE_DETACHED
};
enum
{
PTHREAD_INHERIT_SCHED,
PTHREAD_EXPLICIT_SCHED
};
enum
{
PTHREAD_SCOPE_SYSTEM,
PTHREAD_SCOPE_PROCESS
};
enum
{
PTHREAD_MUTEX_TIMED_NP,
PTHREAD_MUTEX_RECURSIVE_NP,
PTHREAD_MUTEX_ERRORCHECK_NP,
PTHREAD_MUTEX_ADAPTIVE_NP
,
PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
, PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_ADAPTIVE_NP
};
enum
{
PTHREAD_PROCESS_PRIVATE,
PTHREAD_PROCESS_SHARED
};
enum
{
PTHREAD_RWLOCK_PREFER_READER_NP,
PTHREAD_RWLOCK_PREFER_WRITER_NP,
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_WRITER_NP
};
# 131 "/usr/include/pthread.h" 3
struct _pthread_cleanup_buffer
{
void (*__routine) (void *);
void *__arg;
int __canceltype;
struct _pthread_cleanup_buffer *__prev;
};
enum
{
PTHREAD_CANCEL_ENABLE,
PTHREAD_CANCEL_DISABLE
};
enum
{
PTHREAD_CANCEL_DEFERRED,
PTHREAD_CANCEL_ASYNCHRONOUS
};
# 163 "/usr/include/pthread.h" 3
extern int pthread_create (pthread_t *__restrict __thread,
__const pthread_attr_t *__restrict __attr,
void *(*__start_routine) (void *),
void *__restrict __arg) throw ();
extern pthread_t pthread_self (void) throw ();
extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw ();
extern void pthread_exit (void *__retval)
throw () __attribute__ ((__noreturn__));
extern int pthread_join (pthread_t __th, void **__thread_return) throw ();
extern int pthread_detach (pthread_t __th) throw ();
extern int pthread_attr_init (pthread_attr_t *__attr) throw ();
extern int pthread_attr_destroy (pthread_attr_t *__attr) throw ();
extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
int __detachstate) throw ();
extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
int *__detachstate) throw ();
extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
__const struct sched_param *__restrict
__param) throw ();
extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
__attr,
struct sched_param *__restrict __param)
throw ();
extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
throw ();
extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
__attr, int *__restrict __policy)
throw ();
extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
int __inherit) throw ();
extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
__attr, int *__restrict __inherit)
throw ();
extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
throw ();
extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
int *__restrict __scope) throw ();
extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
size_t __guardsize) throw ();
extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict
__attr, size_t *__restrict __guardsize)
throw ();
extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
void *__stackaddr) throw ();
extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
__attr, void **__restrict __stackaddr)
throw ();
extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
size_t __stacksize) throw ();
extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
void **__restrict __stackaddr,
size_t *__restrict __stacksize) throw ();
extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
size_t __stacksize) throw ();
extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
__attr, size_t *__restrict __stacksize)
throw ();
extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) throw ();
extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
__const struct sched_param *__param)
throw ();
extern int pthread_getschedparam (pthread_t __target_thread,
int *__restrict __policy,
struct sched_param *__restrict __param)
throw ();
extern int pthread_getconcurrency (void) throw ();
extern int pthread_setconcurrency (int __level) throw ();
extern int pthread_yield (void) throw ();
extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
__const pthread_mutexattr_t *__restrict
__mutex_attr) throw ();
extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) throw ();
extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) throw ();
extern int pthread_mutex_lock (pthread_mutex_t *__mutex) throw ();
extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
__const struct timespec *__restrict
__abstime) throw ();
extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) throw ();
extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) throw ();
extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) throw ();
extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
__restrict __attr,
int *__restrict __pshared) throw ();
extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
int __pshared) throw ();
extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
throw ();
extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
__attr, int *__restrict __kind) throw ();
extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
__const pthread_condattr_t *__restrict
__cond_attr) throw ();
extern int pthread_cond_destroy (pthread_cond_t *__cond) throw ();
extern int pthread_cond_signal (pthread_cond_t *__cond) throw ();
extern int pthread_cond_broadcast (pthread_cond_t *__cond) throw ();
extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__restrict __mutex) throw ();
extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__restrict __mutex,
__const struct timespec *__restrict
__abstime) throw ();
extern int pthread_condattr_init (pthread_condattr_t *__attr) throw ();
extern int pthread_condattr_destroy (pthread_condattr_t *__attr) throw ();
extern int pthread_condattr_getpshared (__const pthread_condattr_t *
__restrict __attr,
int *__restrict __pshared) throw ();
extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
int __pshared) throw ();
extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
__const pthread_rwlockattr_t *__restrict
__attr) throw ();
extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) throw ();
extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) throw ();
extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) throw ();
extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
__const struct timespec *__restrict
__abstime) throw ();
extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) throw ();
extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) throw ();
extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
__const struct timespec *__restrict
__abstime) throw ();
extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) throw ();
extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) throw ();
extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) throw ();
extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
__restrict __attr,
int *__restrict __pshared) throw ();
extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
int __pshared) throw ();
extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr,
int *__pref) throw ();
extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
int __pref) throw ();
# 509 "/usr/include/pthread.h" 3
extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
throw ();
extern int pthread_spin_destroy (pthread_spinlock_t *__lock) throw ();
extern int pthread_spin_lock (pthread_spinlock_t *__lock) throw ();
extern int pthread_spin_trylock (pthread_spinlock_t *__lock) throw ();
extern int pthread_spin_unlock (pthread_spinlock_t *__lock) throw ();
extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
__const pthread_barrierattr_t *__restrict
__attr, unsigned int __count) throw ();
extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) throw ();
extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) throw ();
extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) throw ();
extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
__restrict __attr,
int *__restrict __pshared) throw ();
extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
int __pshared) throw ();
extern int pthread_barrier_wait (pthread_barrier_t *__barrier) throw ();
# 556 "/usr/include/pthread.h" 3
extern int pthread_key_create (pthread_key_t *__key,
void (*__destr_function) (void *)) throw ();
extern int pthread_key_delete (pthread_key_t __key) throw ();
extern int pthread_setspecific (pthread_key_t __key,
__const void *__pointer) throw ();
extern void *pthread_getspecific (pthread_key_t __key) throw ();
# 576 "/usr/include/pthread.h" 3
extern int pthread_once (pthread_once_t *__once_control,
void (*__init_routine) (void)) throw ();
extern int pthread_setcancelstate (int __state, int *__oldstate) throw ();
extern int pthread_setcanceltype (int __type, int *__oldtype) throw ();
extern int pthread_cancel (pthread_t __thread) throw ();
extern void pthread_testcancel (void) throw ();
# 610 "/usr/include/pthread.h" 3
extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer,
void (*__routine) (void *),
void *__arg) throw ();
extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer,
int __execute) throw ();
# 631 "/usr/include/pthread.h" 3
extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer,
void (*__routine) (void *),
void *__arg) throw ();
# 642 "/usr/include/pthread.h" 3
extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer,
int __execute) throw ();
extern int pthread_getcpuclockid (pthread_t __thread_id,
clockid_t *__clock_id) throw ();
# 1 "/usr/include/bits/sigthread.h" 1 3
# 31 "/usr/include/bits/sigthread.h" 3
extern int pthread_sigmask (int __how,
__const __sigset_t *__restrict __newmask,
__sigset_t *__restrict __oldmask)throw ();
extern int pthread_kill (pthread_t __thread, int __signo) throw ();
# 656 "/usr/include/pthread.h" 2 3
# 671 "/usr/include/pthread.h" 3
extern int pthread_atfork (void (*__prepare) (void),
void (*__parent) (void),
void (*__child) (void)) throw ();
extern void pthread_kill_other_threads_np (void) throw ();
}
# 38 "/usr/include/c++/3.2/i386-linux/bits/gthr-default.h" 2 3
typedef pthread_key_t __gthread_key_t;
typedef pthread_once_t __gthread_once_t;
typedef pthread_mutex_t __gthread_mutex_t;
#pragma weak pthread_once
#pragma weak pthread_key_create
#pragma weak pthread_key_delete
#pragma weak pthread_getspecific
#pragma weak pthread_setspecific
#pragma weak pthread_create
#pragma weak pthread_mutex_lock
#pragma weak pthread_mutex_trylock
#pragma weak pthread_mutex_unlock
# 80 "/usr/include/c++/3.2/i386-linux/bits/gthr-default.h" 3
static inline int
__gthread_active_p (void)
{
static void *const __gthread_active_ptr = (void *) &pthread_create;
return __gthread_active_ptr != 0;
}
# 437 "/usr/include/c++/3.2/i386-linux/bits/gthr-default.h" 3
static inline int
__gthread_once (__gthread_once_t *once, void (*func) (void))
{
if (__gthread_active_p ())
return pthread_once (once, func);
else
return -1;
}
static inline int
__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
return pthread_key_create (key, dtor);
}
static inline int
__gthread_key_dtor (__gthread_key_t key, void *ptr)
{
if (ptr)
return pthread_setspecific (key, 0);
else
return 0;
}
static inline int
__gthread_key_delete (__gthread_key_t key)
{
return pthread_key_delete (key);
}
static inline void *
__gthread_getspecific (__gthread_key_t key)
{
return pthread_getspecific (key);
}
static inline int
__gthread_setspecific (__gthread_key_t key, const void *ptr)
{
return pthread_setspecific (key, ptr);
}
static inline int
__gthread_mutex_lock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return pthread_mutex_lock (mutex);
else
return 0;
}
static inline int
__gthread_mutex_trylock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return pthread_mutex_trylock (mutex);
else
return 0;
}
static inline int
__gthread_mutex_unlock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return pthread_mutex_unlock (mutex);
else
return 0;
}
# 99 "/usr/include/c++/3.2/i386-linux/bits/gthr.h" 2 3
# 38 "/usr/include/c++/3.2/i386-linux/bits/c++io.h" 2 3
namespace std
{
typedef long streamoff;
typedef ptrdiff_t streamsize;
typedef ptrdiff_t wstreamsize;
typedef fpos_t __c_streampos;
typedef __gthread_mutex_t __c_lock;
typedef FILE __c_file;
struct __ios_flags
{
typedef short __int_type;
static const __int_type _S_boolalpha = 0x0001;
static const __int_type _S_dec = 0x0002;
static const __int_type _S_fixed = 0x0004;
static const __int_type _S_hex = 0x0008;
static const __int_type _S_internal = 0x0010;
static const __int_type _S_left = 0x0020;
static const __int_type _S_oct = 0x0040;
static const __int_type _S_right = 0x0080;
static const __int_type _S_scientific = 0x0100;
static const __int_type _S_showbase = 0x0200;
static const __int_type _S_showpoint = 0x0400;
static const __int_type _S_showpos = 0x0800;
static const __int_type _S_skipws = 0x1000;
static const __int_type _S_unitbuf = 0x2000;
static const __int_type _S_uppercase = 0x4000;
static const __int_type _S_adjustfield = 0x0020 | 0x0080 | 0x0010;
static const __int_type _S_basefield = 0x0002 | 0x0040 | 0x0008;
static const __int_type _S_floatfield = 0x0100 | 0x0004;
static const __int_type _S_badbit = 0x01;
static const __int_type _S_eofbit = 0x02;
static const __int_type _S_failbit = 0x04;
static const __int_type _S_app = 0x01;
static const __int_type _S_ate = 0x02;
static const __int_type _S_bin = 0x04;
static const __int_type _S_in = 0x08;
static const __int_type _S_out = 0x10;
static const __int_type _S_trunc = 0x20;
};
}
# 45 "/usr/include/c++/3.2/bits/fpos.h" 2 3
# 1 "/usr/include/c++/3.2/cwchar" 1 3
# 48 "/usr/include/c++/3.2/cwchar" 3
# 1 "/usr/include/c++/3.2/ctime" 1 3
# 48 "/usr/include/c++/3.2/ctime" 3
# 64 "/usr/include/c++/3.2/ctime" 3
namespace std
{
using ::clock_t;
using ::time_t;
using ::tm;
using ::clock;
using ::difftime;
using ::mktime;
using ::time;
using ::asctime;
using ::ctime;
using ::gmtime;
using ::localtime;
using ::strftime;
}
# 52 "/usr/include/c++/3.2/cwchar" 2 3
# 1 "/usr/include/wchar.h" 1 3
# 40 "/usr/include/wchar.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stdarg.h" 1 3
# 41 "/usr/include/wchar.h" 2 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.2.3/include/stddef.h" 1 3
# 49 "/usr/include/wchar.h" 2 3
# 85 "/usr/include/wchar.h" 3
typedef __mbstate_t mbstate_t;
# 105 "/usr/include/wchar.h" 3
struct tm;
extern "C" {
extern wchar_t *wcscpy (wchar_t *__restrict __dest,
__const wchar_t *__restrict __src) throw ();
extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
__const wchar_t *__restrict __src, size_t __n)
throw ();
extern wchar_t *wcscat (wchar_t *__restrict __dest,
__const wchar_t *__restrict __src) throw ();
extern wchar_t *wcsncat (wchar_t *__restrict __dest,
__const wchar_t *__restrict __src, size_t __n)
throw ();
extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2)
throw () __attribute__ ((__pure__));
extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
throw () __attribute__ ((__pure__));
extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw ();
extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
size_t __n) throw ();
extern int __wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
__locale_t __loc) throw ();
extern int __wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
size_t __n, __locale_t __loc) throw ();
extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw ();
extern size_t wcsxfrm (wchar_t *__restrict __s1,
__const wchar_t *__restrict __s2, size_t __n) throw ();
extern int __wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2,
__locale_t __loc) throw ();
extern size_t __wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2,
size_t __n, __locale_t __loc) throw ();
extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__));
extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc)
throw () __attribute__ ((__pure__));
extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc)
throw () __attribute__ ((__pure__));
extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc)
throw () __attribute__ ((__pure__));
extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject)
throw () __attribute__ ((__pure__));
extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept)
throw () __attribute__ ((__pure__));
extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept)
throw () __attribute__ ((__pure__));
extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle)
throw () __attribute__ ((__pure__));
extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle)
throw () __attribute__ ((__pure__));
extern wchar_t *wcstok (wchar_t *__restrict __s,
__const wchar_t *__restrict __delim,
wchar_t **__restrict __ptr) throw ();
extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__));
extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen)
throw () __attribute__ ((__pure__));
extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n)
throw () __attribute__ ((__pure__));
extern int wmemcmp (__const wchar_t *__restrict __s1,
__const wchar_t *__restrict __s2, size_t __n)
throw () __attribute__ ((__pure__));
extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
__const wchar_t *__restrict __s2, size_t __n) throw ();
extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
throw ();
extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw ();
extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
__const wchar_t *__restrict __s2, size_t __n)
throw ();
extern wint_t btowc (int __c) throw ();
extern int wctob (wint_t __c) throw ();
extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__));
extern size_t mbrtowc (wchar_t *__restrict __pwc,
__const char *__restrict __s, size_t __n,
mbstate_t *__p) throw ();
extern size_t wcrtomb (char *__restrict __s, wchar_t __wc,
mbstate_t *__restrict __ps) throw ();
extern size_t __mbrlen (__const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps) throw ();
extern size_t mbrlen (__const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps) throw ();
extern __inline size_t mbrlen (__const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps) throw ()
{ return (__ps != __null
? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); }
extern size_t mbsrtowcs (wchar_t *__restrict __dst,
__const char **__restrict __src, size_t __len,
mbstate_t *__restrict __ps) throw ();
extern size_t wcsrtombs (char *__restrict __dst,
__const wchar_t **__restrict __src, size_t __len,
mbstate_t *__restrict __ps) throw ();
extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
__const char **__restrict __src, size_t __nmc,
size_t __len, mbstate_t *__restrict __ps) throw ();
extern size_t wcsnrtombs (char *__restrict __dst,
__const wchar_t **__restrict __src,
size_t __nwc, size_t __len,
mbstate_t *__restrict __ps) throw ();
extern int wcwidth (wchar_t __c) throw ();
extern int wcswidth (__const wchar_t *__s, size_t __n) throw ();
extern double wcstod (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) throw ();
extern float wcstof (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) throw ();
extern long double wcstold (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) throw ();
extern long int wcstol (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base) throw ();
extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base)
throw ();
__extension__
extern long long int wcstoq (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base)
throw ();
__extension__
extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) throw ();
__extension__
extern long long int wcstoll (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base)
throw ();
__extension__
extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) throw ();
# 410 "/usr/include/wchar.h" 3
extern long int __wcstol_l (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base,
__locale_t __loc) throw ();
extern unsigned long int __wcstoul_l (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base, __locale_t __loc) throw ();
__extension__
extern long long int __wcstoll_l (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base, __locale_t __loc) throw ();
__extension__
extern unsigned long long int __wcstoull_l (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base, __locale_t __loc)
throw ();
extern double __wcstod_l (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, __locale_t __loc)
throw ();
extern float __wcstof_l (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, __locale_t __loc)
throw ();
extern long double __wcstold_l (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
__locale_t __loc) throw ();
extern double __wcstod_internal (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __group)
throw ();
extern float __wcstof_internal (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __group)
throw ();
extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __group) throw ();
extern long int __wcstol_internal (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base, int __group) throw ();
extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt,
wchar_t **__restrict __endptr,
int __base, int __group) throw ();
__extension__
extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base, int __group) throw ();
__extension__
extern unsigned long long int __wcstoull_internal (__const wchar_t *
__restrict __nptr,
wchar_t **
__restrict __endptr,
int __base,
int __group) throw ();
extern __inline double wcstod (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) throw ()
{ return __wcstod_internal (__nptr, __endptr, 0); }
extern __inline long int wcstol (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) throw ()
{ return __wcstol_internal (__nptr, __endptr, __base, 0); }
extern __inline unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) throw ()
{ return __wcstoul_internal (__nptr, __endptr, __base, 0); }
extern __inline float wcstof (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) throw ()
{ return __wcstof_internal (__nptr, __endptr, 0); }
extern __inline long double wcstold (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) throw ()
{ return __wcstold_internal (__nptr, __endptr, 0); }
__extension__
extern __inline long long int wcstoq (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) throw ()
{ return __wcstoll_internal (__nptr, __endptr, __base, 0); }
__extension__
extern __inline unsigned long long int wcstouq (__const wchar_t *
__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) throw ()
{ return __wcstoull_internal (__nptr, __endptr, __base, 0); }
extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw ();
extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
throw ();
extern int fwide (__FILE *__fp, int __mode) throw ();
extern int fwprintf (__FILE *__restrict __stream,
__const wchar_t *__restrict __format, ...)
throw () ;
extern int wprintf (__const wchar_t *__restrict __format, ...)
throw () ;
extern int swprintf (wchar_t *__restrict __s, size_t __n,
__const wchar_t *__restrict __format, ...)
throw () ;
extern int vfwprintf (__FILE *__restrict __s,
__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
throw () ;
extern int vwprintf (__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
throw () ;
extern int vswprintf (wchar_t *__restrict __s, size_t __n,
__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
throw () ;
extern int fwscanf (__FILE *__restrict __stream,
__const wchar_t *__restrict __format, ...)
throw () ;
extern int wscanf (__const wchar_t *__restrict __format, ...)
throw () ;
extern int swscanf (__const wchar_t *__restrict __s,
__const wchar_t *__restrict __format, ...)
throw () ;
extern int vfwscanf (__FILE *__restrict __s,
__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
throw () ;
extern int vwscanf (__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
throw () ;
extern int vswscanf (__const wchar_t *__restrict __s,
__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
throw () ;
extern wint_t fgetwc (__FILE *__stream) throw ();
extern wint_t getwc (__FILE *__stream) throw ();
extern wint_t getwchar (void) throw ();
extern wint_t fputwc (wchar_t __wc, __FILE *__stream) throw ();
extern wint_t putwc (wchar_t __wc, __FILE *__stream) throw ();
extern wint_t putwchar (wchar_t __wc) throw ();
extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
__FILE *__restrict __stream) throw ();
extern int fputws (__const wchar_t *__restrict __ws,
__FILE *__restrict __stream) throw ();
extern wint_t ungetwc (wint_t __wc, __FILE *__stream) throw ();
extern wint_t getwc_unlocked (__FILE *__stream) throw ();
extern wint_t getwchar_unlocked (void) throw ();
extern wint_t fgetwc_unlocked (__FILE *__stream) throw ();
extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream) throw ();
extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream) throw ();
extern wint_t putwchar_unlocked (wchar_t __wc) throw ();
extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n,
__FILE *__restrict __stream) throw ();
extern int fputws_unlocked (__const wchar_t *__restrict __ws,
__FILE *__restrict __stream) throw ();
extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
__const wchar_t *__restrict __format,
__const struct tm *__restrict __tp) throw ();
# 680 "/usr/include/wchar.h" 3
}
# 55 "/usr/include/c++/3.2/cwchar" 2 3
# 69 "/usr/include/c++/3.2/cwchar" 3
namespace std
{
using ::mbstate_t;
}
# 133 "/usr/include/c++/3.2/cwchar" 3
namespace std
{
using ::wint_t;
using ::btowc;
using ::fgetwc;
using ::fgetws;
using ::fputwc;
using ::fputws;
using ::fwide;
using ::fwprintf;
using ::fwscanf;
using ::getwc;
using ::getwchar;
using ::mbrlen;
using ::mbrtowc;
using ::mbsinit;
using ::mbsrtowcs;
using ::putwc;
using ::putwchar;
using ::swprintf;
using ::swscanf;
using ::ungetwc;
using ::vfwprintf;
using ::vfwscanf;
using ::vswprintf;
using ::vswscanf;
using ::vwprintf;
using ::vwscanf;
using ::wcrtomb;
using ::wcscat;
using ::wcscmp;
using ::wcscoll;
using ::wcscpy;
using ::wcscspn;
using ::wcsftime;
using ::wcslen;
using ::wcsncat;
using ::wcsncmp;
using ::wcsncpy;
using ::wcsrtombs;
using ::wcsspn;
using ::wcstod;
using ::wcstof;
using ::wcstok;
using ::wcstol;
using ::wcstoul;
using ::wcsxfrm;
using ::wctob;
using ::wmemcmp;
using ::wmemcpy;
using ::wmemmove;
using ::wmemset;
using ::wprintf;
using ::wscanf;
using ::wcschr;
inline wchar_t*
wcschr(wchar_t* __p, wchar_t __c)
{ return wcschr(const_cast<const wchar_t*>(__p), __c); }
using ::wcspbrk;
inline wchar_t*
wcspbrk(wchar_t* __s1, wchar_t* __s2)
{ return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
using ::wcsrchr;
inline wchar_t*
wcsrchr(wchar_t* __p, wchar_t __c)
{ return wcsrchr(const_cast<const wchar_t*>(__p), __c); }
using ::wcsstr;
inline wchar_t*
wcsstr(wchar_t* __s1, wchar_t* __s2)
{ return wcsstr(const_cast<const wchar_t*>(__s1), __s2); }
using ::wmemchr;
inline wchar_t*
wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
{ return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
}
namespace __gnu_cxx
{
using ::wcstold;
using ::wcstoll;
using ::wcstoull;
}
namespace std
{
using __gnu_cxx::wcstold;
using __gnu_cxx::wcstoll;
using __gnu_cxx::wcstoull;
}
# 46 "/usr/include/c++/3.2/bits/fpos.h" 2 3
namespace std
{
template<typename _StateT>
class fpos
{
public:
typedef _StateT __state_type;
private:
streamoff _M_off;
__state_type _M_st;
public:
__state_type
state() const { return _M_st; }
void
state(__state_type __st) { _M_st = __st; }
fpos(): _M_off(streamoff()), _M_st(__state_type()) { }
fpos(streamoff __off, __state_type __st = __state_type())
: _M_off(__off), _M_st(__st) { }
operator streamoff() const { return _M_off; }
fpos&
operator+=(streamoff __off) { _M_off += __off; return *this; }
fpos&
operator-=(streamoff __off) { _M_off -= __off; return *this; }
fpos
operator+(streamoff __off)
{
fpos __t(*this);
__t += __off;
return __t;
}
fpos
operator-(streamoff __off)
{
fpos __t(*this);
__t -= __off;
return __t;
}
bool
operator==(const fpos& __pos) const
{ return _M_off == __pos._M_off; }
bool
operator!=(const fpos& __pos) const
{ return _M_off != __pos._M_off; }
streamoff
_M_position() const { return _M_off; }
void
_M_position(streamoff __off) { _M_off = __off; }
};
typedef fpos<mbstate_t> streampos;
typedef fpos<mbstate_t> wstreampos;
}
# 47 "/usr/include/c++/3.2/iosfwd" 2 3
# 1 "/usr/include/c++/3.2/bits/functexcept.h" 1 3
# 34 "/usr/include/c++/3.2/bits/functexcept.h" 3
# 1 "/usr/include/c++/3.2/exception_defines.h" 1 3
# 35 "/usr/include/c++/3.2/bits/functexcept.h" 2 3
namespace std
{
void
__throw_bad_exception(void);
void
__throw_bad_alloc(void);
void
__throw_bad_cast(void);
void
__throw_bad_typeid(void);
void
__throw_logic_error(const char* __s);
void
__throw_domain_error(const char* __s);
void
__throw_invalid_argument(const char* __s);
void
__throw_length_error(const char* __s);
void
__throw_out_of_range(const char* __s);
void
__throw_runtime_error(const char* __s);
void
__throw_range_error(const char* __s);
void
__throw_overflow_error(const char* __s);
void
__throw_underflow_error(const char* __s);
void
__throw_ios_failure(const char* __s);
}
# 48 "/usr/include/c++/3.2/iosfwd" 2 3
namespace std
{
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ios;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_streambuf;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_istream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ostream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_iostream;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_stringbuf;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_istringstream;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_ostringstream;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_stringstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_filebuf;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ifstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ofstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_fstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class istreambuf_iterator;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class ostreambuf_iterator;
class ios_base;
typedef basic_ios<char> ios;
typedef basic_streambuf<char> streambuf;
typedef basic_istream<char> istream;
typedef basic_ostream<char> ostream;
typedef basic_iostream<char> iostream;
typedef basic_stringbuf<char> stringbuf;
typedef basic_istringstream<char> istringstream;
typedef basic_ostringstream<char> ostringstream;
typedef basic_stringstream<char> stringstream;
typedef basic_filebuf<char> filebuf;
typedef basic_ifstream<char> ifstream;
typedef basic_ofstream<char> ofstream;
typedef basic_fstream<char> fstream;
typedef basic_ios<wchar_t> wios;
typedef basic_streambuf<wchar_t> wstreambuf;
typedef basic_istream<wchar_t> wistream;
typedef basic_ostream<wchar_t> wostream;
typedef basic_iostream<wchar_t> wiostream;
typedef basic_stringbuf<wchar_t> wstringbuf;
typedef basic_istringstream<wchar_t> wistringstream;
typedef basic_ostringstream<wchar_t> wostringstream;
typedef basic_stringstream<wchar_t> wstringstream;
typedef basic_filebuf<wchar_t> wfilebuf;
typedef basic_ifstream<wchar_t> wifstream;
typedef basic_ofstream<wchar_t> wofstream;
typedef basic_fstream<wchar_t> wfstream;
}
# 71 "/usr/include/c++/3.2/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/3.2/bits/stl_pair.h" 1 3
# 64 "/usr/include/c++/3.2/bits/stl_pair.h" 3
namespace std
{
template <class _T1, class _T2>
struct pair {
typedef _T1 first_type;
typedef _T2 second_type;
_T1 first;
_T2 second;
pair() : first(), second() {}
pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {}
template <class _U1, class _U2>
pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {}
};
template <class _T1, class _T2>
inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{
return __x.first == __y.first && __x.second == __y.second;
}
template <class _T1, class _T2>
inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{
return __x.first < __y.first ||
(!(__y.first < __x.first) && __x.second < __y.second);
}
template <class _T1, class _T2>
inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
return !(__x == __y);
}
template <class _T1, class _T2>
inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
return __y < __x;
}
template <class _T1, class _T2>
inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
return !(__y < __x);
}
template <class _T1, class _T2>
inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
return !(__x < __y);
}
# 140 "/usr/include/c++/3.2/bits/stl_pair.h" 3
template <class _T1, class _T2>
inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y)
{
return pair<_T1, _T2>(__x, __y);
}
}
# 72 "/usr/include/c++/3.2/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/3.2/bits/type_traits.h" 1 3
# 53 "/usr/include/c++/3.2/bits/type_traits.h" 3
# 90 "/usr/include/c++/3.2/bits/type_traits.h" 3
struct __true_type {};
struct __false_type {};
template <class _Tp>
struct __type_traits {
typedef __true_type this_dummy_member_must_be_first;
# 113 "/usr/include/c++/3.2/bits/type_traits.h" 3
typedef __false_type has_trivial_default_constructor;
typedef __false_type has_trivial_copy_constructor;
typedef __false_type has_trivial_assignment_operator;
typedef __false_type has_trivial_destructor;
typedef __false_type is_POD_type;
};
template<> struct __type_traits<bool> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<char> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<signed char> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<unsigned char> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<wchar_t> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<short> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<unsigned short> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<int> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<unsigned int> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<long> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<unsigned long> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<long long> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<unsigned long long> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<float> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<double> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<long double> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template <class _Tp>
struct __type_traits<_Tp*> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template <class _Tp> struct _Is_integer {
typedef __false_type _Integral;
};
template<> struct _Is_integer<bool> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<char> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<signed char> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<unsigned char> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<wchar_t> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<short> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<unsigned short> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<int> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<unsigned int> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<long> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<unsigned long> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<long long> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<unsigned long long> {
typedef __true_type _Integral;
};
template<typename _Tp> struct _Is_normal_iterator {
typedef __false_type _Normal;
};
namespace __gnu_cxx
{
template<typename _Iterator, typename _Container> class __normal_iterator;
}
template<typename _Iterator, typename _Container>
struct _Is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, _Container> > {
typedef __true_type _Normal;
};
# 73 "/usr/include/c++/3.2/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/3.2/bits/stl_iterator_base_types.h" 1 3
# 68 "/usr/include/c++/3.2/bits/stl_iterator_base_types.h" 3
namespace std
{
# 80 "/usr/include/c++/3.2/bits/stl_iterator_base_types.h" 3
struct input_iterator_tag {};
struct output_iterator_tag {};
struct forward_iterator_tag : public input_iterator_tag {};
struct bidirectional_iterator_tag : public forward_iterator_tag {};
struct random_access_iterator_tag : public bidirectional_iterator_tag {};
# 100 "/usr/include/c++/3.2/bits/stl_iterator_base_types.h" 3
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
typename _Pointer = _Tp*, typename _Reference = _Tp&>
struct iterator {
typedef _Category iterator_category;
typedef _Tp value_type;
typedef _Distance difference_type;
typedef _Pointer pointer;
typedef _Reference reference;
};
template<typename _Iterator>
struct iterator_traits {
typedef typename _Iterator::iterator_category iterator_category;
typedef typename _Iterator::value_type value_type;
typedef typename _Iterator::difference_type difference_type;
typedef typename _Iterator::pointer pointer;
typedef typename _Iterator::reference reference;
};
template<typename _Tp>
struct iterator_traits<_Tp*> {
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef _Tp& reference;
};
template<typename _Tp>
struct iterator_traits<const _Tp*> {
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef const _Tp* pointer;
typedef const _Tp& reference;
};
template<typename _Iter>
inline typename iterator_traits<_Iter>::iterator_category
__iterator_category(const _Iter&)
{ return typename iterator_traits<_Iter>::iterator_category(); }
}
# 74 "/usr/include/c++/3.2/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/3.2/bits/stl_iterator_base_funcs.h" 1 3
# 68 "/usr/include/c++/3.2/bits/stl_iterator_base_funcs.h" 3
# 1 "/usr/include/c++/3.2/bits/concept_check.h" 1 3
# 39 "/usr/include/c++/3.2/bits/concept_check.h" 3
# 69 "/usr/include/c++/3.2/bits/stl_iterator_base_funcs.h" 2 3
namespace std
{
template<typename _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
__distance(_InputIterator __first, _InputIterator __last, input_iterator_tag)
{
typename iterator_traits<_InputIterator>::difference_type __n = 0;
while (__first != __last) {
++__first; ++__n;
}
return __n;
}
template<typename _RandomAccessIterator>
inline typename iterator_traits<_RandomAccessIterator>::difference_type
__distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
random_access_iterator_tag)
{
return __last - __first;
}
# 111 "/usr/include/c++/3.2/bits/stl_iterator_base_funcs.h" 3
template<typename _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
distance(_InputIterator __first, _InputIterator __last)
{
return __distance(__first, __last, __iterator_category(__first));
}
template<typename _InputIter, typename _Distance>
inline void
__advance(_InputIter& __i, _Distance __n, input_iterator_tag)
{
while (__n--) ++__i;
}
template<typename _BidirectionalIterator, typename _Distance>
inline void
__advance(_BidirectionalIterator& __i, _Distance __n,
bidirectional_iterator_tag)
{
if (__n > 0)
while (__n--) ++__i;
else
while (__n++) --__i;
}
template<typename _RandomAccessIterator, typename _Distance>
inline void
__advance(_RandomAccessIterator& __i, _Distance __n,
random_access_iterator_tag)
{
__i += __n;
}
# 164 "/usr/include/c++/3.2/bits/stl_iterator_base_funcs.h" 3
template<typename _InputIterator, typename _Distance>
inline void
advance(_InputIterator& __i, _Distance __n)
{
__advance(__i, __n, __iterator_category(__i));
}
}
# 75 "/usr/include/c++/3.2/bits/stl_algobase.h" 2 3
# 1 "/usr/include/c++/3.2/bits/stl_iterator.h" 1 3
# 68 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
namespace std
{
# 89 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
template<typename _Iterator>
class reverse_iterator
: public iterator<typename iterator_traits<_Iterator>::iterator_category,
typename iterator_traits<_Iterator>::value_type,
typename iterator_traits<_Iterator>::difference_type,
typename iterator_traits<_Iterator>::pointer,
typename iterator_traits<_Iterator>::reference>
{
protected:
_Iterator current;
public:
typedef _Iterator iterator_type;
typedef typename iterator_traits<_Iterator>::difference_type
difference_type;
typedef typename iterator_traits<_Iterator>::reference reference;
typedef typename iterator_traits<_Iterator>::pointer pointer;
public:
reverse_iterator() { }
explicit
reverse_iterator(iterator_type __x) : current(__x) { }
reverse_iterator(const reverse_iterator& __x)
: current(__x.current) { }
template<typename _Iter>
reverse_iterator(const reverse_iterator<_Iter>& __x)
: current(__x.base()) { }
iterator_type
base() const { return current; }
reference
operator*() const
{
_Iterator __tmp = current;
return *--__tmp;
}
pointer
operator->() const { return &(operator*()); }
reverse_iterator&
operator++()
{
--current;
return *this;
}
reverse_iterator
operator++(int)
{
reverse_iterator __tmp = *this;
--current;
return __tmp;
}
reverse_iterator&
operator--()
{
++current;
return *this;
}
reverse_iterator operator--(int)
{
reverse_iterator __tmp = *this;
++current;
return __tmp;
}
reverse_iterator
operator+(difference_type __n) const
{ return reverse_iterator(current - __n); }
reverse_iterator&
operator+=(difference_type __n)
{
current -= __n;
return *this;
}
reverse_iterator
operator-(difference_type __n) const
{ return reverse_iterator(current + __n); }
reverse_iterator&
operator-=(difference_type __n)
{
current += __n;
return *this;
}
reference
operator[](difference_type __n) const { return *(*this + __n); }
};
# 269 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
template<typename _Iterator>
inline bool
operator==(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __x.base() == __y.base(); }
template<typename _Iterator>
inline bool
operator<(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __y.base() < __x.base(); }
template<typename _Iterator>
inline bool
operator!=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__x == __y); }
template<typename _Iterator>
inline bool
operator>(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __y < __x; }
template<typename _Iterator>
inline bool
operator<=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__y < __x); }
template<typename _Iterator>
inline bool
operator>=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__x < __y); }
template<typename _Iterator>
inline typename reverse_iterator<_Iterator>::difference_type
operator-(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __y.base() - __x.base(); }
template<typename _Iterator>
inline reverse_iterator<_Iterator>
operator+(typename reverse_iterator<_Iterator>::difference_type __n,
const reverse_iterator<_Iterator>& __x)
{ return reverse_iterator<_Iterator>(__x.base() - __n); }
# 327 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
template<typename _Container>
class back_insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
public:
typedef _Container container_type;
explicit
back_insert_iterator(_Container& __x) : container(&__x) { }
# 353 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
back_insert_iterator&
operator=(typename _Container::const_reference __value)
{
container->push_back(__value);
return *this;
}
back_insert_iterator&
operator*() { return *this; }
back_insert_iterator&
operator++() { return *this; }
back_insert_iterator
operator++(int) { return *this; }
};
# 384 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
template<typename _Container>
inline back_insert_iterator<_Container>
back_inserter(_Container& __x)
{ return back_insert_iterator<_Container>(__x); }
# 397 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
template<typename _Container>
class front_insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
public:
typedef _Container container_type;
explicit front_insert_iterator(_Container& __x) : container(&__x) { }
# 422 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
front_insert_iterator&
operator=(typename _Container::const_reference __value)
{
container->push_front(__value);
return *this;
}
front_insert_iterator&
operator*() { return *this; }
front_insert_iterator&
operator++() { return *this; }
front_insert_iterator
operator++(int) { return *this; }
};
# 453 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
template<typename _Container>
inline front_insert_iterator<_Container>
front_inserter(_Container& __x)
{ return front_insert_iterator<_Container>(__x); }
# 470 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
template<typename _Container>
class insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
typename _Container::iterator iter;
public:
typedef _Container container_type;
insert_iterator(_Container& __x, typename _Container::iterator __i)
: container(&__x), iter(__i) {}
# 512 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
insert_iterator&
operator=(const typename _Container::const_reference __value)
{
iter = container->insert(iter, __value);
++iter;
return *this;
}
insert_iterator&
operator*() { return *this; }
insert_iterator&
operator++() { return *this; }
insert_iterator&
operator++(int) { return *this; }
};
# 544 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
template<typename _Container, typename _Iterator>
inline insert_iterator<_Container>
inserter(_Container& __x, _Iterator __i)
{
return insert_iterator<_Container>(__x,
typename _Container::iterator(__i));
}
}
namespace __gnu_cxx
{
using std::iterator_traits;
using std::iterator;
template<typename _Iterator, typename _Container>
class __normal_iterator
: public iterator<typename iterator_traits<_Iterator>::iterator_category,
typename iterator_traits<_Iterator>::value_type,
typename iterator_traits<_Iterator>::difference_type,
typename iterator_traits<_Iterator>::pointer,
typename iterator_traits<_Iterator>::reference>
{
protected:
_Iterator _M_current;
public:
typedef typename iterator_traits<_Iterator>::difference_type
difference_type;
typedef typename iterator_traits<_Iterator>::reference reference;
typedef typename iterator_traits<_Iterator>::pointer pointer;
__normal_iterator() : _M_current(_Iterator()) { }
explicit
__normal_iterator(const _Iterator& __i) : _M_current(__i) { }
template<typename _Iter>
inline __normal_iterator(const __normal_iterator<_Iter, _Container>& __i)
: _M_current(__i.base()) { }
reference
operator*() const { return *_M_current; }
pointer
operator->() const { return _M_current; }
__normal_iterator&
operator++() { ++_M_current; return *this; }
__normal_iterator
operator++(int) { return __normal_iterator(_M_current++); }
__normal_iterator&
operator--() { --_M_current; return *this; }
__normal_iterator
operator--(int) { return __normal_iterator(_M_current--); }
reference
operator[](const difference_type& __n) const
{ return _M_current[__n]; }
__normal_iterator&
operator+=(const difference_type& __n)
{ _M_current += __n; return *this; }
__normal_iterator
operator+(const difference_type& __n) const
{ return __normal_iterator(_M_current + __n); }
__normal_iterator&
operator-=(const difference_type& __n)
{ _M_current -= __n; return *this; }
__normal_iterator
operator-(const difference_type& __n) const
{ return __normal_iterator(_M_current - __n); }
const _Iterator&
base() const { return _M_current; }
};
# 645 "/usr/include/c++/3.2/bits/stl_iterator.h" 3
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() == __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() == __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() != __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() != __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() < __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() < __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() > __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() > __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() <= __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() <= __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() >= __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() >= __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline typename __normal_iterator<_IteratorL, _Container>::difference_type
operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() - __rhs.base(); }
template<typename _Iterator, typename _Container>
inline __normal_iterator<_Iterator, _Container>
operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n,
const __normal_iterator<_Iterator, _Container>& __i)
{ return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
}
# 76 "/usr/include/c++/3.2/bits/stl_algobase.h" 2 3
namespace std
{
# 91 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _ForwardIter1, typename _ForwardIter2>
inline void
iter_swap(_ForwardIter1 __a, _ForwardIter2 __b)
{
typedef typename iterator_traits<_ForwardIter1>::value_type _ValueType1;
typedef typename iterator_traits<_ForwardIter2>::value_type _ValueType2;
_ValueType1 __tmp = *__a;
*__a = *__b;
*__b = __tmp;
}
# 118 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _Tp>
inline void
swap(_Tp& __a, _Tp& __b)
{
_Tp __tmp = __a;
__a = __b;
__b = __tmp;
}
# 146 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _Tp>
inline const _Tp&
min(const _Tp& __a, const _Tp& __b)
{
if (__b < __a) return __b; return __a;
}
# 166 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _Tp>
inline const _Tp&
max(const _Tp& __a, const _Tp& __b)
{
if (__a < __b) return __b; return __a;
}
# 186 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _Tp, typename _Compare>
inline const _Tp&
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
if (__comp(__b, __a)) return __b; return __a;
}
# 204 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _Tp, typename _Compare>
inline const _Tp&
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
if (__comp(__a, __b)) return __b; return __a;
}
# 221 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy(_InputIter __first, _InputIter __last,
_OutputIter __result,
input_iterator_tag)
{
for ( ; __first != __last; ++__result, ++__first)
*__result = *__first;
return __result;
}
template<typename _RandomAccessIter, typename _OutputIter>
inline _OutputIter
__copy(_RandomAccessIter __first, _RandomAccessIter __last,
_OutputIter __result,
random_access_iterator_tag)
{
typedef typename iterator_traits<_RandomAccessIter>::difference_type
_Distance;
for (_Distance __n = __last - __first; __n > 0; --__n) {
*__result = *__first;
++__first;
++__result;
}
return __result;
}
template<typename _Tp>
inline _Tp*
__copy_trivial(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
memmove(__result, __first, sizeof(_Tp) * (__last - __first));
return __result + (__last - __first);
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_aux2(_InputIter __first, _InputIter __last,
_OutputIter __result, __false_type)
{ return __copy(__first, __last, __result, __iterator_category(__first)); }
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_aux2(_InputIter __first, _InputIter __last,
_OutputIter __result, __true_type)
{ return __copy(__first, __last, __result, __iterator_category(__first)); }
template<typename _Tp>
inline _Tp*
__copy_aux2(_Tp* __first, _Tp* __last,
_Tp* __result, __true_type)
{ return __copy_trivial(__first, __last, __result); }
template<typename _Tp>
inline _Tp*
__copy_aux2(const _Tp* __first, const _Tp* __last,
_Tp* __result, __true_type)
{ return __copy_trivial(__first, __last, __result); }
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_ni2(_InputIter __first, _InputIter __last,
_OutputIter __result, __true_type)
{
typedef typename iterator_traits<_InputIter>::value_type
_ValueType;
typedef typename __type_traits<_ValueType>::has_trivial_assignment_operator
_Trivial;
return _OutputIter(__copy_aux2(__first, __last,
__result.base(),
_Trivial()));
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_ni2(_InputIter __first, _InputIter __last,
_OutputIter __result, __false_type)
{
typedef typename iterator_traits<_InputIter>::value_type
_ValueType;
typedef typename __type_traits<_ValueType>::has_trivial_assignment_operator
_Trivial;
return __copy_aux2(__first, __last,
__result,
_Trivial());
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_ni1(_InputIter __first, _InputIter __last,
_OutputIter __result, __true_type)
{
typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal;
return __copy_ni2(__first.base(), __last.base(), __result, __Normal());
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
__copy_ni1(_InputIter __first, _InputIter __last,
_OutputIter __result, __false_type)
{
typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal;
return __copy_ni2(__first, __last, __result, __Normal());
}
# 339 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _InputIter, typename _OutputIter>
inline _OutputIter
copy(_InputIter __first, _InputIter __last, _OutputIter __result)
{
typedef typename _Is_normal_iterator<_InputIter>::_Normal __Normal;
return __copy_ni1(__first, __last, __result, __Normal());
}
template<typename _BidirectionalIter1, typename _BidirectionalIter2>
inline _BidirectionalIter2
__copy_backward(_BidirectionalIter1 __first, _BidirectionalIter1 __last,
_BidirectionalIter2 __result,
bidirectional_iterator_tag)
{
while (__first != __last)
*--__result = *--__last;
return __result;
}
template<typename _RandomAccessIter, typename _BidirectionalIter>
inline _BidirectionalIter
__copy_backward(_RandomAccessIter __first, _RandomAccessIter __last,
_BidirectionalIter __result,
random_access_iterator_tag)
{
typename iterator_traits<_RandomAccessIter>::difference_type __n;
for (__n = __last - __first; __n > 0; --__n)
*--__result = *--__last;
return __result;
}
template<typename _BidirectionalIter1, typename _BidirectionalIter2,
typename _BoolType>
struct __copy_backward_dispatch
{
static _BidirectionalIter2
copy(_BidirectionalIter1 __first, _BidirectionalIter1 __last,
_BidirectionalIter2 __result)
{
return __copy_backward(__first, __last,
__result,
__iterator_category(__first));
}
};
template<typename _Tp>
struct __copy_backward_dispatch<_Tp*, _Tp*, __true_type>
{
static _Tp*
copy(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
const ptrdiff_t _Num = __last - __first;
memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
return __result - _Num;
}
};
template<typename _Tp>
struct __copy_backward_dispatch<const _Tp*, _Tp*, __true_type>
{
static _Tp*
copy(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
return __copy_backward_dispatch<_Tp*, _Tp*, __true_type>
::copy(__first, __last, __result);
}
};
template<typename _BI1, typename _BI2>
inline _BI2
__copy_backward_aux(_BI1 __first, _BI1 __last, _BI2 __result)
{
typedef typename __type_traits<typename iterator_traits<_BI2>::value_type>
::has_trivial_assignment_operator _Trivial;
return __copy_backward_dispatch<_BI1, _BI2, _Trivial>
::copy(__first, __last, __result);
}
template <typename _BI1, typename _BI2>
inline _BI2
__copy_backward_output_normal_iterator(_BI1 __first, _BI1 __last,
_BI2 __result, __true_type)
{ return _BI2(__copy_backward_aux(__first, __last, __result.base())); }
template <typename _BI1, typename _BI2>
inline _BI2
__copy_backward_output_normal_iterator(_BI1 __first, _BI1 __last,
_BI2 __result, __false_type)
{ return __copy_backward_aux(__first, __last, __result); }
template <typename _BI1, typename _BI2>
inline _BI2
__copy_backward_input_normal_iterator(_BI1 __first, _BI1 __last,
_BI2 __result, __true_type)
{
typedef typename _Is_normal_iterator<_BI2>::_Normal __Normal;
return __copy_backward_output_normal_iterator(__first.base(), __last.base(),
__result, __Normal());
}
template <typename _BI1, typename _BI2>
inline _BI2
__copy_backward_input_normal_iterator(_BI1 __first, _BI1 __last,
_BI2 __result, __false_type)
{
typedef typename _Is_normal_iterator<_BI2>::_Normal __Normal;
return __copy_backward_output_normal_iterator(__first, __last, __result,
__Normal());
}
# 477 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template <typename _BI1, typename _BI2>
inline _BI2
copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
typedef typename _Is_normal_iterator<_BI1>::_Normal __Normal;
return __copy_backward_input_normal_iterator(__first, __last, __result,
__Normal());
}
# 509 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _ForwardIter, typename _Tp>
void
fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __value)
{
for ( ; __first != __last; ++__first)
*__first = __value;
}
# 531 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _OutputIter, typename _Size, typename _Tp>
_OutputIter
fill_n(_OutputIter __first, _Size __n, const _Tp& __value)
{
for ( ; __n > 0; --__n, ++__first)
*__first = __value;
return __first;
}
inline void
fill(unsigned char* __first, unsigned char* __last, const unsigned char& __c)
{
unsigned char __tmp = __c;
memset(__first, __tmp, __last - __first);
}
inline void
fill(signed char* __first, signed char* __last, const signed char& __c)
{
signed char __tmp = __c;
memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
}
inline void
fill(char* __first, char* __last, const char& __c)
{
char __tmp = __c;
memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
}
template<typename _Size>
inline unsigned char*
fill_n(unsigned char* __first, _Size __n, const unsigned char& __c)
{
fill(__first, __first + __n, __c);
return __first + __n;
}
template<typename _Size>
inline signed char*
fill_n(char* __first, _Size __n, const signed char& __c)
{
fill(__first, __first + __n, __c);
return __first + __n;
}
template<typename _Size>
inline char*
fill_n(char* __first, _Size __n, const char& __c)
{
fill(__first, __first + __n, __c);
return __first + __n;
}
# 606 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _InputIter1, typename _InputIter2>
pair<_InputIter1, _InputIter2>
mismatch(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2)
{
while (__first1 != __last1 && *__first1 == *__first2) {
++__first1;
++__first2;
}
return pair<_InputIter1, _InputIter2>(__first1, __first2);
}
# 640 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _InputIter1, typename _InputIter2, typename _BinaryPredicate>
pair<_InputIter1, _InputIter2>
mismatch(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2,
_BinaryPredicate __binary_pred)
{
while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) {
++__first1;
++__first2;
}
return pair<_InputIter1, _InputIter2>(__first1, __first2);
}
# 668 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _InputIter1, typename _InputIter2>
inline bool
equal(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2)
{
for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!(*__first1 == *__first2))
return false;
return true;
}
# 699 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _InputIter1, typename _InputIter2, typename _BinaryPredicate>
inline bool
equal(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2,
_BinaryPredicate __binary_pred)
{
for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!__binary_pred(*__first1, *__first2))
return false;
return true;
}
# 732 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _InputIter1, typename _InputIter2>
bool
lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2)
{
for ( ; __first1 != __last1 && __first2 != __last2
; ++__first1, ++__first2) {
if (*__first1 < *__first2)
return true;
if (*__first2 < *__first1)
return false;
}
return __first1 == __last1 && __first2 != __last2;
}
# 767 "/usr/include/c++/3.2/bits/stl_algobase.h" 3
template<typename _InputIter1, typename _InputIter2, typename _Compare>
bool
lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_Compare __comp)
{
for ( ; __first1 != __last1 && __first2 != __last2
; ++__first1, ++__first2) {
if (__comp(*__first1, *__first2))
return true;
if (__comp(*__first2, *__first1))
return false;
}
return __first1 == __last1 && __first2 != __last2;
}
inline bool
lexicographical_compare(const unsigned char* __first1, const unsigned char* __last1,
const unsigned char* __first2, const unsigned char* __last2)
{
const size_t __len1 = __last1 - __first1;
const size_t __len2 = __last2 - __first2;
const int __result = memcmp(__first1, __first2, min(__len1, __len2));
return __result != 0 ? __result < 0 : __len1 < __len2;
}
inline bool
lexicographical_compare(const char* __first1, const char* __last1,
const char* __first2, const char* __last2)
{
return lexicographical_compare((const signed char*) __first1,
(const signed char*) __last1,
(const signed char*) __first2,
(const signed char*) __last2);
}
}
# 55 "/usr/include/c++/3.2/memory" 2 3
# 1 "/usr/include/c++/3.2/bits/stl_alloc.h" 1 3
# 88 "/usr/include/c++/3.2/bits/stl_alloc.h" 3
# 1 "/usr/include/c++/3.2/cassert" 1 3
# 47 "/usr/include/c++/3.2/cassert" 3
# 1 "/usr/include/assert.h" 1 3
# 49 "/usr/include/c++/3.2/cassert" 2 3
# 89 "/usr/include/c++/3.2/bits/stl_alloc.h" 2 3
# 1 "/usr/include/c++/3.2/bits/functexcept.h" 1 3
# 34 "/usr/include/c++/3.2/bits/functexcept.h" 3
# 1 "/usr/include/c++/3.2/exception_defines.h" 1 3
# 35 "/usr/include/c++/3.2/bits/functexcept.h" 2 3
namespace std
{
void
__throw_bad_exception(void);
void
__throw_bad_alloc(void);
void
__throw_bad_cast(void);
void
__throw_bad_typeid(void);
void
__throw_logic_error(const char* __s);
void
__throw_domain_error(const char* __s);
void
__throw_invalid_argument(const char* __s);
void
__throw_length_error(const char* __s);
void
__throw_out_of_range(const char* __s);
void
__throw_runtime_error(const char* __s);
void
__throw_range_error(const char* __s);
void
__throw_overflow_error(const char* __s);
void
__throw_underflow_error(const char* __s);
void
__throw_ios_failure(const char* __s);
}
# 90 "/usr/include/c++/3.2/bits/stl_alloc.h" 2 3
# 1 "/usr/include/c++/3.2/bits/stl_threads.h" 1 3
# 54 "/usr/include/c++/3.2/bits/stl_threads.h" 3
namespace std
{
struct _Refcount_Base
{
typedef size_t _RC_t;
volatile _RC_t _M_ref_count;
__gthread_mutex_t _M_ref_count_lock;
_Refcount_Base(_RC_t __n) : _M_ref_count(__n)
{
__gthread_mutex_t __tmp = {0, 0, 0, PTHREAD_MUTEX_TIMED_NP, { 0, 0 }};
_M_ref_count_lock = __tmp;
}
void
_M_incr()
{
__gthread_mutex_lock(&_M_ref_count_lock);
++_M_ref_count;
__gthread_mutex_unlock(&_M_ref_count_lock);
}
_RC_t
_M_decr()
{
__gthread_mutex_lock(&_M_ref_count_lock);
volatile _RC_t __tmp = --_M_ref_count;
__gthread_mutex_unlock(&_M_ref_count_lock);
return __tmp;
}
};
# 109 "/usr/include/c++/3.2/bits/stl_threads.h" 3
template<int __dummy>
struct _Swap_lock_struct
{ static __gthread_mutex_t _S_swap_lock; };
template<int __dummy>
__gthread_mutex_t
_Swap_lock_struct<__dummy>::_S_swap_lock = {0, 0, 0, PTHREAD_MUTEX_TIMED_NP, { 0, 0 }};
inline unsigned long
_Atomic_swap(unsigned long * __p, unsigned long __q)
{
__gthread_mutex_lock(&_Swap_lock_struct<0>::_S_swap_lock);
unsigned long __result = *__p;
*__p = __q;
__gthread_mutex_unlock(&_Swap_lock_struct<0>::_S_swap_lock);
return __result;
}
# 151 "/usr/include/c++/3.2/bits/stl_threads.h" 3
struct _STL_mutex_lock
{
__gthread_mutex_t _M_lock;
void
_M_initialize()
{
# 184 "/usr/include/c++/3.2/bits/stl_threads.h" 3
}
void
_M_acquire_lock()
{
__gthread_mutex_lock(&_M_lock);
}
void
_M_release_lock()
{
__gthread_mutex_unlock(&_M_lock);
}
};
# 220 "/usr/include/c++/3.2/bits/stl_threads.h" 3
struct _STL_auto_lock
{
_STL_mutex_lock& _M_lock;
_STL_auto_lock(_STL_mutex_lock& __lock) : _M_lock(__lock)
{ _M_lock._M_acquire_lock(); }
~_STL_auto_lock() { _M_lock._M_release_lock(); }
private:
void operator=(const _STL_auto_lock&);
_STL_auto_lock(const _STL_auto_lock&);
};
}
# 91 "/usr/include/c++/3.2/bits/stl_alloc.h" 2 3
# 1 "/usr/include/c++/3.2/i386-linux/bits/atomicity.h" 1 3
# 33 "/usr/include/c++/3.2/i386-linux/bits/atomicity.h" 3
typedef int _Atomic_word;
static inline _Atomic_word
__attribute__ ((__unused__))
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
{
register _Atomic_word __result;
__asm__ __volatile__ ("lock; xaddl %0,%2"
: "=r" (__result)
: "0" (__val), "m" (*__mem)
: "memory");
return __result;
}
static inline void
__attribute__ ((__unused__))
__atomic_add (volatile _Atomic_word* __mem, int __val)
{
__asm__ __volatile__ ("lock; addl %0,%1"
: : "ir" (__val), "m" (*__mem) : "memory");
}
# 93 "/usr/include/c++/3.2/bits/stl_alloc.h" 2 3
namespace std
{
# 104 "/usr/include/c++/3.2/bits/stl_alloc.h" 3
class __new_alloc
{
public:
static void*
allocate(size_t __n)
{ return ::operator new(__n); }
static void
deallocate(void* __p, size_t)
{ ::operator delete(__p); }
};
# 127 "/usr/include/c++/3.2/bits/stl_alloc.h" 3
template<int __inst>
class __malloc_alloc_template
{
private:
static void* _S_oom_malloc(size_t);
static void* _S_oom_realloc(void*, size_t);
static void (* __malloc_alloc_oom_handler)();
public:
static void*
allocate(size_t __n)
{
void* __result = malloc(__n);
if (__builtin_expect(__result == 0, 0))
__result = _S_oom_malloc(__n);
return __result;
}
static void
deallocate(void* __p, size_t )
{ free(__p); }
static void*
reallocate(void* __p, size_t , size_t __new_sz)
{
void* __result = realloc(__p, __new_sz);
if (__builtin_expect(__result == 0, 0))
__result = _S_oom_realloc(__p, __new_sz);
return __result;
}
static void (* __set_malloc_handler(void (*__f)()))()
{
void (* __old)() = __malloc_alloc_oom_handler;
__malloc_alloc_oom_handler = __f;
return __old;
}
};
template<int __inst>
void (* __malloc_alloc_template<__inst>::__malloc_alloc_oom_handler)() = 0;
template<int __inst>
void*
__malloc_alloc_template<__inst>::
_S_oom_malloc(size_t __n)
{
void (* __my_malloc_handler)();
void* __result;
for (;;)
{
__my_malloc_handler = __malloc_alloc_oom_handler;
if (__builtin_expect(__my_malloc_handler == 0, 0))
__throw_bad_alloc();
(*__my_malloc_handler)();
__result = malloc(__n);
if (__result)
return __result;
}
}
template<int __inst>
void*
__malloc_alloc_template<__inst>::
_S_oom_realloc(void* __p, size_t __n)
{
void (* __my_malloc_handler)();
void* __result;
for (;;)
{
__my_malloc_handler = __malloc_alloc_oom_handler;
if (__builtin_expect(__my_malloc_handler == 0, 0))
__throw_bad_alloc();
(*__my_malloc_handler)();
__result = realloc(__p, __n);
if (__result)
return __result;
}
}
typedef __new_alloc __mem_interface;
# 229 "/usr/include/c++/3.2/bits/stl_alloc.h" 3
template<typename _Tp, typename _Alloc>
class __simple_alloc
{
public:
static _Tp*
allocate(size_t __n)
{
_Tp* __ret = 0;
if (__n)
__ret = static_cast<_Tp*>(_Alloc::allocate(__n * sizeof(_Tp)));
return __ret;
}
static _Tp*
allocate()
{ return (_Tp*) _Alloc::allocate(sizeof (_Tp)); }
static void
deallocate(_Tp* __p, size_t __n)
{ if (0 != __n) _Alloc::deallocate(__p, __n * sizeof (_Tp)); }
static void
deallocate(_Tp* __p)
{ _Alloc::deallocate(__p, sizeof (_Tp)); }
};
# 270 "/usr/include/c++/3.2/bits/stl_alloc.h" 3
template<typename _Alloc>
class __debug_alloc
{
private:
enum {_S_extra = 8};
public:
static void*
allocate(size_t __n)
{
char* __result = (char*)_Alloc::allocate(__n + (int) _S_extra);
*(size_t*)__result = __n;
return __result + (int) _S_extra;
}
static void
deallocate(void* __p, size_t __n)
{
char* __real_p = (char*)__p - (int) _S_extra;
(static_cast<void> (0));
_Alloc::deallocate(__real_p, __n + (int) _S_extra);
}
static void*
reallocate(void* __p, size_t __old_sz, size_t __new_sz)
{
char* __real_p = (char*)__p - (int) _S_extra;
(static_cast<void> (0));
char* __result = (char*) _Alloc::reallocate(__real_p,
__old_sz + (int) _S_extra,
__new_sz + (int) _S_extra);
*(size_t*)__result = __new_sz;
return __result + (int) _S_extra;
}
};
# 340 "/usr/include/c++/3.2/bits/stl_alloc.h" 3
template<bool __threads, int __inst>
class __default_alloc_template
{
private:
enum {_ALIGN = 8};
enum {_MAX_BYTES = 128};
enum {_NFREELISTS = _MAX_BYTES / _ALIGN};
union _Obj
{
union _Obj* _M_free_list_link;
char _M_client_data[1];
};
static _Obj* volatile _S_free_list[_NFREELISTS];
static char* _S_start_free;
static char* _S_end_free;
static size_t _S_heap_size;
static _STL_mutex_lock _S_node_allocator_lock;
static size_t
_S_round_up(size_t __bytes)
{ return (((__bytes) + (size_t) _ALIGN-1) & ~((size_t) _ALIGN - 1)); }
static size_t
_S_freelist_index(size_t __bytes)
{ return (((__bytes) + (size_t)_ALIGN - 1)/(size_t)_ALIGN - 1); }
static void*
_S_refill(size_t __n);
static char*
_S_chunk_alloc(size_t __size, int& __nobjs);
struct _Lock
{
_Lock() { if (__threads) _S_node_allocator_lock._M_acquire_lock(); }
~_Lock() { if (__threads) _S_node_allocator_lock._M_release_lock(); }
} __attribute__ ((__unused__));
friend struct _Lock;
static _Atomic_word _S_force_new;
public:
static void*
allocate(size_t __n)
{
void* __ret = 0;
if (_S_force_new == 0)
{
if (getenv("GLIBCPP_FORCE_NEW"))
__atomic_add(&_S_force_new, 1);
else
__atomic_add(&_S_force_new, -1);
(static_cast<void> (0));
}
if ((__n > (size_t) _MAX_BYTES) || (_S_force_new > 0))
__ret = __new_alloc::allocate(__n);
else
{
_Obj* volatile* __my_free_list = _S_free_list
+ _S_freelist_index(__n);
_Lock __lock_instance;
_Obj* __restrict__ __result = *__my_free_list;
if (__builtin_expect(__result == 0, 0))
__ret = _S_refill(_S_round_up(__n));
else
{
*__my_free_list = __result -> _M_free_list_link;
__ret = __result;
}
if (__builtin_expect(__ret == 0, 0))
__throw_bad_alloc();
}
return __ret;
}
static void
deallocate(void* __p, size_t __n)
{
if ((__n > (size_t) _MAX_BYTES) || (_S_force_new > 0))
__new_alloc::deallocate(__p, __n);
else
{
_Obj* volatile* __my_free_list = _S_free_list
+ _S_freelist_index(__n);
_Obj* __q = (_Obj*)__p;
_Lock __lock_instance;
__q -> _M_free_list_link = *__my_free_list;
*__my_free_list = __q;
}
}
static void*
reallocate(void* __p, size_t __old_sz, size_t __new_sz);
};
template<bool __threads, int __inst> _Atomic_word
__default_alloc_template<__threads, __inst>::_S_force_new = 0;
template<bool __threads, int __inst>
inline bool
operator==(const __default_alloc_template<__threads,__inst>&,
const __default_alloc_template<__threads,__inst>&)
{ return true; }
template<bool __threads, int __inst>
inline bool
operator!=(const __default_alloc_template<__threads,__inst>&,
const __default_alloc_template<__threads,__inst>&)
{ return false; }
template<bool __threads, int __inst>
char*
__default_alloc_template<__threads, __inst>::
_S_chunk_alloc(size_t __size, int& __nobjs)
{
char* __result;
size_t __total_bytes = __size * __nobjs;
size_t __bytes_left = _S_end_free - _S_start_free;
if (__bytes_left >= __total_bytes)
{
__result = _S_start_free;
_S_start_free += __total_bytes;
return __result ;
}
else if (__bytes_left >= __size)
{
__nobjs = (int)(__bytes_left/__size);
__total_bytes = __size * __nobjs;
__result = _S_start_free;
_S_start_free += __total_bytes;
return __result;
}
else
{
size_t __bytes_to_get =
2 * __total_bytes + _S_round_up(_S_heap_size >> 4);
if (__bytes_left > 0)
{
_Obj* volatile* __my_free_list =
_S_free_list + _S_freelist_index(__bytes_left);
((_Obj*)_S_start_free) -> _M_free_list_link = *__my_free_list;
*__my_free_list = (_Obj*)_S_start_free;
}
_S_start_free = (char*) __new_alloc::allocate(__bytes_to_get);
if (_S_start_free == 0)
{
size_t __i;
_Obj* volatile* __my_free_list;
_Obj* __p;
__i = __size;
for (; __i <= (size_t) _MAX_BYTES; __i += (size_t) _ALIGN)
{
__my_free_list = _S_free_list + _S_freelist_index(__i);
__p = *__my_free_list;
if (__p != 0)
{
*__my_free_list = __p -> _M_free_list_link;
_S_start_free = (char*)__p;
_S_end_free = _S_start_free + __i;
return _S_chunk_alloc(__size, __nobjs);
}
}
_S_end_free = 0;
_S_start_free = (char*)__new_alloc::allocate(__bytes_to_get);
}
_S_heap_size += __bytes_to_get;
_S_end_free = _S_start_free + __bytes_to_get;
return _S_chunk_alloc(__size, __nobjs);
}
}
template<bool __threads, int __inst>
void*
__default_alloc_template<__threads, __inst>::_S_refill(size_t __n)
{
int __nobjs = 20;
char* __chunk = _S_chunk_alloc(__n, __nobjs);
_Obj* volatile* __my_free_list;
_Obj* __result;
_Obj* __current_obj;
_Obj* __next_obj;
int __i;
if (1 == __nobjs)
return __chunk;
__my_free_list = _S_free_list + _S_freelist_index(__n);
__result = (_Obj*)__chunk;
*__my_free_list = __next_obj = (_Obj*)(__chunk + __n);
for (__i = 1; ; __i++)
{
__current_obj = __next_obj;
__next_obj = (_Obj*)((char*)__next_obj + __n);
if (__nobjs - 1 == __i)
{
__current_obj -> _M_free_list_link = 0;
break;
}
else
__current_obj -> _M_free_list_link = __next_obj;
}
return __result;
}
template<bool threads, int inst>
void*
__default_alloc_template<threads, inst>::
reallocate(void* __p, size_t __old_sz, size_t __new_sz)
{
void* __result;
size_t __copy_sz;
if (__old_sz > (size_t) _MAX_BYTES && __new_sz > (size_t) _MAX_BYTES)
return(realloc(__p, __new_sz));
if (_S_round_up(__old_sz) == _S_round_up(__new_sz))
return(__p);
__result = allocate(__new_sz);
__copy_sz = __new_sz > __old_sz? __old_sz : __new_sz;
memcpy(__result, __p, __copy_sz);
deallocate(__p, __old_sz);
return __result;
}
template<bool __threads, int __inst>
_STL_mutex_lock
__default_alloc_template<__threads,__inst>::_S_node_allocator_lock
= { {0, 0, 0, PTHREAD_MUTEX_TIMED_NP, { 0, 0 }} };
template<bool __threads, int __inst>
char* __default_alloc_template<__threads,__inst>::_S_start_free = 0;
template<bool __threads, int __inst>
char* __default_alloc_template<__threads,__inst>::_S_end_free = 0;
template<bool __threads, int __inst>
size_t __default_alloc_template<__threads,__inst>::_S_heap_size = 0;
template<bool __threads, int __inst>
typename __default_alloc_template<__threads,__inst>::_Obj* volatile
__default_alloc_template<__threads,__inst>::_S_free_list[_NFREELISTS];
typedef __default_alloc_template<true,0> __alloc;
typedef __default_alloc_template<false,0> __single_client_alloc;
# 647 "/usr/include/c++/3.2/bits/stl_alloc.h" 3
template<typename _Tp>
class allocator
{
typedef __alloc _Alloc;
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef const _Tp* const_pointer;
typedef _Tp& reference;
typedef const _Tp& const_reference;
typedef _Tp value_type;
template<typename _Tp1>
struct rebind
{ typedef allocator<_Tp1> other; };
allocator() throw() {}
allocator(const allocator&) throw() {}
template<typename _Tp1>
allocator(const allocator<_Tp1>&) throw() {}
~allocator() throw() {}
pointer
address(reference __x) const { return &__x; }
const_pointer
address(const_reference __x) const { return &__x; }
_Tp*
allocate(size_type __n, const void* = 0)
{
_Tp* __ret = 0;
if (__n)
{
if (__n <= this->max_size())
__ret = static_cast<_Tp*>(_Alloc::allocate(__n * sizeof(_Tp)));
else
__throw_bad_alloc();
}
return __ret;
}
void
deallocate(pointer __p, size_type __n)
{ _Alloc::deallocate(__p, __n * sizeof(_Tp)); }
size_type
max_size() const throw() { return size_t(-1) / sizeof(_Tp); }
void construct(pointer __p, const _Tp& __val) { new(__p) _Tp(__val); }
void destroy(pointer __p) { __p->~_Tp(); }
};
template<>
class allocator<void>
{
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef void* pointer;
typedef const void* const_pointer;
typedef void value_type;
template<typename _Tp1>
struct rebind
{ typedef allocator<_Tp1> other; };
};
template<typename _T1, typename _T2>
inline bool
operator==(const allocator<_T1>&, const allocator<_T2>&)
{ return true; }
template<typename _T1, typename _T2>
inline bool
operator!=(const allocator<_T1>&, const allocator<_T2>&)
{ return false; }
# 743 "/usr/include/c++/3.2/bits/stl_alloc.h" 3
template<typename _Tp, typename _Alloc>
struct __allocator
{
_Alloc __underlying_alloc;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef const _Tp* const_pointer;
typedef _Tp& reference;
typedef const _Tp& const_reference;
typedef _Tp value_type;
template<typename _Tp1>
struct rebind
{ typedef __allocator<_Tp1, _Alloc> other; };
__allocator() throw() {}
__allocator(const __allocator& __a) throw()
: __underlying_alloc(__a.__underlying_alloc) {}
template<typename _Tp1>
__allocator(const __allocator<_Tp1, _Alloc>& __a) throw()
: __underlying_alloc(__a.__underlying_alloc) {}
~__allocator() throw() {}
pointer
address(reference __x) const { return &__x; }
const_pointer
address(const_reference __x) const { return &__x; }
_Tp*
allocate(size_type __n, const void* = 0)
{
_Tp* __ret = 0;
if (__n)
__ret = static_cast<_Tp*>(_Alloc::allocate(__n * sizeof(_Tp)));
return __ret;
}
void
deallocate(pointer __p, size_type __n)
{ __underlying_alloc.deallocate(__p, __n * sizeof(_Tp)); }
size_type
max_size() const throw() { return size_t(-1) / sizeof(_Tp); }
void
construct(pointer __p, const _Tp& __val) { new(__p) _Tp(__val); }
void
destroy(pointer __p) { __p->~_Tp(); }
};
template<typename _Alloc>
struct __allocator<void, _Alloc>
{
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef void* pointer;
typedef const void* const_pointer;
typedef void value_type;
template<typename _Tp1>
struct rebind
{ typedef __allocator<_Tp1, _Alloc> other; };
};
template<typename _Tp, typename _Alloc>
inline bool
operator==(const __allocator<_Tp,_Alloc>& __a1,
const __allocator<_Tp,_Alloc>& __a2)
{ return __a1.__underlying_alloc == __a2.__underlying_alloc; }
template<typename _Tp, typename _Alloc>
inline bool
operator!=(const __allocator<_Tp, _Alloc>& __a1,
const __allocator<_Tp, _Alloc>& __a2)
{ return __a1.__underlying_alloc != __a2.__underlying_alloc; }
template<int inst>
inline bool
operator==(const __malloc_alloc_template<inst>&,
const __malloc_alloc_template<inst>&)
{ return true; }
template<int __inst>
inline bool
operator!=(const __malloc_alloc_template<__inst>&,
const __malloc_alloc_template<__inst>&)
{ return false; }
template<typename _Alloc>
inline bool
operator==(const __debug_alloc<_Alloc>&, const __debug_alloc<_Alloc>&)
{ return true; }
template<typename _Alloc>
inline bool
operator!=(const __debug_alloc<_Alloc>&, const __debug_alloc<_Alloc>&)
{ return false; }
# 896 "/usr/include/c++/3.2/bits/stl_alloc.h" 3
template<typename _Tp, typename _Allocator>
struct _Alloc_traits
{
static const bool _S_instanceless = false;
typedef typename _Allocator::template rebind<_Tp>::other allocator_type;
};
template<typename _Tp, typename _Allocator>
const bool _Alloc_traits<_Tp, _Allocator>::_S_instanceless;
template<typename _Tp, typename _Tp1>
struct _Alloc_traits<_Tp, allocator<_Tp1> >
{
static const bool _S_instanceless = true;
typedef __simple_alloc<_Tp, __alloc> _Alloc_type;
typedef allocator<_Tp> allocator_type;
};
template<typename _Tp, int __inst>
struct _Alloc_traits<_Tp, __malloc_alloc_template<__inst> >
{
static const bool _S_instanceless = true;
typedef __simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type;
typedef __allocator<_Tp, __malloc_alloc_template<__inst> > allocator_type;
};
template<typename _Tp, bool __threads, int __inst>
struct _Alloc_traits<_Tp, __default_alloc_template<__threads, __inst> >
{
static const bool _S_instanceless = true;
typedef __simple_alloc<_Tp, __default_alloc_template<__threads, __inst> >
_Alloc_type;
typedef __allocator<_Tp, __default_alloc_template<__threads, __inst> >
allocator_type;
};
template<typename _Tp, typename _Alloc>
struct _Alloc_traits<_Tp, __debug_alloc<_Alloc> >
{
static const bool _S_instanceless = true;
typedef __simple_alloc<_Tp, __debug_alloc<_Alloc> > _Alloc_type;
typedef __allocator<_Tp, __debug_alloc<_Alloc> > allocator_type;
};
template<typename _Tp, typename _Tp1, int __inst>
struct _Alloc_traits<_Tp,
__allocator<_Tp1, __malloc_alloc_template<__inst> > >
{
static const bool _S_instanceless = true;
typedef __simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type;
typedef __allocator<_Tp, __malloc_alloc_template<__inst> > allocator_type;
};
template<typename _Tp, typename _Tp1, bool __thr, int __inst>
struct _Alloc_traits<_Tp, __allocator<_Tp1, __default_alloc_template<__thr, __inst> > >
{
static const bool _S_instanceless = true;
typedef __simple_alloc<_Tp, __default_alloc_template<__thr,__inst> >
_Alloc_type;
typedef __allocator<_Tp, __default_alloc_template<__thr,__inst> >
allocator_type;
};
template<typename _Tp, typename _Tp1, typename _Alloc>
struct _Alloc_traits<_Tp, __allocator<_Tp1, __debug_alloc<_Alloc> > >
{
static const bool _S_instanceless = true;
typedef __simple_alloc<_Tp, __debug_alloc<_Alloc> > _Alloc_type;
typedef __allocator<_Tp, __debug_alloc<_Alloc> > allocator_type;
};
extern template class allocator<char>;
extern template class allocator<wchar_t>;
extern template class __default_alloc_template<true,0>;
}
# 56 "/usr/include/c++/3.2/memory" 2 3
# 1 "/usr/include/c++/3.2/bits/stl_construct.h" 1 3
# 67 "/usr/include/c++/3.2/bits/stl_construct.h" 3
namespace std
{
template <class _T1, class _T2>
inline void
_Construct(_T1* __p, const _T2& __value)
{ new (static_cast<void*>(__p)) _T1(__value); }
template <class _T1>
inline void
_Construct(_T1* __p)
{ new (static_cast<void*>(__p)) _T1(); }
# 98 "/usr/include/c++/3.2/bits/stl_construct.h" 3
template <class _ForwardIterator>
inline void
__destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type)
{ for ( ; __first != __last; ++__first) _Destroy(&*__first); }
# 112 "/usr/include/c++/3.2/bits/stl_construct.h" 3
template <class _ForwardIterator>
inline void
__destroy_aux(_ForwardIterator, _ForwardIterator, __true_type)
{ }
template <class _Tp>
inline void
_Destroy(_Tp* __pointer)
{ __pointer->~_Tp(); }
# 134 "/usr/include/c++/3.2/bits/stl_construct.h" 3
template <class _ForwardIterator>
inline void
_Destroy(_ForwardIterator __first, _ForwardIterator __last)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_Value_type;
typedef typename __type_traits<_Value_type>::has_trivial_destructor
_Has_trivial_destructor;
__destroy_aux(__first, __last, _Has_trivial_destructor());
}
}
# 57 "/usr/include/c++/3.2/memory" 2 3
# 1 "/usr/include/c++/3.2/bits/stl_uninitialized.h" 1 3
# 66 "/usr/include/c++/3.2/bits/stl_uninitialized.h" 3
namespace std
{
template<typename _InputIter, typename _ForwardIter>
inline _ForwardIter
__uninitialized_copy_aux(_InputIter __first, _InputIter __last,
_ForwardIter __result,
__true_type)
{ return copy(__first, __last, __result); }
template<typename _InputIter, typename _ForwardIter>
_ForwardIter
__uninitialized_copy_aux(_InputIter __first, _InputIter __last,
_ForwardIter __result,
__false_type)
{
_ForwardIter __cur = __result;
try {
for ( ; __first != __last; ++__first, ++__cur)
_Construct(&*__cur, *__first);
return __cur;
}
catch(...)
{
_Destroy(__result, __cur);
throw;
}
}
# 106 "/usr/include/c++/3.2/bits/stl_uninitialized.h" 3
template<typename _InputIter, typename _ForwardIter>
inline _ForwardIter
uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result)
{
typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
return __uninitialized_copy_aux(__first, __last, __result, _Is_POD());
}
inline char*
uninitialized_copy(const char* __first, const char* __last, char* __result)
{
memmove(__result, __first, __last - __first);
return __result + (__last - __first);
}
inline wchar_t*
uninitialized_copy(const wchar_t* __first, const wchar_t* __last,
wchar_t* __result)
{
memmove(__result, __first, sizeof(wchar_t) * (__last - __first));
return __result + (__last - __first);
}
template<typename _ForwardIter, typename _Tp>
inline void
__uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last,
const _Tp& __x, __true_type)
{ fill(__first, __last, __x); }
template<typename _ForwardIter, typename _Tp>
void
__uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last,
const _Tp& __x, __false_type)
{
_ForwardIter __cur = __first;
try {
for ( ; __cur != __last; ++__cur)
_Construct(&*__cur, __x);
}
catch(...)
{
_Destroy(__first, __cur);
throw;
}
}
# 164 "/usr/include/c++/3.2/bits/stl_uninitialized.h" 3
template<typename _ForwardIter, typename _Tp>
inline void
uninitialized_fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __x)
{
typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
__uninitialized_fill_aux(__first, __last, __x, _Is_POD());
}
template<typename _ForwardIter, typename _Size, typename _Tp>
inline _ForwardIter
__uninitialized_fill_n_aux(_ForwardIter __first, _Size __n,
const _Tp& __x, __true_type)
{
return fill_n(__first, __n, __x);
}
template<typename _ForwardIter, typename _Size, typename _Tp>
_ForwardIter
__uninitialized_fill_n_aux(_ForwardIter __first, _Size __n,
const _Tp& __x, __false_type)
{
_ForwardIter __cur = __first;
try {
for ( ; __n > 0; --__n, ++__cur)
_Construct(&*__cur, __x);
return __cur;
}
catch(...)
{
_Destroy(__first, __cur);
throw;
}
}
# 210 "/usr/include/c++/3.2/bits/stl_uninitialized.h" 3
template<typename _ForwardIter, typename _Size, typename _Tp>
inline _ForwardIter
uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x)
{
typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
return __uninitialized_fill_n_aux(__first, __n, __x, _Is_POD());
}
# 227 "/usr/include/c++/3.2/bits/stl_uninitialized.h" 3
template<typename _InputIter1, typename _InputIter2, typename _ForwardIter>
inline _ForwardIter
__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_ForwardIter __result)
{
_ForwardIter __mid = uninitialized_copy(__first1, __last1, __result);
try {
return uninitialized_copy(__first2, __last2, __mid);
}
catch(...)
{
_Destroy(__result, __mid);
throw;
}
}
template<typename _ForwardIter, typename _Tp, typename _InputIter>
inline _ForwardIter
__uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid,
const _Tp& __x,
_InputIter __first, _InputIter __last)
{
uninitialized_fill(__result, __mid, __x);
try {
return uninitialized_copy(__first, __last, __mid);
}
catch(...)
{
_Destroy(__result, __mid);
throw;
}
}
template<typename _InputIter, typename _ForwardIter, typename _Tp>
inline void
__uninitialized_copy_fill(_InputIter __first1, _InputIter __last1,
_ForwardIter __first2, _ForwardIter __last2,
const _Tp& __x)
{
_ForwardIter __mid2 = uninitialized_copy(__first1, __last1, __first2);
try {
uninitialized_fill(__mid2, __last2, __x);
}
catch(...)
{
_Destroy(__first2, __mid2);
throw;
}
}
}
# 59 "/usr/include/c++/3.2/memory" 2 3
# 1 "/usr/include/c++/3.2/bits/stl_raw_storage_iter.h" 1 3
# 64 "/usr/include/c++/3.2/bits/stl_raw_storage_iter.h" 3
namespace std
{
template <class _ForwardIterator, class _Tp>
class raw_storage_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_ForwardIterator _M_iter;
public:
explicit
raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {}
raw_storage_iterator&
operator*() { return *this; }
raw_storage_iterator&
operator=(const _Tp& __element)
{
_Construct(&*_M_iter, __element);
return *this;
}
raw_storage_iterator<_ForwardIterator, _Tp>&
operator++()
{
++_M_iter;
return *this;
}
raw_storage_iterator<_ForwardIterator, _Tp>
operator++(int)
{
raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this;
++_M_iter;
return __tmp;
}
};
}
# 60 "/usr/include/c++/3.2/memory" 2 3
namespace std
{
# 74 "/usr/include/c++/3.2/memory" 3
template <typename _Tp>
pair<_Tp*, ptrdiff_t>
__get_temporary_buffer(ptrdiff_t __len, _Tp*)
{
if (__len > ptrdiff_t(2147483647 / sizeof(_Tp)))
__len = 2147483647 / sizeof(_Tp);
while (__len > 0) {
_Tp* __tmp = (_Tp*) std::malloc((std::size_t)__len * sizeof(_Tp));
if (__tmp != 0)
return pair<_Tp*, ptrdiff_t>(__tmp, __len);
__len /= 2;
}
return pair<_Tp*, ptrdiff_t>((_Tp*)0, 0);
}
# 106 "/usr/include/c++/3.2/memory" 3
template<typename _Tp>
inline pair<_Tp*,ptrdiff_t>
get_temporary_buffer(ptrdiff_t __len)
{
return __get_temporary_buffer(__len, (_Tp*) 0);
}
# 120 "/usr/include/c++/3.2/memory" 3
template<typename _Tp>
void
return_temporary_buffer(_Tp* __p)
{
std::free(__p);
}
# 135 "/usr/include/c++/3.2/memory" 3
template<typename _Tp1>
struct auto_ptr_ref
{
_Tp1* _M_ptr;
explicit
auto_ptr_ref(_Tp1* __p)
: _M_ptr(__p) {}
};
# 175 "/usr/include/c++/3.2/memory" 3
template<typename _Tp>
class auto_ptr
{
private:
_Tp* _M_ptr;
public:
typedef _Tp element_type;
explicit
auto_ptr(element_type* __p = 0) throw()
: _M_ptr(__p) { }
# 202 "/usr/include/c++/3.2/memory" 3
auto_ptr(auto_ptr& __a) throw()
: _M_ptr(__a.release()) { }
# 214 "/usr/include/c++/3.2/memory" 3
template<typename _Tp1>
auto_ptr(auto_ptr<_Tp1>& __a) throw()
: _M_ptr(__a.release()) { }
# 226 "/usr/include/c++/3.2/memory" 3
auto_ptr&
operator=(auto_ptr& __a) throw()
{
reset(__a.release());
return *this;
}
# 243 "/usr/include/c++/3.2/memory" 3
template <typename _Tp1>
auto_ptr&
operator=(auto_ptr<_Tp1>& __a) throw()
{
reset(__a.release());
return *this;
}
# 263 "/usr/include/c++/3.2/memory" 3
~auto_ptr() { delete _M_ptr; }
# 273 "/usr/include/c++/3.2/memory" 3
element_type&
operator*() const throw() { return *_M_ptr; }
element_type*
operator->() const throw() { return _M_ptr; }
# 295 "/usr/include/c++/3.2/memory" 3
element_type*
get() const throw() { return _M_ptr; }
# 309 "/usr/include/c++/3.2/memory" 3
element_type*
release() throw()
{
element_type* __tmp = _M_ptr;
_M_ptr = 0;
return __tmp;
}
# 324 "/usr/include/c++/3.2/memory" 3
void
reset(element_type* __p = 0) throw()
{
if (__p != _M_ptr)
{
delete _M_ptr;
_M_ptr = __p;
}
}
# 345 "/usr/include/c++/3.2/memory" 3
auto_ptr(auto_ptr_ref<element_type> __ref) throw()
: _M_ptr(__ref._M_ptr) {}
auto_ptr&
operator=(auto_ptr_ref<element_type> __ref) throw()
{
if (__ref._M_ptr != this->get())
{
delete _M_ptr;
_M_ptr = __ref._M_ptr;
}
return *this;
}
template<typename _Tp1>
operator auto_ptr_ref<_Tp1>() throw()
{ return auto_ptr_ref<_Tp1>(this->release()); }
template<typename _Tp1>
operator auto_ptr<_Tp1>() throw()
{ return auto_ptr<_Tp1>(this->release()); }
};
}
# 24 "/home/nobbi/Physik/include/etLAP/Storage.h" 2
# 1 "/usr/include/c++/3.2/cassert" 1 3
# 47 "/usr/include/c++/3.2/cassert" 3
# 1 "/usr/include/assert.h" 1 3
# 49 "/usr/include/c++/3.2/cassert" 2 3
# 25 "/home/nobbi/Physik/include/etLAP/Storage.h" 2
namespace etLAP {
template <typename T>
void clear(T &);
template <typename T >
class Storage {
struct Rep {
unsigned int refcount;
unsigned int size;
T* data() { return reinterpret_cast<T *>(this + 1); };
T& operator[] (unsigned int s) { return data() [s]; };
Rep* grab() { ++refcount; return this; };
void release() { if (--refcount == 0) delete this; };
static void *operator new(size_t s, unsigned int extra) {
return ::operator new(s + extra * sizeof (T));
};
static void operator delete(void *ptr) {
::operator delete(ptr);
};
static Rep *create (unsigned int size_) {
Rep *p = new (size_) Rep;
p->refcount = 1;
p->size = size_;
return p;
};
Rep *clone() {
Rep *p = create(size);
p->copy_from(data());
return p;
};
void copy_from(const T *src) {
for(unsigned n=0;n<size;n++) data()[n] = src[n];
};
void clear() {
for(unsigned int n=0;n<size;n++)
etLAP::clear(data()[n]);
};
private:
Rep &operator= (const Rep &);
};
Rep *rep;
mutable bool souvereign;
public:
Storage<T>() { rep = 0; };
~Storage<T>() { if(rep) rep->release(); }
Storage<T>(const Storage<T> &other) {
if(other.rep) {
rep = other.rep->grab();
other.souvereign = false;
souvereign = false;
} else {
rep = 0;
};
};
Storage<T>(unsigned int size) {
rep = Rep::create(size);
souvereign = true;
};
Storage<T>(T *ptr,unsigned int size) {
rep = Rep::create(size);
rep->copy_from(ptr);
souvereign = true;
};
Storage<T> &operator=(const Storage<T> &other) {
if(rep)
rep->release();
if(other.rep) {
rep = other.rep->grab();
other.souvereign = false;
souvereign = false;
} else {
rep = 0;
};
return *this;
};
T operator[](unsigned int i) const { (static_cast<void> (0)); return (*rep)[i]; }
T &operator[](unsigned int i) { (static_cast<void> (0)); (static_cast<void> (0)); return (*rep)[i]; }
void resize(unsigned int size) {
if(rep && size==rep->size) return;
if(rep) rep->release();
rep = Rep::create(size);
souvereign = true;
};
void clear() {
prepare_write_noclone();
rep->clear();
};
void prepare_write_clone() {
(static_cast<void> (0));
if(souvereign)
return;
if(rep->refcount > 1) {
Rep *r = rep->clone();
rep->release();
rep = r;
};
souvereign = true;
};
void prepare_write_noclone() {
(static_cast<void> (0));
if(souvereign)
return;
if(rep->refcount > 1) {
unsigned int size = rep->size;
rep->release();
rep = Rep::create(size);
};
souvereign = true;
};
T *rawdata() { return rep->data(); };
};
};
# 61 "/home/nobbi/Physik/include/etLAP/Common.h" 2
# 1 "/usr/include/c++/3.2/cassert" 1 3
# 47 "/usr/include/c++/3.2/cassert" 3
# 1 "/usr/include/assert.h" 1 3
# 49 "/usr/include/c++/3.2/cassert" 2 3
# 67 "/home/nobbi/Physik/include/etLAP/Common.h" 2
namespace etLAP {
template <class SAME>
class Common {
protected:
public:
};
template <typename T> inline bool _is_locked(const T &) { return false; }
template <typename T,int N,class E> inline bool _is_locked(const Vector<T,N,E> &m) { return m.is_locked(); }
template <typename T,int R,int C,class E> inline bool _is_locked(const Matrix<T,R,C,E> &m) { return m.is_locked(); }
template <typename T> inline T buf(const T &t) { return t; }
template <class SAME,typename T>
class Common_Smart
: public Common<SAME> {
protected:
bool x;
void lock() { }
void unlock() { }
public:
Common_Smart<SAME,T>() { unlock(); }
template<typename X>
void assign_from(const X &src) {
lock();
(static_cast<void> (0));
unlock();
assign(*(SAME *)this,src,typename TypeCast<T,X>::Cast_t());
# 127 "/home/nobbi/Physik/include/etLAP/Common.h"
};
bool is_locked() const { return false; }
};
template <class SAME,typename T>
class Common_Packed
: public Common<SAME> {
public:
template<typename X>
void assign_from(const X &src) {
assign(*(SAME *)this,src,typename TypeCast<T,X>::Cast_t());
};
bool is_locked() const { return false; }
};
};
# 24 "/home/nobbi/Physik/include/etLAP/Vector.h" 2
# 1 "/home/nobbi/Physik/include/etLAP/Tupel.h" 1
# 25 "/home/nobbi/Physik/include/etLAP/Tupel.h"
namespace etLAP {
template <typename T,int N>
class Tupel {
T t[N];
public:
Tupel<T,N>() {};
explicit Tupel<T,N>(const T &t_) { for(int i=N;i-->0;) t[i]=t_; }
Tupel<T,N>(const Tupel<T,N-1> &tp_,const T &t_) { for(int i=N-1;i-->0;) t[i]=tp_[i]; t[N-1] = t_; }
Tupel<T,N>(const T &t_,const Tupel<T,N-1> &tp_) { t[0] = t_; for(int i=N-1;i-->0;) t[i+1]=tp_[i]; }
template <int N1>
Tupel<T,N>(const Tupel<T,N1> &tp1_,const Tupel<T,N-N1> &tp2_) {
for(int i=N-N1;i-->0;) t[i+N1]=tp2_[i];
for(int i=N1;i-->0;) t[i] =tp1_[i];
}
Tupel<T,N-1> tail() { Tupel<T,N-1> res; for(int i=N-1;i-->0;) res[i]=t[i+1]; return res; }
Tupel<T,N-1> head() { Tupel<T,N-1> res; for(int i=N-1;i-->0;) res[i]=t[i]; return res; }
const T operator[](int i) const { return t[i]; }
T &operator[](int i) { return t[i]; }
};
template <typename T>
class Tupel<T,0> {
public:
Tupel<T,0>() {};
explicit Tupel<T,0>(const T &t_) {}
Tupel<T,0>(const Tupel<T,0> &tp1_,const Tupel<T,0> &tp2_) {}
const T operator[](int i) const { throw 0; }
T &operator[](int i) { throw 0; }
};
template <typename T,int N1,int N2>
inline Tupel<T,N1+N2> operator,(const Tupel<T,N1> &t1,const Tupel<T,N2> &t2) {
return Tupel<T,N1+N2>(t1,t2);
};
template <typename T,int N>
inline Tupel<T,1+N> operator,(const T &t1,const Tupel<T,N> &t2) {
return Tupel<T,1+N>(t1,t2);
};
template <typename T,int N>
inline Tupel<T,N+1> operator,(const Tupel<T,N> &t1,const T &t2) {
return Tupel<T,N+1>(t1,t2);
};
template <typename T>
inline Tupel<T,1> _tupel_(const T &t) {
return Tupel<T,1>(t);
};
};
# 25 "/home/nobbi/Physik/include/etLAP/Vector.h" 2
namespace etLAP {
template <int N,typename T>
class Vector<T,N,Smart>
: public Common_Smart<Vector<T,N,Smart>,T> {
typedef Smart E;
typedef Vector<T,N,E> SAME;
T data[N];
public:
typedef const SAME &Ref_t;
Vector<T,N,E>() {};
template<typename X>
Vector<T,N,E>(const X &src) { assign_from(src); };
template<typename X>
const SAME &operator=(const X &src) { assign_from(src); return *(SAME *)this; };
void resize(int sz_) { (static_cast<void> (0)); };
void clear() { for(int n=N;n-->0;) etLAP::clear(data[n]); };
const T operator() (int n) const { return data[n]; };
T &operator() (int n,bool unsafe=false) { return data[n]; };
T *rawdata() { return &data[0]; };
int size() const { return N; };
void prepare_write_clone() {};
void prepare_write_noclone() {};
};
template <typename T>
class Vector<T,0,Smart>
: public Common_Smart<Vector<T,0,Smart>,T> {
typedef Smart E;
typedef Vector<T,0,E> SAME;
int sz;
Storage<T> data;
public:
typedef const SAME &Ref_t;
Vector<T,0,E>(): sz(0) {};
Vector<T,0,E>(int sz_): sz(sz_),data(sz) {};
template<typename X>
Vector<T,0,E>(const X &src) { sz=-1; assign_from(src); };
template<typename X>
const SAME &operator=(const X &src) { assign_from(src); return *(SAME *)this; };
void resize(int sz_) { sz=sz_;data.resize(sz); };
void clear() { data.clear(); };
const T operator() (int n) const { return data[n]; };
T &operator() (int n,bool unsafe=false) { if(!unsafe)prepare_write_clone(); return data[n]; };
T *rawdata() { return data.rawdata(); };
int size() const { return sz; }
void prepare_write_clone() { data.prepare_write_clone(); }
void prepare_write_noclone() { data.prepare_write_noclone(); }
};
template <int N,typename T>
class Vector<T,N,Packed>
: public Common_Packed<Vector<T,N,Packed>,T> {
typedef Packed E;
typedef Vector<T,N,E> SAME;
T data[N];
public:
typedef const SAME &Ref_t;
Vector<T,N,E>() {};
template<typename X>
Vector<T,N,E>(const X &src) { assign_from(src); };
template<typename X>
const SAME &operator=(const X &src) { assign_from(src); return *(SAME *)this; };
void resize(int sz_) { (static_cast<void> (0)); };
void clear() { for(int n=N;n-->0;) etLAP::clear(data[n]); };
const T operator() (int n) const { return data[n]; };
T &operator() (int n,bool unsafe=false) { return data[n]; };
T *rawdata() { return &data[0]; };
int size() const { return N; };
void prepare_write_clone() {};
void prepare_write_noclone() {};
};
template <typename T>
class Vector<T,0,Packed> {
Vector<T,0,Packed>();
public:
void dummy();
};
template <typename TD,int ND,class ED,typename TS,int NS,class ES,class CAST_TAG>
inline void assign(Vector<TD,ND,ED> &dest,const Vector<TS,NS,ES> &src,CAST_TAG) {
etLAP::CTAssertClass<(ND == NS || ND == 0 || NS == 0)>::test();
dest.resize(src.size());
dest.prepare_write_noclone();
for(int i=dest.size();i-->0;)
assign(dest(i,true),src(i));
};
template <typename TD,int ND,class E,typename TS,int NS,class CAST_TAG>
inline void assign(Vector<TD,ND,E> &dest,const Tupel<TS,NS> &src,CAST_TAG) {
etLAP::CTAssertClass<(ND == NS || ND == 0)>::test();
dest.resize(NS);
dest.prepare_write_noclone();
for(int i=dest.size();i-->0;)
assign(dest(i,true),src[i]);
};
template <typename TD,int ND,class ED,typename TS,int NS,class ES>
inline void assign_add(Vector<TD,ND,ED> &__restrict__ dest,const Vector<TS,NS,ES> &__restrict__ src) {
etLAP::CTAssertClass<(ND == NS || ND == 0)>::test();
(static_cast<void> (0));
dest.prepare_write_clone();
for(int i=dest.size();i-->0;)
assign_add(dest(i,true),src(i));
};
template <typename TD,int ND,class ED,typename TS,int NS,class ES>
inline void assign_sub(Vector<TD,ND,ED> &__restrict__ dest,const Vector<TS,NS,ES> &__restrict__ src) {
etLAP::CTAssertClass<(ND == NS || ND == 0)>::test();
(static_cast<void> (0));
dest.prepare_write_clone();
for(int i=dest.size();i-->0;)
assign_sub(dest(i,true),src(i));
};
template <typename TD,int N,class E,typename TS>
inline void assign_mul(Vector<TD,N,E> &__restrict__ dest,TS s) {
dest.prepare_write_clone();
for(int i=dest.size();i-->0;)
assign_mul(dest(i,true),s);
};
template <typename TD,int N,class E,typename TS>
inline void assign_div(Vector<TD,N,E> &__restrict__ dest,TS s) {
dest.prepare_write_clone();
for(int i=dest.size();i-->0;)
assign_div(dest(i,true),s);
};
template <int N,typename T>
class Vector<T,N,Zero>
: public Common<Vector<T,N,Zero> > {
typedef Vector<T,N,Zero> SAME;
public:
typedef SAME Ref_t;
Vector<T,N,Zero>() {};
T operator() (int n) const { return (T)0; }
int size() const { return N; }
bool is_locked() const { return false; };
};
template <typename T>
class Vector<T,0,Zero>
: public Common<Vector<T,0,Zero> > {
typedef Vector<T,0,Zero> SAME;
int sz;
public:
typedef SAME Ref_t;
Vector<T,0,Zero>(int sz_): sz(sz_) {};
T operator() (int n) const { return (T)0; }
int size() const { return sz; }
bool is_locked() const { return false; };
};
template <int N,typename T,typename T1,class E1,class Op>
class Vector<T,N,ElemUnOp<Vector<T1,N,E1>,Op> >
: public Common<Vector<T,N,ElemUnOp<Vector<T1,N,E1>,Op> > > {
typedef Vector<T1,N,E1> V;
typedef ElemUnOp<V,Op> E;
typedef Vector<T,N,E> SAME;
const typename V::Ref_t v;
public:
typedef SAME Ref_t;
Vector<T,N,E>(const V &v_) : v(v_) {}
T operator() (int n) const { return UnaryOp<Op>::apply(v(n)); }
int size() const { return v.size(); }
bool is_locked() const { return v.is_locked(); };
};
template <int N,typename T,typename T1,class E1,typename T2,class E2,class Op>
class Vector<T,N,ElemBinOp<Vector<T1,N,E1>,Vector<T2,N,E2>,Op> >
: public Common<Vector<T,N,ElemBinOp<Vector<T1,N,E1>,Vector<T2,N,E2>,Op> > > {
typedef Vector<T1,N,E1> V1;
typedef Vector<T2,N,E2> V2;
typedef ElemBinOp<V1,V2,Op> E;
typedef Vector<T,N,E> SAME;
const typename V1::Ref_t v1;
const typename V2::Ref_t v2;
public:
typedef SAME Ref_t;
Vector<T,N,E>(const V1 &v1_, const V2 &v2_) : v1(v1_), v2(v2_) {}
T operator() (int n) const { return BinaryOp<Op>::apply(v1(n),v2(n)); }
int size() const { return v1.size(); }
bool is_locked() const { return v1.is_locked() || v2.is_locked(); };
};
template <int N,typename T,typename T1,class E1,typename T2,class Op>
class Vector<T,N,ScalarOp<Vector<T1,N,E1>,T2,Op> >
: public Common<Vector<T,N,ScalarOp<Vector<T1,N,E1>,T2,Op> > > {
typedef Vector<T1,N,E1> V;
typedef ScalarOp<V,T2,Op> E;
typedef Vector<T,N,E> SAME;
const typename V::Ref_t v;
T2 s;
public:
typedef SAME Ref_t;
Vector<T,N,E>(const V &v_, T2 s_) : v(v_), s(s_) {}
T operator() (int n) const { return BinaryOp<Op>::apply(v(n),s); }
int size() const { return v.size(); }
bool is_locked() const { return v.is_locked(); };
};
template <int N,typename T>
class Vector<T,N,Buffer>
: public Common<Vector<T,N,Buffer> > {
typedef Buffer E;
typedef Vector<T,N,E> SAME;
Vector<T,N,Packed> buf;
public:
typedef SAME Ref_t;
template <class E1>
Vector<T,N,E>(const Vector<T,N,E1> &v_) : buf(v_) {};
T operator() (int n) const { return buf(n); };
int size() const { return buf.size(); };
bool is_locked() const { return false; };
};
template <typename T>
class Vector<T,0,Buffer>
: public Common<Vector<T,0,Buffer> > {
typedef Buffer E;
typedef Vector<T,0,E> SAME;
Vector<T,0,Smart> buf;
public:
typedef SAME Ref_t;
template <class E1>
Vector<T,0,E>(const Vector<T,0,E1> &v_) : buf(v_) {};
T operator() (int n) const { return buf(n); };
int size() const { return buf.size(); };
bool is_locked() const { return false; };
};
template <int N,typename T,class E1>
class Vector<T,N,NoBuffer<Vector<T,N,E1> > >
: public Common<Vector<T,N,NoBuffer<Vector<T,N,E1> > > > {
typedef Vector<T,N,E1> V;
typedef NoBuffer<V> E;
typedef Vector<T,N,E> SAME;
const typename V::Ref_t v;
public:
typedef SAME Ref_t;
Vector<T,N,E>(const V &v_) : v(v_) {}
T operator() (int n) const { return v(n); }
int size() const { return v.size(); };
bool is_locked() const { return v.is_locked(); };
};
template <int R,int C,typename T,typename T1,class E1,typename T2,class E2>
class Vector<T,R,Multiplied<Matrix<T1,R,C,E1>,Vector<T2,C,E2> > >
: public Common<Vector<T,R,Multiplied<Matrix<T1,R,C,E1>,Vector<T2,C,E2> > > > {
typedef Matrix<T1,R,C,E1> M;
typedef Vector<T2,C,E2> V;
typedef Multiplied<M,V> E;
typedef Vector<T,R,E> SAME;
const typename M::Ref_t m;
const typename V::Ref_t v;
public:
typedef SAME Ref_t;
Vector<T,R,E>(const M &m_, const V &v_) : m(m_), v(v_) {}
T operator() (int r) const {
T res = 0;
for(int c=m.cols();c-->0;)
res += m(r,c)*v(c);
return res;
}
int size() const { return m.rows(); }
bool is_locked() const { return m.is_locked() || v.is_locked(); };
};
template <int R,int C,typename T,typename T1,class E1,typename T2,class E2>
class Vector<T,C,Multiplied<Vector<T1,R,E1>, Matrix<T2,R,C,E2> > >
: public Common<Vector<T,C,Multiplied<Vector<T1,R,E2>, Matrix<T2,R,C,E2> > > > {
typedef Vector<T1,R,E1> V;
typedef Matrix<T2,R,C,E2> M;
typedef Multiplied<V,M> E;
typedef Vector<T,N,E> SAME;
const typename V::Ref_t v;
const typename M::Ref_t m;
public:
typedef SAME Ref_t;
Vector<T,C,E>(const V &v_, const M &m_) : v(v_), m(m_) {}
T operator() (int c) const {
T res = 0;
for(int r=m.rows();r-->0;)
res += v(r)*m(r,c);
return res;
}
int size() const { return m.cols(); }
bool is_locked() const { return v.is_locked() || m.is_locked(); };
};
};
# 29 "buggy.cpp" 2
using etLAP::Vector;
using etLAP::Packed;
template <int NDIM,typename T,typename REAL=double>
class VectorField: public Field<NDIM,Vector<T,NDIM,Packed>,REAL> {
public:
VectorField(const Lattice<NDIM,REAL> &lattice_): Field<NDIM,Vector<T,NDIM,Packed>,REAL>(lattice_) {};
};
using namespace etLAP;
template <int NDIM,int NCOL,typename REAL=double>
class GaugeFieldNonCompact: public VectorField<NDIM,Vector<REAL,NCOL*NCOL-((NCOL==1)?0:1)>,REAL> {
typedef Vector<REAL,NCOL*NCOL-MIN_A> VECTOR;
public:
GaugeFieldNonCompact(Lattice<NDIM,REAL> &lattice_): VectorField<NDIM,VECTOR,REAL>(lattice_) {
};
};
const unsigned int NCOL = 2;
const unsigned int NDIM = 4;
int main(int argc,char *argv[]) {
GaugeFieldNonCompact<NDIM,NCOL> gaugefield(lattice);
};