+2003-09-26 Brad Spencer <spencer@infointeractive.com>
+
+ * testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc:
+ Explicitly qualify exceptions.
+ * testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc: Same.
+ * testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc: Same.
+ * testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc: Same.
+ * testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc: Same.
+
2003-09-25 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/12352
int main()
{
- using namespace std;
bool test __attribute__((unused)) = true;
- locale loc = locale(locale::classic(), new Cvt);
- wfilebuf* fb = new wfilebuf;
+ std::locale loc = std::locale(std::locale::classic(), new Cvt);
+ std::wfilebuf* fb = new std::wfilebuf;
fb->pubimbue(loc);
- fb->open("tmp_10132", ios_base::out);
+ fb->open("tmp_10132", std::ios_base::out);
fb->sputc(L'a');
try
{
delete fb;
}
- catch(exception& obj)
+ catch(std::exception& obj)
{
VERIFY( false );
}
// Sentry uses locale info, so have to try one formatted input/output.
void test03()
{
- using namespace std;
bool test __attribute__((unused)) = true;
// input streams
- basic_ifstream<unsigned char> ifs_uc;
+ std::basic_ifstream<unsigned char> ifs_uc;
unsigned char arr[6] = { 'a', 'b', 'c', 'd', 'e' };
-
try
{
int i;
ifs_uc >> i;
}
- catch (bad_cast& obj)
+ catch (std::bad_cast& obj)
{ }
- catch (exception& obj)
+ catch (std::exception& obj)
{ test = false; }
try
{
ifs_uc >> arr;
}
- catch (bad_cast& obj)
+ catch (std::bad_cast& obj)
{ }
- catch (exception& obj)
+ catch (std::exception& obj)
{ test = false; }
try
{
- ifs_uc >> ws;
+ ifs_uc >> std::ws;
}
- catch (bad_cast& obj)
+ catch (std::bad_cast& obj)
{ }
- catch (exception& obj)
+ catch (std::exception& obj)
{ test = false; }
try
{
- basic_string<unsigned char> s_uc(arr);
+ std::basic_string<unsigned char> s_uc(arr);
ifs_uc >> s_uc;
}
- catch (bad_cast& obj)
+ catch (std::bad_cast& obj)
{ }
- catch (exception& obj)
+ catch (std::exception& obj)
{ test = false; }
VERIFY( test );
// Sentry uses locale info, so have to try one formatted input/output.
void test03()
{
- using namespace std;
bool test __attribute__((unused)) = true;
// input streams
- basic_istringstream<unsigned char> iss_uc;
+ std::basic_istringstream<unsigned char> iss_uc;
unsigned char arr[6] = { 'a', 'b', 'c', 'd', 'e' };
try
int i;
iss_uc >> i;
}
- catch (bad_cast& obj)
+ catch (std::bad_cast& obj)
{ }
- catch (exception& obj)
+ catch (std::exception& obj)
{ test = false; }
try
{
iss_uc >> arr;
}
- catch (bad_cast& obj)
+ catch (std::bad_cast& obj)
{ }
- catch (exception& obj)
+ catch (std::exception& obj)
{ test = false; }
try
{
- iss_uc >> ws;
+ iss_uc >> std::ws;
}
- catch (bad_cast& obj)
+ catch (std::bad_cast& obj)
{ }
- catch (exception& obj)
+ catch (std::exception& obj)
{ test = false; }
try
{
- basic_string<unsigned char> s_uc(arr);
+ std::basic_string<unsigned char> s_uc(arr);
iss_uc >> s_uc;
}
- catch (bad_cast& obj)
+ catch (std::bad_cast& obj)
{ }
- catch (exception& obj)
+ catch (std::exception& obj)
{ test = false; }
VERIFY( test );
// Sentry uses locale info, so have to try one formatted input/output.
void test03()
{
- using namespace std;
bool test __attribute__((unused)) = true;
// output streams
- basic_ofstream<unsigned char> ofs_uc;
-
+ std::basic_ofstream<unsigned char> ofs_uc;
try
{
bool b = true;
ofs_uc << b;
}
- catch (bad_cast& obj)
+ catch (std::bad_cast& obj)
{ }
- catch (exception& obj)
- { test = false; }
-
+ catch (std::exception& obj)
+ { test = false; }
VERIFY( test );
}
// Sentry uses locale info, so have to try one formatted input/output.
void test03()
{
- using namespace std;
bool test __attribute__((unused)) = true;
// output streams
- basic_ostringstream<unsigned char> oss_uc;
-
+ std::basic_ostringstream<unsigned char> oss_uc;
try
{
bool b = true;
oss_uc << b;
}
- catch (bad_cast& obj)
+ catch (std::bad_cast& obj)
{ }
- catch (exception& obj)
- { test = false; }
-
+ catch (std::exception& obj)
+ { test = false; }
VERIFY( test );
}