namespace std {
struct A { A(); };
A::A() { }
};
namespace std {
template<typename> struct allocator { };
}
void f(std::allocator<char>, std::allocator<int>) { }
namespace std {
template<typename, typename, typename> struct basic_string { };
}
void f(std::basic_string<char, char, int>) { }
namespace std {
template<typename> struct char_traits { };
typedef std::basic_string<char, std::char_traits<char>, std::allocator<char> > string;
}
void f(std::string) { }
namespace std {
template<typename, typename> struct basic_ios {
basic_ios(int);
virtual ~basic_ios();
};
template<typename charT, typename traits = char_traits<charT> >
struct basic_istream : virtual public basic_ios<charT, traits> {
basic_istream(int x) : basic_ios<charT, traits>(x), stored(x) { }
int stored;
};
template<typename charT, typename traits = char_traits<charT> >
struct basic_ostream : virtual public basic_ios<charT, traits> {
basic_ostream(int x) : basic_ios<charT, traits>(x), stored(x) { }
float stored;
};
template<typename charT, typename traits = char_traits<charT> >
struct basic_iostream : public basic_istream<charT, traits>,
public basic_ostream<charT, traits> {
basic_iostream(int x) : basic_istream<charT, traits>(x),
basic_ostream<charT, traits>(x),
basic_ios<charT, traits>(x) { }
};
}
void f(std::basic_istream<char, std::char_traits<char> >) { }
void f(std::basic_ostream<char, std::char_traits<char> >) { }
void f(std::basic_iostream<char, std::char_traits<char> >) { }
extern "C++" {
namespace std
{
typedef void (*terminate_handler) ();
terminate_handler set_terminate(terminate_handler) { return 0; }
}
}
template<typename, typename, typename> struct basic_string { };
typedef basic_string<char, std::char_traits<char>, std::allocator<char> > not_string;
void f(not_string) { }
void create_streams() {
std::basic_iostream<char> bio(17);
}
namespace N {
namespace std {
struct A { void f(); };
void A::f() { }
}
}