Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.robertl/eb39.C

raw
1 // { dg-do assemble }
2 // { dg-skip-if "requires hosted libstdc++ for cctype" { ! hostedlib } }
3 #include <cctype>
4 #include <iostream>
5 #include <sstream>
6 #include <cstring>
7
8 using namespace std;
9
10 extern bool foo2 (ostream &out, istream &in);
11
12 bool
13 foo1 (ostream &out, const char *in)
14 {
15 string tmp(in, std::strlen(in));
16 stringbuf sb (tmp);
17 istream fmt (&sb);
18 return foo2 (out, fmt);
19 }