class ios {
public:
	class failure public: xmsg {
	public:
		failure(const char* where_val = 0, const char* why_val = 0);
		virtual ~failure();
	protected:
//		virtual void do_raise();	inherited
	};
	typedef T1 fmtflags;
	static const fmtflags dec;
	static const fmtflags fixed;
	static const fmtflags hex;
	static const fmtflags internal;
	static const fmtflags left;
	static const fmtflags oct;
	static const fmtflags right;
	static const fmtflags scientific;
	static const fmtflags showbase;
	static const fmtflags showpoint;
	static const fmtflags showpos;
	static const fmtflags skipws;
	static const fmtflags unitbuf;
	static const fmtflags uppercase;
	static const fmtflags adjustfield;
	static const fmtflags basefield;
	static const fmtflags floatfield;
	typedef T2 iostate;
	static const iostate badbit;
	static const iostate eofbit;
	static const iostate failbit;
	static const iostate goodbit;
	typedef T3 openmode;
	static const openmode app;
	static const openmode ate;
	static const openmode binary;
	static const openmode in;
	static const openmode out;
	static const openmode trunc;
	typedef T4 seekdir;
	static const seekdir beg;
	static const seekdir cur;
	static const seekdir end;
//	typedef T5 io_state;	optional
//	typedef T6 open_mode;	optional
//	typedef T7 seek_dir;	optional
	class Init {
	public:
		Init();
		~Init();
	private:
//		static int init_cnt;	exposition only
	};
	ios(streambuf* sb_arg);
	virtual ~ios();
	operator void*() const
	int operator!() const
	ios& copyfmt(const ios& rhs);
	ostream* tie() const;
	ostream* tie(ostream* tiestr_arg);
	streambuf* rdbuf() const;
	streambuf* rdbuf(streambuf* sb_arg);
	iostate rdstate() const;
	void clear(iostate state_arg = 0);
//	void clear(io_state state_arg = 0);	optional
	void setstate(iostate state_arg);
//	void setstate(io_state state_arg);	optional
	int good() const;
	int eof() const;
	int fail() const;
	int bad() const;
	iostate exceptions() const;
	void exceptions(iostate except_arg);
//	void exceptions(io_state except_arg);	optional
	fmtflags flags() const;
	fmtflags flags(fmtflags fmtfl_arg);
	fmtflags setf(fmtflags fmtfl_arg);
	fmtflags setf(fmtflags fmtfl_arg, fmtflags mask);
	void unsetf(fmtflags mask);
	int fill() const;
	int fill(int ch);
	int precision() const;
	int precision(int prec_arg);
	int width() const;
	int width(int wide_arg);
	static int xalloc();
	long& iword(int index_arg);
	void*& pword(int index_arg);
protected:
	ios();
	init(streambuf* sb_arg);
private:
//	streambuf* sb;	exposition only
//	ostream* tiestr;	exposition only
//	iostate state;	exposition only
//	iostate except;	exposition only
//	fmtflags fmtfl;	exposition only
//	int prec;	exposition only
//	int wide;	exposition only
//	char fillch;	exposition only
//	static int index;	exposition only
//	int* iarray;	exposition only
//	void** parray;	exposition only
};
