{ }
catch(std::exception&)
{ ++myexit; }
-
+
// When doubling is too big, but smaller is sufficient, the resize
// should do smaller and be happy. It certainly shouldn't throw
// other exceptions or crash.
try
{
std::vector<bool> x;
- x.resize(x.max_size() / 2 + 1, false);
+ x.resize(x.max_size() / 2 + 1, false);
for(int i = 0; i < _S_word_bit; ++i)
x.push_back(false);
check_cap_ge_size(x);
{ }
catch(std::exception&)
{ ++myexit; }
-
+
try
{
std::vector<bool> x;
- x.resize(x.max_size() / 2 + 1, false);
+ x.resize(x.max_size() / 2 + 1, false);
x.insert(x.end(), _S_word_bit, false);
check_cap_ge_size(x);
}
{ }
catch(std::exception&)
{ ++myexit; }
-
+
try
{
std::vector<bool> x;
- x.resize(x.max_size() / 2 + 1, false);
+ x.resize(x.max_size() / 2 + 1, false);
std::vector<bool> y(_S_word_bit, false);
x.insert(x.end(), y.begin(), y.end());
check_cap_ge_size(x);
try
{
std::vector<bool> x;
- x.resize(x.max_size() - _S_word_bit, false);
+ x.resize(x.max_size() - _S_word_bit, false);
for(int i = 0; i < _S_word_bit; ++i)
x.push_back(false);
check_cap_ge_size(x);
{ }
catch(std::exception&)
{ ++myexit; }
-
+
try
{
std::vector<bool> x;
- x.resize(x.max_size() - _S_word_bit, false);
+ x.resize(x.max_size() - _S_word_bit, false);
x.insert(x.end(), _S_word_bit, false);
check_cap_ge_size(x);
}
try
{
std::vector<bool> x;
- x.resize(x.max_size() - _S_word_bit, false);
+ x.resize(x.max_size() - _S_word_bit, false);
std::vector<bool> y(_S_word_bit, false);
x.insert(x.end(), y.begin(), y.end());
check_cap_ge_size(x);
{ }
catch(std::exception&)
{ ++myexit; }
-
+
// Attempts to put in more than max_size() items should result in a
// length error.
try
{
std::vector<bool> x;
- x.resize(x.max_size() - _S_word_bit, false);
+ x.resize(x.max_size() - _S_word_bit, false);
for(int i = 0; i < _S_word_bit + 1; ++i)
x.push_back(false);
++myexit;
}
- catch(std::bad_alloc)
+ catch(std::bad_alloc&)
{ }
- catch(std::length_error)
+ catch(std::length_error&)
{ }
- catch(std::exception)
+ catch(std::exception&)
{ ++myexit; }
-
+
try
{
std::vector<bool> x;
- x.resize(x.max_size() - _S_word_bit, false);
+ x.resize(x.max_size() - _S_word_bit, false);
x.insert(x.end(), _S_word_bit + 1, false);
++myexit;
}
- catch(std::bad_alloc)
+ catch(std::bad_alloc&)
{ }
- catch(std::length_error)
+ catch(std::length_error&)
{ }
- catch(std::exception)
+ catch(std::exception&)
{ ++myexit; }
try
{
std::vector<bool> x;
- x.resize(x.max_size() - _S_word_bit, false);
+ x.resize(x.max_size() - _S_word_bit, false);
std::vector<bool> y(_S_word_bit + 1, false);
x.insert(x.end(), y.begin(), y.end());
++myexit;
}
- catch(std::bad_alloc)
+ catch(std::bad_alloc&)
{ }
- catch(std::length_error)
+ catch(std::length_error&)
{ }
- catch(std::exception)
+ catch(std::exception&)
{ ++myexit; }
VERIFY( !myexit );