mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-12 21:33:54 +08:00
re PR libstdc++/25191 (exception_defines.h #defines try/catch)
2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/25191 * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, deal consistently with __try and __catch too. * src/localename.cc: Replace try -> __try, catch -> __catch. * src/ios.cc: Likewise. * src/locale.cc: Likewise. * src/istream.cc: Likewise. * src/thread.cc: Likewise. * src/compatibility.cc: Likewise. * src/bitmap_allocator.cc: Likewise. * src/ios_init.cc: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/tr1_impl/hashtable: Likewise. * include/std/bitset: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy/ hash_standard_resize_policy_imp.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ split_join_branch_bag.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/bin_search_tree_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ resize_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ erase_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/binary_heap_/ split_join_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ constructors_destructor_fn_imps.hpp: Likewise. * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/ constructor_destructor_fn_imps.hpp: Likewise. * include/ext/slist: Likewise. * include/ext/memory: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/sso_string_base.h: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/locale_facets.tcc: Likewise. * include/bits/locale_classes.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/vector.tcc: Likewise. * include/bits/stl_tempbuf.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/basic_string.tcc: Likewise. * include/bits/ostream_insert.h: Likewise. * include/bits/locale_facets_nonio.tcc: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/fstream.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/backward/hashtable.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/eh_call.cc: Likewise. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/time_members.h: Likewise. * config/locale/generic/time_members.h: Likewise. From-SVN: r143913
This commit is contained in:
parent
d0db89893f
commit
bc2631e0c6
@ -1,3 +1,85 @@
|
||||
2009-02-03 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR libstdc++/25191
|
||||
* libsupc++/exception_defines.h: Depending on __EXCEPTIONS,
|
||||
deal consistently with __try and __catch too.
|
||||
* src/localename.cc: Replace try -> __try, catch -> __catch.
|
||||
* src/ios.cc: Likewise.
|
||||
* src/locale.cc: Likewise.
|
||||
* src/istream.cc: Likewise.
|
||||
* src/thread.cc: Likewise.
|
||||
* src/compatibility.cc: Likewise.
|
||||
* src/bitmap_allocator.cc: Likewise.
|
||||
* src/ios_init.cc: Likewise.
|
||||
* include/debug/deque: Likewise.
|
||||
* include/debug/list: Likewise.
|
||||
* include/tr1_impl/hashtable: Likewise.
|
||||
* include/std/bitset: Likewise.
|
||||
* include/ext/pb_ds/detail/resize_policy/
|
||||
hash_load_check_resize_trigger_imp.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/resize_policy/
|
||||
hash_standard_resize_policy_imp.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/cc_hash_table_map_/
|
||||
resize_fn_imps.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/cc_hash_table_map_/
|
||||
constructor_destructor_fn_imps.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/pat_trie_/
|
||||
split_join_branch_bag.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/pat_trie_/
|
||||
constructors_destructor_fn_imps.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/bin_search_tree_/
|
||||
constructors_destructor_fn_imps.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/gp_hash_table_map_/
|
||||
resize_fn_imps.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/gp_hash_table_map_/
|
||||
constructor_destructor_fn_imps.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/binary_heap_/
|
||||
constructors_destructor_fn_imps.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/binary_heap_/
|
||||
erase_fn_imps.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/binary_heap_/
|
||||
split_join_fn_imps.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
|
||||
constructors_destructor_fn_imps.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/debug_map_base.hpp: Likewise.
|
||||
* include/ext/pb_ds/detail/list_update_map_/
|
||||
constructor_destructor_fn_imps.hpp: Likewise.
|
||||
* include/ext/slist: Likewise.
|
||||
* include/ext/memory: Likewise.
|
||||
* include/ext/rc_string_base.h: Likewise.
|
||||
* include/ext/ropeimpl.h: Likewise.
|
||||
* include/ext/vstring.tcc: Likewise.
|
||||
* include/ext/rope: Likewise.
|
||||
* include/ext/sso_string_base.h: Likewise.
|
||||
* include/bits/shared_ptr.h: Likewise.
|
||||
* include/bits/stl_list.h: Likewise.
|
||||
* include/bits/locale_classes.tcc: Likewise.
|
||||
* include/bits/locale_facets.tcc: Likewise.
|
||||
* include/bits/locale_classes.h: Likewise.
|
||||
* include/bits/forward_list.h: Likewise.
|
||||
* include/bits/stl_vector.h: Likewise.
|
||||
* include/bits/stl_deque.h: Likewise.
|
||||
* include/bits/istream.tcc: Likewise.
|
||||
* include/bits/stl_uninitialized.h: Likewise.
|
||||
* include/bits/ostream.tcc: Likewise.
|
||||
* include/bits/vector.tcc: Likewise.
|
||||
* include/bits/stl_tempbuf.h: Likewise.
|
||||
* include/bits/deque.tcc: Likewise.
|
||||
* include/bits/basic_string.tcc: Likewise.
|
||||
* include/bits/ostream_insert.h: Likewise.
|
||||
* include/bits/locale_facets_nonio.tcc: Likewise.
|
||||
* include/bits/stl_tree.h: Likewise.
|
||||
* include/bits/fstream.tcc: Likewise.
|
||||
* include/tr1/shared_ptr.h: Likewise.
|
||||
* include/tr1/hypergeometric.tcc: Likewise.
|
||||
* include/backward/hashtable.h: Likewise.
|
||||
* libsupc++/exception_ptr.h: Likewise.
|
||||
* libsupc++/eh_personality.cc: Likewise.
|
||||
* libsupc++/eh_call.cc: Likewise.
|
||||
* config/locale/gnu/monetary_members.cc: Likewise.
|
||||
* config/locale/gnu/time_members.h: Likewise.
|
||||
* config/locale/generic/time_members.h: Likewise.
|
||||
|
||||
2009-02-03 Johannes Singler <singler@ira.uka.de>
|
||||
|
||||
* include/parallel/algorithmfwd.h:
|
||||
|
@ -1,6 +1,6 @@
|
||||
// std::time_get, std::time_put implementation, generic version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -73,9 +73,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
_M_name_timepunct = _S_get_c_name();
|
||||
|
||||
try
|
||||
__try
|
||||
{ _M_initialize_timepunct(__cloc); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
if (_M_name_timepunct != _S_get_c_name())
|
||||
delete [] _M_name_timepunct;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// std::moneypunct implementation details, GNU version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -479,7 +479,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
wchar_t* __wcs_ps = 0;
|
||||
wchar_t* __wcs_ns = 0;
|
||||
const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
|
||||
try
|
||||
__try
|
||||
{
|
||||
mbstate_t __state;
|
||||
size_t __len = strlen(__cpossign);
|
||||
@ -524,7 +524,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_M_data->_M_curr_symbol = L"";
|
||||
_M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
delete _M_data;
|
||||
_M_data = 0;
|
||||
@ -647,7 +647,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
wchar_t* __wcs_ps = 0;
|
||||
wchar_t* __wcs_ns = 0;
|
||||
const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
|
||||
try
|
||||
__try
|
||||
{
|
||||
mbstate_t __state;
|
||||
size_t __len;
|
||||
@ -693,7 +693,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_M_data->_M_curr_symbol = L"";
|
||||
_M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
delete _M_data;
|
||||
_M_data = 0;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -70,9 +70,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
_M_name_timepunct = _S_get_c_name();
|
||||
|
||||
try
|
||||
__try
|
||||
{ _M_initialize_timepunct(__cloc); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
if (_M_name_timepunct != _S_get_c_name())
|
||||
delete [] _M_name_timepunct;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Hashtable implementation used by containers -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -603,12 +603,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
{
|
||||
_Node* __n = _M_get_node();
|
||||
__n->_M_next = 0;
|
||||
try
|
||||
__try
|
||||
{
|
||||
this->get_allocator().construct(&__n->_M_val, __obj);
|
||||
return __n;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_put_node(__n);
|
||||
__throw_exception_again;
|
||||
@ -995,7 +995,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
if (__n > __old_n)
|
||||
{
|
||||
_Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator());
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (size_type __bucket = 0; __bucket < __old_n; ++__bucket)
|
||||
{
|
||||
@ -1012,7 +1012,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
}
|
||||
_M_buckets.swap(__tmp);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
for (size_type __bucket = 0; __bucket < __tmp.size();
|
||||
++__bucket)
|
||||
@ -1098,7 +1098,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
_M_buckets.clear();
|
||||
_M_buckets.reserve(__ht._M_buckets.size());
|
||||
_M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
|
||||
const _Node* __cur = __ht._M_buckets[__i];
|
||||
@ -1118,7 +1118,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
}
|
||||
_M_num_elements = __ht._M_num_elements;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
clear();
|
||||
__throw_exception_again;
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Components for manipulating sequences of characters -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007
|
||||
// 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -97,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
}
|
||||
_Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
|
||||
_M_copy(__r->_M_refdata(), __buf, __len);
|
||||
try
|
||||
__try
|
||||
{
|
||||
while (__beg != __end)
|
||||
{
|
||||
@ -113,7 +113,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
++__beg;
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__r->_M_destroy(__a);
|
||||
__throw_exception_again;
|
||||
@ -142,9 +142,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__end));
|
||||
// Check for out_of_range and length_error exceptions.
|
||||
_Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
|
||||
try
|
||||
__try
|
||||
{ _S_copy_chars(__r->_M_refdata(), __beg, __end); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__r->_M_destroy(__a);
|
||||
__throw_exception_again;
|
||||
@ -992,7 +992,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
typename __istream_type::sentry __cerb(__in, false);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
// Avoid reallocation for common case.
|
||||
__str.erase();
|
||||
@ -1025,12 +1025,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__err |= __ios_base::eofbit;
|
||||
__in.width(0);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__in._M_setstate(__ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// 91. Description of operator>> and getline() for string<>
|
||||
@ -1063,7 +1063,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
typename __istream_type::sentry __cerb(__in, true);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
__str.erase();
|
||||
const __int_type __idelim = _Traits::to_int_type(__delim);
|
||||
@ -1089,12 +1089,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
__err |= __ios_base::failbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__in._M_setstate(__ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// 91. Description of operator>> and getline() for string<>
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Deque implementation (out of line) -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -242,13 +242,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
if (__pos._M_cur == this->_M_impl._M_start._M_cur)
|
||||
{
|
||||
iterator __new_start = _M_reserve_elements_at_front(__n);
|
||||
try
|
||||
__try
|
||||
{
|
||||
std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start,
|
||||
__x, _M_get_Tp_allocator());
|
||||
this->_M_impl._M_start = __new_start;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_destroy_nodes(__new_start._M_node,
|
||||
this->_M_impl._M_start._M_node);
|
||||
@ -258,14 +258,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
|
||||
{
|
||||
iterator __new_finish = _M_reserve_elements_at_back(__n);
|
||||
try
|
||||
__try
|
||||
{
|
||||
std::__uninitialized_fill_a(this->_M_impl._M_finish,
|
||||
__new_finish, __x,
|
||||
_M_get_Tp_allocator());
|
||||
this->_M_impl._M_finish = __new_finish;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
|
||||
__new_finish._M_node + 1);
|
||||
@ -282,7 +282,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
_M_fill_initialize(const value_type& __value)
|
||||
{
|
||||
_Map_pointer __cur;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (__cur = this->_M_impl._M_start._M_node;
|
||||
__cur < this->_M_impl._M_finish._M_node;
|
||||
@ -293,7 +293,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
this->_M_impl._M_finish._M_cur,
|
||||
__value, _M_get_Tp_allocator());
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur),
|
||||
_M_get_Tp_allocator());
|
||||
@ -309,12 +309,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
std::input_iterator_tag)
|
||||
{
|
||||
this->_M_initialize_map(0);
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (; __first != __last; ++__first)
|
||||
push_back(*__first);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
clear();
|
||||
__throw_exception_again;
|
||||
@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
this->_M_initialize_map(__n);
|
||||
|
||||
_Map_pointer __cur_node;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (__cur_node = this->_M_impl._M_start._M_node;
|
||||
__cur_node < this->_M_impl._M_finish._M_node;
|
||||
@ -348,7 +348,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
this->_M_impl._M_finish._M_first,
|
||||
_M_get_Tp_allocator());
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(this->_M_impl._M_start,
|
||||
iterator(*__cur_node, __cur_node),
|
||||
@ -372,7 +372,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
{
|
||||
_M_reserve_map_at_back();
|
||||
*(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
|
||||
try
|
||||
__try
|
||||
{
|
||||
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||
this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
|
||||
@ -384,7 +384,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
+ 1);
|
||||
this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
|
||||
__throw_exception_again;
|
||||
@ -406,7 +406,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
{
|
||||
_M_reserve_map_at_front();
|
||||
*(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
|
||||
try
|
||||
__try
|
||||
{
|
||||
this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node
|
||||
- 1);
|
||||
@ -418,7 +418,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t);
|
||||
#endif
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
++this->_M_impl._M_start;
|
||||
_M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
|
||||
@ -473,13 +473,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
if (__pos._M_cur == this->_M_impl._M_start._M_cur)
|
||||
{
|
||||
iterator __new_start = _M_reserve_elements_at_front(__n);
|
||||
try
|
||||
__try
|
||||
{
|
||||
std::__uninitialized_copy_a(__first, __last, __new_start,
|
||||
_M_get_Tp_allocator());
|
||||
this->_M_impl._M_start = __new_start;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_destroy_nodes(__new_start._M_node,
|
||||
this->_M_impl._M_start._M_node);
|
||||
@ -489,14 +489,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
|
||||
{
|
||||
iterator __new_finish = _M_reserve_elements_at_back(__n);
|
||||
try
|
||||
__try
|
||||
{
|
||||
std::__uninitialized_copy_a(__first, __last,
|
||||
this->_M_impl._M_finish,
|
||||
_M_get_Tp_allocator());
|
||||
this->_M_impl._M_finish = __new_finish;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
|
||||
__new_finish._M_node + 1);
|
||||
@ -562,7 +562,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
iterator __new_start = _M_reserve_elements_at_front(__n);
|
||||
iterator __old_start = this->_M_impl._M_start;
|
||||
__pos = this->_M_impl._M_start + __elems_before;
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (__elems_before >= difference_type(__n))
|
||||
{
|
||||
@ -586,7 +586,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
std::fill(__old_start, __pos, __x_copy);
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_destroy_nodes(__new_start._M_node,
|
||||
this->_M_impl._M_start._M_node);
|
||||
@ -600,7 +600,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
const difference_type __elems_after =
|
||||
difference_type(__length) - __elems_before;
|
||||
__pos = this->_M_impl._M_finish - __elems_after;
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (__elems_after > difference_type(__n))
|
||||
{
|
||||
@ -625,7 +625,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
std::fill(__pos, __old_finish, __x_copy);
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
|
||||
__new_finish._M_node + 1);
|
||||
@ -649,7 +649,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
iterator __new_start = _M_reserve_elements_at_front(__n);
|
||||
iterator __old_start = this->_M_impl._M_start;
|
||||
__pos = this->_M_impl._M_start + __elemsbefore;
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (__elemsbefore >= difference_type(__n))
|
||||
{
|
||||
@ -674,7 +674,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
std::copy(__mid, __last, __old_start);
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_destroy_nodes(__new_start._M_node,
|
||||
this->_M_impl._M_start._M_node);
|
||||
@ -688,7 +688,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
const difference_type __elemsafter =
|
||||
difference_type(__length) - __elemsbefore;
|
||||
__pos = this->_M_impl._M_finish - __elemsafter;
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (__elemsafter > difference_type(__n))
|
||||
{
|
||||
@ -714,7 +714,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
std::copy(__first, __mid, __pos);
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
|
||||
__new_finish._M_node + 1);
|
||||
@ -757,12 +757,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
/ _S_buffer_size());
|
||||
_M_reserve_map_at_front(__new_nodes);
|
||||
size_type __i;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (__i = 1; __i <= __new_nodes; ++__i)
|
||||
*(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node();
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
for (size_type __j = 1; __j < __i; ++__j)
|
||||
_M_deallocate_node(*(this->_M_impl._M_start._M_node - __j));
|
||||
@ -782,12 +782,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
/ _S_buffer_size());
|
||||
_M_reserve_map_at_back(__new_nodes);
|
||||
size_type __i;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (__i = 1; __i <= __new_nodes; ++__i)
|
||||
*(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node();
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
for (size_type __j = 1; __j < __i; ++__j)
|
||||
_M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j));
|
||||
|
@ -366,13 +366,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_M_create_node(_Args&&... __args)
|
||||
{
|
||||
typename _Node::_Pointer __node = this->_M_get_node();
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_get_Node_allocator().construct(__node,
|
||||
std::forward<_Args>(__args)...);
|
||||
__node->_M_next = 0;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
this->_M_put_node(__node);
|
||||
__throw_exception_again;
|
||||
|
@ -1,7 +1,7 @@
|
||||
// File based streams -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
// 2007
|
||||
// 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -154,17 +154,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
}
|
||||
} __cs (this);
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (!_M_terminate_output())
|
||||
__testfail = true;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
_M_file.close();
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ __testfail = true; }
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// istream classes -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007
|
||||
// 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -95,17 +95,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const __num_get_type& __ng = __check_facet(this->_M_num_get);
|
||||
__ng.get(*this, 0, *this, __err, __v);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -162,7 +162,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
sentry __cerb(*this, false);
|
||||
if (__cerb && __sbout)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
bool __ineof;
|
||||
if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof))
|
||||
@ -170,12 +170,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__ineof)
|
||||
__err |= ios_base::eofbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::failbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::failbit); }
|
||||
}
|
||||
else if (!__sbout)
|
||||
@ -197,7 +197,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
sentry __cerb(*this, true);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
__c = this->rdbuf()->sbumpc();
|
||||
// 27.6.1.1 paragraph 3
|
||||
@ -206,12 +206,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
__err |= ios_base::eofbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
}
|
||||
if (!_M_gcount)
|
||||
@ -231,7 +231,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
sentry __cerb(*this, true);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __cb = this->rdbuf()->sbumpc();
|
||||
// 27.6.1.1 paragraph 3
|
||||
@ -243,12 +243,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
__err |= ios_base::eofbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
}
|
||||
if (!_M_gcount)
|
||||
@ -268,7 +268,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
sentry __cerb(*this, true);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __idelim = traits_type::to_int_type(__delim);
|
||||
const int_type __eof = traits_type::eof();
|
||||
@ -286,12 +286,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (traits_type::eq_int_type(__c, __eof))
|
||||
__err |= ios_base::eofbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
}
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
@ -315,7 +315,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
sentry __cerb(*this, true);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __idelim = traits_type::to_int_type(__delim);
|
||||
const int_type __eof = traits_type::eof();
|
||||
@ -334,12 +334,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (traits_type::eq_int_type(__c, __eof))
|
||||
__err |= ios_base::eofbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
}
|
||||
if (!_M_gcount)
|
||||
@ -359,7 +359,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
sentry __cerb(*this, true);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __idelim = traits_type::to_int_type(__delim);
|
||||
const int_type __eof = traits_type::eof();
|
||||
@ -387,12 +387,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__err |= ios_base::failbit;
|
||||
}
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
}
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
@ -419,7 +419,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __eof = traits_type::eof();
|
||||
__streambuf_type* __sb = this->rdbuf();
|
||||
@ -429,12 +429,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
_M_gcount = 1;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -452,7 +452,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb && __n > 0)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __eof = traits_type::eof();
|
||||
__streambuf_type* __sb = this->rdbuf();
|
||||
@ -491,12 +491,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (traits_type::eq_int_type(__c, __eof))
|
||||
__err |= ios_base::eofbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -514,7 +514,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb && __n > 0)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __eof = traits_type::eof();
|
||||
__streambuf_type* __sb = this->rdbuf();
|
||||
@ -556,12 +556,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__sb->sbumpc();
|
||||
}
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -580,18 +580,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
__c = this->rdbuf()->sgetc();
|
||||
if (traits_type::eq_int_type(__c, traits_type::eof()))
|
||||
__err |= ios_base::eofbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -609,18 +609,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_gcount = this->rdbuf()->sgetn(__s, __n);
|
||||
if (_M_gcount != __n)
|
||||
__err |= (ios_base::eofbit | ios_base::failbit);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -638,7 +638,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
// Cannot compare int_type with streamsize generically.
|
||||
const streamsize __num = this->rdbuf()->in_avail();
|
||||
@ -647,12 +647,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else if (__num == -1)
|
||||
__err |= ios_base::eofbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -672,7 +672,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __eof = traits_type::eof();
|
||||
__streambuf_type* __sb = this->rdbuf();
|
||||
@ -680,12 +680,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
|| traits_type::eq_int_type(__sb->sputbackc(__c), __eof))
|
||||
__err |= ios_base::badbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -705,7 +705,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __eof = traits_type::eof();
|
||||
__streambuf_type* __sb = this->rdbuf();
|
||||
@ -713,12 +713,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
|| traits_type::eq_int_type(__sb->sungetc(), __eof))
|
||||
__err |= ios_base::badbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -738,7 +738,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
__streambuf_type* __sb = this->rdbuf();
|
||||
if (__sb)
|
||||
@ -749,12 +749,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__ret = 0;
|
||||
}
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -770,18 +770,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// DR60. Do not change _M_gcount.
|
||||
pos_type __ret = pos_type(-1);
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (!this->fail())
|
||||
__ret = this->rdbuf()->pubseekoff(0, ios_base::cur,
|
||||
ios_base::in);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
return __ret;
|
||||
}
|
||||
@ -794,7 +794,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// DR60. Do not change _M_gcount.
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (!this->fail())
|
||||
{
|
||||
@ -807,12 +807,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__err |= ios_base::failbit;
|
||||
}
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -827,7 +827,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// DR60. Do not change _M_gcount.
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (!this->fail())
|
||||
{
|
||||
@ -840,12 +840,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__err |= ios_base::failbit;
|
||||
}
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -864,7 +864,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const __int_type __cb = __in.rdbuf()->sbumpc();
|
||||
if (!_Traits::eq_int_type(__cb, _Traits::eof()))
|
||||
@ -872,12 +872,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
__err |= (ios_base::eofbit | ios_base::failbit);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__in._M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ __in._M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
__in.setstate(__err);
|
||||
@ -900,7 +900,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
typename __istream_type::sentry __cerb(__in, false);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
// Figure out how many characters to extract.
|
||||
streamsize __num = __in.width();
|
||||
@ -930,12 +930,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
*__s = char_type();
|
||||
__in.width(0);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__in._M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ __in._M_setstate(ios_base::badbit); }
|
||||
}
|
||||
if (!__extracted)
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007, 2008
|
||||
// 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -404,9 +404,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
{
|
||||
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{ delete this; }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@ -509,9 +509,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
{
|
||||
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{ delete this; }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -49,9 +49,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
{
|
||||
_M_impl = new _Impl(*__other._M_impl, 1);
|
||||
|
||||
try
|
||||
__try
|
||||
{ _M_impl->_M_install_facet(&_Facet::id, __f); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_impl->_M_remove_reference();
|
||||
__throw_exception_again;
|
||||
@ -66,11 +66,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
combine(const locale& __other) const
|
||||
{
|
||||
_Impl* __tmp = new _Impl(*_M_impl, 1);
|
||||
try
|
||||
__try
|
||||
{
|
||||
__tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__tmp->_M_remove_reference();
|
||||
__throw_exception_again;
|
||||
@ -189,7 +189,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
|
||||
_CharT* __c = new _CharT[__len];
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
// strxfrm stops when it sees a nul character so we break
|
||||
// the string into zero-terminated substrings and pass those
|
||||
@ -217,7 +217,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__ret.push_back(_CharT());
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
delete [] __c;
|
||||
__throw_exception_again;
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007, 2008
|
||||
// 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -62,12 +62,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (!__caches[__i])
|
||||
{
|
||||
__numpunct_cache<_CharT>* __tmp = NULL;
|
||||
try
|
||||
__try
|
||||
{
|
||||
__tmp = new __numpunct_cache<_CharT>;
|
||||
__tmp->_M_cache(__loc);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
delete __tmp;
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Locale support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -50,12 +50,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (!__caches[__i])
|
||||
{
|
||||
__moneypunct_cache<_CharT, _Intl>* __tmp = NULL;
|
||||
try
|
||||
__try
|
||||
{
|
||||
__tmp = new __moneypunct_cache<_CharT, _Intl>;
|
||||
__tmp->_M_cache(__loc);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
delete __tmp;
|
||||
__throw_exception_again;
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ostream classes -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007
|
||||
// 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -72,18 +72,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const __num_put_type& __np = __check_facet(this->_M_num_put);
|
||||
if (__np.put(*this, *this, this->fill(), __v).failed())
|
||||
__err |= ios_base::badbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -128,17 +128,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
sentry __cerb(*this);
|
||||
if (__cerb && __sbin)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (!__copy_streambufs(__sbin, this->rdbuf()))
|
||||
__err |= ios_base::failbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::failbit); }
|
||||
}
|
||||
else if (!__sbin)
|
||||
@ -163,18 +163,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __put = this->rdbuf()->sputc(__c);
|
||||
if (traits_type::eq_int_type(__put, traits_type::eof()))
|
||||
__err |= ios_base::badbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -197,14 +197,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
sentry __cerb(*this);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{ _M_write(__s, __n); }
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
}
|
||||
return *this;
|
||||
@ -219,17 +219,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
// DR 60. What is a formatted input function?
|
||||
// basic_ostream::flush() is *not* an unformatted output function.
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (this->rdbuf() && this->rdbuf()->pubsync() == -1)
|
||||
__err |= ios_base::badbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -242,17 +242,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
tellp()
|
||||
{
|
||||
pos_type __ret = pos_type(-1);
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (!this->fail())
|
||||
__ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
return __ret;
|
||||
}
|
||||
@ -263,7 +263,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
seekp(pos_type __pos)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (!this->fail())
|
||||
{
|
||||
@ -277,12 +277,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__err |= ios_base::failbit;
|
||||
}
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -295,7 +295,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
seekp(off_type __off, ios_base::seekdir __dir)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (!this->fail())
|
||||
{
|
||||
@ -309,12 +309,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__err |= ios_base::failbit;
|
||||
}
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// 167. Improper use of traits_type::length()
|
||||
const size_t __clen = char_traits<char>::length(__s);
|
||||
try
|
||||
__try
|
||||
{
|
||||
struct __ptr_guard
|
||||
{
|
||||
@ -347,12 +347,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__ws[__i] = __out.widen(__s[__i]);
|
||||
__ostream_insert(__out, __ws, __clen);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__out._M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ __out._M_setstate(ios_base::badbit); }
|
||||
}
|
||||
return __out;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Helpers for ostream inserters -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -85,7 +85,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
typename __ostream_type::sentry __cerb(__out);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
const streamsize __w = __out.width();
|
||||
if (__w > __n)
|
||||
@ -104,12 +104,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__ostream_write(__out, __s, __n);
|
||||
__out.width(0);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__out._M_setstate(__ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ __out._M_setstate(__ios_base::badbit); }
|
||||
}
|
||||
return __out;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// <bits/shared_ptr.h> -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -222,11 +222,11 @@ namespace std
|
||||
template<typename _Ptr>
|
||||
__shared_count(_Ptr __p) : _M_pi(0)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
delete __p;
|
||||
__throw_exception_again;
|
||||
@ -241,12 +241,12 @@ namespace std
|
||||
typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
|
||||
typedef std::allocator<_Sp_cd_type> _Alloc2;
|
||||
_Alloc2 __a2;
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_pi = __a2.allocate(1);
|
||||
::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__d(__p); // Call _Deleter on __p.
|
||||
if (_M_pi)
|
||||
@ -261,12 +261,12 @@ namespace std
|
||||
typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
|
||||
typedef typename _Alloc::template rebind<_Sp_cd_type>::other _Alloc2;
|
||||
_Alloc2 __a2(__a);
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_pi = __a2.allocate(1);
|
||||
::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d, __a);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__d(__p); // Call _Deleter on __p.
|
||||
if (_M_pi)
|
||||
@ -282,13 +282,13 @@ namespace std
|
||||
typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
|
||||
typedef typename _Alloc::template rebind<_Sp_cp_type>::other _Alloc2;
|
||||
_Alloc2 __a2(__a);
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_pi = __a2.allocate(1);
|
||||
::new(static_cast<void*>(_M_pi)) _Sp_cp_type(__a,
|
||||
std::forward<_Args>(__args)...);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
if (_M_pi)
|
||||
__a2.deallocate(static_cast<_Sp_cp_type*>(_M_pi), 1);
|
||||
@ -1074,11 +1074,11 @@ namespace std
|
||||
if (expired())
|
||||
return __shared_ptr<element_type, _Lp>();
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
return __shared_ptr<element_type, _Lp>(*this);
|
||||
}
|
||||
catch(const bad_weak_ptr&)
|
||||
__catch(const bad_weak_ptr&)
|
||||
{
|
||||
// Q: How can we get here?
|
||||
// A: Another thread may have invalidated r after the
|
||||
@ -1447,11 +1447,11 @@ namespace std
|
||||
if (this->expired())
|
||||
return shared_ptr<_Tp>();
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
return shared_ptr<_Tp>(*this);
|
||||
}
|
||||
catch(const bad_weak_ptr&)
|
||||
__catch(const bad_weak_ptr&)
|
||||
{
|
||||
return shared_ptr<_Tp>();
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Deque implementation -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -513,9 +513,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
+ (this->_M_impl._M_map_size - __num_nodes) / 2);
|
||||
_Tp** __nfinish = __nstart + __num_nodes;
|
||||
|
||||
try
|
||||
__try
|
||||
{ _M_create_nodes(__nstart, __nfinish); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
|
||||
this->_M_impl._M_map = 0;
|
||||
@ -537,12 +537,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
_M_create_nodes(_Tp** __nstart, _Tp** __nfinish)
|
||||
{
|
||||
_Tp** __cur;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (__cur = __nstart; __cur < __nfinish; ++__cur)
|
||||
*__cur = this->_M_allocate_node();
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_destroy_nodes(__nstart, __cur);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// List implementation -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -465,11 +465,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
_M_create_node(const value_type& __x)
|
||||
{
|
||||
_Node* __p = this->_M_get_node();
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_get_Tp_allocator().construct(&__p->_M_data, __x);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_put_node(__p);
|
||||
__throw_exception_again;
|
||||
@ -482,12 +482,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
_M_create_node(_Args&&... __args)
|
||||
{
|
||||
_Node* __p = this->_M_get_node();
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_get_Node_allocator().construct(__p,
|
||||
std::forward<_Args>(__args)...);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_put_node(__p);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Temporary buffer implementation -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -187,7 +187,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
: _M_original_len(std::distance(__first, __last)),
|
||||
_M_len(0), _M_buffer(0)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
std::pair<pointer, size_type> __p(std::get_temporary_buffer<
|
||||
value_type>(_M_original_len));
|
||||
@ -196,7 +196,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (!__is_pod(_Tp) && _M_len > 0)
|
||||
std::uninitialized_fill_n(_M_buffer, _M_len, *__first);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::return_temporary_buffer(_M_buffer);
|
||||
_M_buffer = 0;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// RB tree implementation -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -372,9 +372,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_M_create_node(const value_type& __x)
|
||||
{
|
||||
_Link_type __tmp = _M_get_node();
|
||||
try
|
||||
__try
|
||||
{ get_allocator().construct(&__tmp->_M_value_field, __x); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_put_node(__tmp);
|
||||
__throw_exception_again;
|
||||
@ -394,12 +394,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_M_create_node(_Args&&... __args)
|
||||
{
|
||||
_Link_type __tmp = _M_get_node();
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_get_Node_allocator().construct(__tmp,
|
||||
std::forward<_Args>(__args)...);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_put_node(__tmp);
|
||||
__throw_exception_again;
|
||||
@ -937,7 +937,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_Link_type __top = _M_clone_node(__x);
|
||||
__top->_M_parent = __p;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (__x->_M_right)
|
||||
__top->_M_right = _M_copy(_S_right(__x), __top);
|
||||
@ -955,7 +955,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__x = _S_left(__x);
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_erase(__top);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Raw memory manipulators -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -73,14 +73,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_ForwardIterator __result)
|
||||
{
|
||||
_ForwardIterator __cur = __result;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (; __first != __last; ++__first, ++__cur)
|
||||
::new(static_cast<void*>(&*__cur)) typename
|
||||
iterator_traits<_ForwardIterator>::value_type(*__first);
|
||||
return __cur;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__result, __cur);
|
||||
__throw_exception_again;
|
||||
@ -132,12 +132,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_ForwardIterator __last, const _Tp& __x)
|
||||
{
|
||||
_ForwardIterator __cur = __first;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (; __cur != __last; ++__cur)
|
||||
std::_Construct(&*__cur, __x);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__first, __cur);
|
||||
__throw_exception_again;
|
||||
@ -186,12 +186,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
const _Tp& __x)
|
||||
{
|
||||
_ForwardIterator __cur = __first;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (; __n > 0; --__n, ++__cur)
|
||||
std::_Construct(&*__cur, __x);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__first, __cur);
|
||||
__throw_exception_again;
|
||||
@ -242,13 +242,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_ForwardIterator __result, _Allocator& __alloc)
|
||||
{
|
||||
_ForwardIterator __cur = __result;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (; __first != __last; ++__first, ++__cur)
|
||||
__alloc.construct(&*__cur, *__first);
|
||||
return __cur;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__result, __cur, __alloc);
|
||||
__throw_exception_again;
|
||||
@ -278,12 +278,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
const _Tp& __x, _Allocator& __alloc)
|
||||
{
|
||||
_ForwardIterator __cur = __first;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (; __cur != __last; ++__cur)
|
||||
__alloc.construct(&*__cur, __x);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__first, __cur, __alloc);
|
||||
__throw_exception_again;
|
||||
@ -303,12 +303,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
const _Tp& __x, _Allocator& __alloc)
|
||||
{
|
||||
_ForwardIterator __cur = __first;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (; __n > 0; --__n, ++__cur)
|
||||
__alloc.construct(&*__cur, __x);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__first, __cur, __alloc);
|
||||
__throw_exception_again;
|
||||
@ -345,11 +345,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1,
|
||||
__result,
|
||||
__alloc);
|
||||
try
|
||||
__try
|
||||
{
|
||||
return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__result, __mid, __alloc);
|
||||
__throw_exception_again;
|
||||
@ -373,11 +373,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1,
|
||||
__result,
|
||||
__alloc);
|
||||
try
|
||||
__try
|
||||
{
|
||||
return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__result, __mid, __alloc);
|
||||
__throw_exception_again;
|
||||
@ -395,11 +395,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_InputIterator __last, _Allocator& __alloc)
|
||||
{
|
||||
std::__uninitialized_fill_a(__result, __mid, __x, __alloc);
|
||||
try
|
||||
__try
|
||||
{
|
||||
return std::__uninitialized_move_a(__first, __last, __mid, __alloc);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__result, __mid, __alloc);
|
||||
__throw_exception_again;
|
||||
@ -420,11 +420,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1,
|
||||
__first2,
|
||||
__alloc);
|
||||
try
|
||||
__try
|
||||
{
|
||||
std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__first2, __mid2, __alloc);
|
||||
__throw_exception_again;
|
||||
@ -439,14 +439,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_ForwardIterator __result, input_iterator_tag)
|
||||
{
|
||||
_ForwardIterator __cur = __result;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (; __n > 0; --__n, ++__first, ++__cur)
|
||||
::new(static_cast<void*>(&*__cur)) typename
|
||||
iterator_traits<_ForwardIterator>::value_type(*__first);
|
||||
return __cur;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__result, __cur);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Vector implementation -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -968,13 +968,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
_ForwardIterator __first, _ForwardIterator __last)
|
||||
{
|
||||
pointer __result = this->_M_allocate(__n);
|
||||
try
|
||||
__try
|
||||
{
|
||||
std::__uninitialized_copy_a(__first, __last, __result,
|
||||
_M_get_Tp_allocator());
|
||||
return __result;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_deallocate(__result, __n);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Vector implementation (out of line) -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -326,7 +326,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
const size_type __elems_before = __position - begin();
|
||||
pointer __new_start(this->_M_allocate(__len));
|
||||
pointer __new_finish(__new_start);
|
||||
try
|
||||
__try
|
||||
{
|
||||
// The order of the three operations is dictated by the C++0x
|
||||
// case, where the moves could alter a new element belonging
|
||||
@ -352,7 +352,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
__new_finish,
|
||||
_M_get_Tp_allocator());
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
if (!__new_finish)
|
||||
this->_M_impl.destroy(__new_start + __elems_before);
|
||||
@ -418,7 +418,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
const size_type __elems_before = __position - begin();
|
||||
pointer __new_start(this->_M_allocate(__len));
|
||||
pointer __new_finish(__new_start);
|
||||
try
|
||||
__try
|
||||
{
|
||||
// See _M_insert_aux above.
|
||||
std::__uninitialized_fill_n_a(__new_start + __elems_before,
|
||||
@ -439,7 +439,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
__new_finish,
|
||||
_M_get_Tp_allocator());
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
if (!__new_finish)
|
||||
std::_Destroy(__new_start + __elems_before,
|
||||
@ -525,7 +525,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
_M_check_len(__n, "vector::_M_range_insert");
|
||||
pointer __new_start(this->_M_allocate(__len));
|
||||
pointer __new_finish(__new_start);
|
||||
try
|
||||
__try
|
||||
{
|
||||
__new_finish =
|
||||
std::__uninitialized_move_a(this->_M_impl._M_start,
|
||||
@ -542,7 +542,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
__new_finish,
|
||||
_M_get_Tp_allocator());
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__new_start, __new_finish,
|
||||
_M_get_Tp_allocator());
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Debugging deque implementation -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -416,12 +416,12 @@ namespace __debug
|
||||
iterator __victim = __position++;
|
||||
__victim._M_invalidate();
|
||||
}
|
||||
try
|
||||
__try
|
||||
{
|
||||
return iterator(_Base::erase(__first.base(), __last.base()),
|
||||
this);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
this->_M_revalidate_singular();
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Debugging list implementation -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -256,11 +256,11 @@ namespace __debug
|
||||
__real_victim._M_invalidate();
|
||||
}
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
_Base::resize(__sz, __c);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
this->_M_revalidate_singular();
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Memory extensions -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -79,13 +80,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
_ForwardIter __result, std::input_iterator_tag)
|
||||
{
|
||||
_ForwardIter __cur = __result;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (; __count > 0 ; --__count, ++__first, ++__cur)
|
||||
std::_Construct(&*__cur, *__first);
|
||||
return pair<_InputIter, _ForwardIter>(__first, __cur);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__result, __cur);
|
||||
__throw_exception_again;
|
||||
@ -138,13 +139,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
_Allocator __alloc)
|
||||
{
|
||||
_ForwardIter __cur = __result;
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (; __count > 0 ; --__count, ++__first, ++__cur)
|
||||
__alloc.construct(&*__cur, *__first);
|
||||
return pair<_InputIter, _ForwardIter>(__first, __cur);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::_Destroy(__result, __cur, __alloc);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -95,7 +95,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
|
||||
m_size = other.m_size;
|
||||
_GLIBCXX_DEBUG_ONLY(other.structure_only_assert_valid();)
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
m_p_head->m_p_parent = recursive_copy_node(other.m_p_head->m_p_parent);
|
||||
if (m_p_head->m_p_parent != NULL)
|
||||
@ -103,7 +103,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
|
||||
m_size = other.m_size;
|
||||
initialize_min_max();
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_GLIBCXX_DEBUG_ONLY(debug_base::clear();)
|
||||
s_node_allocator.deallocate(m_p_head, 1);
|
||||
@ -163,11 +163,11 @@ recursive_copy_node(const node_pointer p_nd)
|
||||
return (NULL);
|
||||
|
||||
node_pointer p_ret = s_node_allocator.allocate(1);
|
||||
try
|
||||
__try
|
||||
{
|
||||
new (p_ret) node(*p_nd);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
s_node_allocator.deallocate(p_ret, 1);
|
||||
__throw_exception_again;
|
||||
@ -175,12 +175,12 @@ recursive_copy_node(const node_pointer p_nd)
|
||||
|
||||
p_ret->m_p_left = p_ret->m_p_right = NULL;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
p_ret->m_p_left = recursive_copy_node(p_nd->m_p_left);
|
||||
p_ret->m_p_right = recursive_copy_node(p_nd->m_p_right);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
clear_imp(p_ret);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -109,7 +109,7 @@ binary_heap_(const PB_DS_CLASS_C_DEC& other) :
|
||||
const_iterator first_it = other.begin();
|
||||
const_iterator last_it = other.end();
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
while (first_it != last_it)
|
||||
{
|
||||
@ -117,7 +117,7 @@ binary_heap_(const PB_DS_CLASS_C_DEC& other) :
|
||||
++first_it;
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
for (size_type i = 0; i < m_size; ++i)
|
||||
erase_at(m_a_entries, i, s_no_throw_copies_ind);
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -52,7 +52,7 @@ clear()
|
||||
for (size_type i = 0; i < m_size; ++i)
|
||||
erase_at(m_a_entries, i, s_no_throw_copies_ind);
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
const size_type actual_size = resize_policy::get_new_size_for_arbitrary(0);
|
||||
|
||||
@ -66,7 +66,7 @@ clear()
|
||||
|
||||
m_a_entries = a_entries;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ }
|
||||
|
||||
m_size = 0;
|
||||
@ -135,7 +135,7 @@ erase_if(Pred pred)
|
||||
for (size_type i = left; i < m_size; ++i)
|
||||
erase_at(m_a_entries, i, s_no_throw_copies_ind);
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
const size_type actual_size =
|
||||
resize_policy::get_new_size_for_arbitrary(left);
|
||||
@ -150,7 +150,7 @@ erase_if(Pred pred)
|
||||
|
||||
resize_policy::notify_arbitrary(m_actual_size);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ };
|
||||
|
||||
m_size = left;
|
||||
@ -197,7 +197,7 @@ resize_for_erase_if_needed()
|
||||
if (!resize_policy::resize_needed_for_shrink(m_size))
|
||||
return;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
const size_type new_actual_size =
|
||||
resize_policy::get_new_size_for_shrink();
|
||||
@ -215,7 +215,7 @@ resize_for_erase_if_needed()
|
||||
|
||||
m_a_entries = a_new_entries;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ }
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -77,13 +77,13 @@ split(Pred pred, PB_DS_CLASS_C_DEC& other)
|
||||
entry_pointer a_entries = NULL;
|
||||
entry_pointer a_other_entries = NULL;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
a_entries = s_entry_allocator.allocate(actual_size);
|
||||
|
||||
a_other_entries = s_entry_allocator.allocate(other_actual_size);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
if (a_entries != NULL)
|
||||
s_entry_allocator.deallocate(a_entries, actual_size);
|
||||
@ -137,12 +137,12 @@ join(PB_DS_CLASS_C_DEC& other)
|
||||
entry_pointer a_entries = NULL;
|
||||
entry_pointer a_other_entries = NULL;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
a_entries = s_entry_allocator.allocate(actual_size);
|
||||
a_other_entries = s_entry_allocator.allocate(resize_policy::min_size);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
if (a_entries != NULL)
|
||||
s_entry_allocator.deallocate(a_entries, actual_size);
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -139,11 +139,11 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
|
||||
{
|
||||
initialize();
|
||||
_GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
|
||||
try
|
||||
__try
|
||||
{
|
||||
copy_from_range(other.begin(), other.end());
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
deallocate_all();
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -69,11 +69,11 @@ do_resize_if_needed_no_throw()
|
||||
if (!resize_base::is_resize_needed())
|
||||
return;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ }
|
||||
|
||||
_GLIBCXX_DEBUG_ONLY(assert_valid();)
|
||||
@ -94,13 +94,13 @@ resize_imp(size_type new_size)
|
||||
// Following line might throw an exception.
|
||||
ranged_hash_fn_base::notify_resized(new_size);
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
// Following line might throw an exception.
|
||||
a_p_entries_resized = s_entry_pointer_allocator.allocate(new_size);
|
||||
m_num_e = new_size;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
ranged_hash_fn_base::notify_resized(old_size);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -168,11 +168,11 @@ namespace __gnu_pbds
|
||||
std::abort();
|
||||
}
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
m_key_set.push_back(r_key);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::cerr << "insert_new" << r_key << std::endl;
|
||||
std::abort();
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -152,7 +152,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
|
||||
for (size_type i = 0; i < m_num_e; ++i)
|
||||
m_entries[i].m_stat = (entry_status)empty_entry_status;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (size_type i = 0; i < m_num_e; ++i)
|
||||
{
|
||||
@ -161,7 +161,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
|
||||
new (m_entries + i) entry(other.m_entries[i]);
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
deallocate_all();
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -69,11 +69,11 @@ do_resize_if_needed_no_throw()
|
||||
if (!resize_base::is_resize_needed())
|
||||
return;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ }
|
||||
|
||||
_GLIBCXX_DEBUG_ONLY(assert_valid();)
|
||||
@ -104,11 +104,11 @@ resize_imp(size_type new_size)
|
||||
for (size_type i = 0; i < m_num_e; ++i)
|
||||
a_entries_resized[i].m_stat = empty_entry_status;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
resize_imp(a_entries_resized, old_size);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
erase_all_valid_entries(a_entries_resized, new_size);
|
||||
m_num_e = old_size;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -122,11 +122,11 @@ recursive_copy_node(const_node_pointer p_nd)
|
||||
|
||||
node_pointer p_ret = s_node_allocator.allocate(1);
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
new (p_ret) node(*p_nd);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
s_node_allocator.deallocate(p_ret, 1);
|
||||
__throw_exception_again;
|
||||
@ -135,12 +135,12 @@ recursive_copy_node(const_node_pointer p_nd)
|
||||
p_ret->m_p_l_child = p_ret->m_p_next_sibling =
|
||||
p_ret->m_p_prev_or_parent = NULL;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
p_ret->m_p_l_child = recursive_copy_node(p_nd->m_p_l_child);
|
||||
p_ret->m_p_next_sibling = recursive_copy_node(p_nd->m_p_next_sibling);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
clear_imp(p_ret);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -93,7 +93,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
|
||||
#endif
|
||||
m_p_l(NULL)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (const_iterator it = other.begin(); it != other.end(); ++it)
|
||||
{
|
||||
@ -104,7 +104,7 @@ m_p_l(NULL)
|
||||
m_p_l = p_l;
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
deallocate_all();
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -96,11 +96,11 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
|
||||
_GLIBCXX_DEBUG_ONLY(assert_valid();)
|
||||
return;
|
||||
}
|
||||
try
|
||||
__try
|
||||
{
|
||||
m_p_head->m_p_parent = recursive_copy_node(other.m_p_head->m_p_parent);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
s_head_allocator.deallocate(m_p_head, 1);
|
||||
__throw_exception_again;
|
||||
@ -193,13 +193,13 @@ recursive_copy_node(const_node_pointer p_other_nd)
|
||||
p_other_internal_nd->begin();
|
||||
|
||||
internal_node_pointer p_ret;
|
||||
try
|
||||
__try
|
||||
{
|
||||
while (child_it != p_other_internal_nd->end())
|
||||
a_p_children[child_i++] = recursive_copy_node(*(child_it++));
|
||||
p_ret = s_internal_node_allocator.allocate(1);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
while (child_i-- > 0)
|
||||
clear_imp(a_p_children[child_i]);
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -60,11 +60,11 @@ public:
|
||||
add_branch()
|
||||
{
|
||||
internal_node_pointer p_nd = s_internal_node_allocator.allocate(1);
|
||||
try
|
||||
__try
|
||||
{
|
||||
m_bag.push_back(p_nd);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
s_internal_node_allocator.deallocate(p_nd, 1);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -259,13 +259,13 @@ set_loads(std::pair<float, float> load_pair)
|
||||
const size_type old_next_grow_size = m_next_grow_size;
|
||||
const bool old_resize_needed = m_resize_needed;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
m_load_min = load_pair.first;
|
||||
m_load_max = load_pair.second;
|
||||
do_resize(static_cast<size_type>(size_base::get_size() / ((m_load_min + m_load_max) / 2)));
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
m_load_min = old_load_min;
|
||||
m_load_max = old_load_max;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the terms
|
||||
@ -205,16 +205,16 @@ resize(size_type new_size)
|
||||
--actual_size;
|
||||
|
||||
const size_type old_size = m_size;
|
||||
try
|
||||
__try
|
||||
{
|
||||
do_resize(actual_size - 1);
|
||||
}
|
||||
catch(insert_error& )
|
||||
__catch(insert_error& )
|
||||
{
|
||||
m_size = old_size;
|
||||
__throw_resize_error();
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
m_size = old_size;
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Reference-counted versatile string base -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -515,7 +515,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
}
|
||||
_Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
|
||||
_S_copy(__r->_M_refdata(), __buf, __len);
|
||||
try
|
||||
__try
|
||||
{
|
||||
while (__beg != __end)
|
||||
{
|
||||
@ -531,7 +531,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
++__beg;
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__r->_M_destroy(__a);
|
||||
__throw_exception_again;
|
||||
@ -559,9 +559,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
__end));
|
||||
// Check for out_of_range and length_error exceptions.
|
||||
_Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
|
||||
try
|
||||
__try
|
||||
{ _S_copy_chars(__r->_M_refdata(), __beg, __end); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__r->_M_destroy(__a);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SGI's rope class -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -1689,9 +1689,9 @@ protected:
|
||||
|
||||
__uninitialized_copy_n_a(__s, __size, __buf, __a);
|
||||
_S_cond_store_eos(__buf[__size]);
|
||||
try
|
||||
__try
|
||||
{ return _S_new_RopeLeaf(__buf, __size, __a); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_RopeRep::__STL_FREE_STRING(__buf, __size, __a);
|
||||
__throw_exception_again;
|
||||
@ -1845,12 +1845,12 @@ protected:
|
||||
_CharT* __buf = this->_Data_allocate(_S_rounded_up_size(1));
|
||||
|
||||
_M_get_allocator().construct(__buf, __c);
|
||||
try
|
||||
__try
|
||||
{
|
||||
this->_M_tree_ptr = _S_new_RopeLeaf(__buf, 1,
|
||||
_M_get_allocator());
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_RopeRep::__STL_FREE_STRING(__buf, 1, _M_get_allocator());
|
||||
__throw_exception_again;
|
||||
@ -1924,13 +1924,13 @@ protected:
|
||||
_RopeRep* __old = this->_M_tree_ptr;
|
||||
_RopeRep* __left =
|
||||
__STL_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, _M_get_allocator());
|
||||
try
|
||||
__try
|
||||
{
|
||||
this->_M_tree_ptr = _S_concat(__left, this->_M_tree_ptr);
|
||||
_S_unref(__old);
|
||||
_S_unref(__left);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_S_unref(__left);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SGI's rope class implementation -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -439,12 +439,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
uninitialized_copy_n(__r->_M_data, __old_len, __new_data);
|
||||
uninitialized_copy_n(__iter, __len, __new_data + __old_len);
|
||||
_S_cond_store_eos(__new_data[__old_len + __len]);
|
||||
try
|
||||
__try
|
||||
{
|
||||
__result = _S_new_RopeLeaf(__new_data, __old_len + __len,
|
||||
__r->_M_get_allocator());
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_RopeRep::__STL_FREE_STRING(__new_data, __old_len + __len,
|
||||
__r->_M_get_allocator());
|
||||
@ -507,12 +507,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
{
|
||||
_RopeRep* __balanced;
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
__balanced = _S_balance(__result);
|
||||
__result->_M_unref_nonnil();
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_C_deallocate(__result,1);
|
||||
__throw_exception_again;
|
||||
@ -558,9 +558,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
_RopeRep* __nright =
|
||||
_S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen);
|
||||
__left->_M_ref_nonnil();
|
||||
try
|
||||
__try
|
||||
{ __result = _S_tree_concat(__left, __nright); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_S_unref(__left);
|
||||
_S_unref(__nright);
|
||||
@ -571,12 +571,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
}
|
||||
_RopeRep* __nright =
|
||||
__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
|
||||
try
|
||||
__try
|
||||
{
|
||||
__r->_M_ref_nonnil();
|
||||
__result = _S_tree_concat(__r, __nright);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_S_unref(__r);
|
||||
_S_unref(__nright);
|
||||
@ -638,9 +638,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
_RopeRep* __right =
|
||||
__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
|
||||
__r->_M_ref_nonnil();
|
||||
try
|
||||
__try
|
||||
{ __result = _S_tree_concat(__r, __right); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_S_unref(__r);
|
||||
_S_unref(__right);
|
||||
@ -690,9 +690,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
_M_data,
|
||||
__right->_M_size);
|
||||
__leftleft->_M_ref_nonnil();
|
||||
try
|
||||
__try
|
||||
{ return(_S_tree_concat(__leftleft, __rest)); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_S_unref(__leftleft);
|
||||
_S_unref(__rest);
|
||||
@ -703,9 +703,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
}
|
||||
__left->_M_ref_nonnil();
|
||||
__right->_M_ref_nonnil();
|
||||
try
|
||||
__try
|
||||
{ return(_S_tree_concat(__left, __right)); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_S_unref(__left);
|
||||
_S_unref(__right);
|
||||
@ -818,9 +818,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
goto lazy;
|
||||
__section = (_CharT*)
|
||||
_Data_allocate(_S_rounded_up_size(__result_len));
|
||||
try
|
||||
__try
|
||||
{ (*(__f->_M_fn))(__start, __result_len, __section); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_RopeRep::__STL_FREE_STRING(__section, __result_len,
|
||||
__base->_M_get_allocator());
|
||||
@ -965,13 +965,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
bool __result;
|
||||
_CharT* __buffer =
|
||||
(_CharT*)_Alloc().allocate(__len * sizeof(_CharT));
|
||||
try
|
||||
__try
|
||||
{
|
||||
(*(__f->_M_fn))(__begin, __len, __buffer);
|
||||
__result = __c(__buffer, __len);
|
||||
_Alloc().deallocate(__buffer, __len * sizeof(_CharT));
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_Alloc().deallocate(__buffer, __len * sizeof(_CharT));
|
||||
__throw_exception_again;
|
||||
@ -1027,7 +1027,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
if (!__is_simple)
|
||||
__o.width(__w / __rope_len);
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (__is_simple && !__left && __pad_len > 0)
|
||||
_Rope_fill(__o, __pad_len);
|
||||
@ -1037,7 +1037,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
if (!__is_simple)
|
||||
__o.width(__w);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
if (!__is_simple)
|
||||
__o.width(__w);
|
||||
@ -1216,7 +1216,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i)
|
||||
__forest[__i] = 0;
|
||||
try
|
||||
__try
|
||||
{
|
||||
_S_add_to_forest(__r, __forest);
|
||||
for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i)
|
||||
@ -1232,7 +1232,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
for(__i = 0; __i <= int(__detail::_S_max_rope_depth); __i++)
|
||||
_S_unref(__forest[__i]);
|
||||
@ -1552,10 +1552,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
__uninitialized_fill_n_a(__rest_buffer, __rest, __c,
|
||||
_M_get_allocator());
|
||||
_S_cond_store_eos(__rest_buffer[__rest]);
|
||||
try
|
||||
__try
|
||||
{ __remainder = _S_new_RopeLeaf(__rest_buffer, __rest,
|
||||
_M_get_allocator()); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_RopeRep::__STL_FREE_STRING(__rest_buffer, __rest,
|
||||
_M_get_allocator());
|
||||
@ -1572,13 +1572,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
__uninitialized_fill_n_a(__base_buffer, __exponentiate_threshold, __c,
|
||||
_M_get_allocator());
|
||||
_S_cond_store_eos(__base_buffer[__exponentiate_threshold]);
|
||||
try
|
||||
__try
|
||||
{
|
||||
__base_leaf = _S_new_RopeLeaf(__base_buffer,
|
||||
__exponentiate_threshold,
|
||||
_M_get_allocator());
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_RopeRep::__STL_FREE_STRING(__base_buffer,
|
||||
__exponentiate_threshold,
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Singly-linked list implementation -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2002, 2004, 2005, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -327,12 +328,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
_M_create_node(const value_type& __x)
|
||||
{
|
||||
_Node* __node = this->_M_get_node();
|
||||
try
|
||||
__try
|
||||
{
|
||||
get_allocator().construct(&__node->_M_data, __x);
|
||||
__node->_M_next = 0;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
this->_M_put_node(__node);
|
||||
__throw_exception_again;
|
||||
@ -344,12 +345,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
_M_create_node()
|
||||
{
|
||||
_Node* __node = this->_M_get_node();
|
||||
try
|
||||
__try
|
||||
{
|
||||
get_allocator().construct(&__node->_M_data, value_type());
|
||||
__node->_M_next = 0;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
this->_M_put_node(__node);
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Short-string-optimized versatile string base -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -398,7 +398,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
++__beg;
|
||||
}
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
while (__beg != __end)
|
||||
{
|
||||
@ -416,7 +416,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
++__beg;
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_dispose();
|
||||
__throw_exception_again;
|
||||
@ -446,9 +446,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
}
|
||||
|
||||
// Check for out_of_range and length_error exceptions.
|
||||
try
|
||||
__try
|
||||
{ _S_copy_chars(_M_data(), __beg, __end); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_dispose();
|
||||
__throw_exception_again;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Versatile string -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -567,7 +567,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
typename __istream_type::sentry __cerb(__in, false);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
// Avoid reallocation for common case.
|
||||
__str.erase();
|
||||
@ -600,12 +600,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__err |= __ios_base::eofbit;
|
||||
__in.width(0);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__in._M_setstate(__ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// 91. Description of operator>> and getline() for string<>
|
||||
@ -641,7 +641,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
typename __istream_type::sentry __cerb(__in, true);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
// Avoid reallocation for common case.
|
||||
__str.erase();
|
||||
@ -676,12 +676,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
__err |= __ios_base::failbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__in._M_setstate(__ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// 91. Description of operator>> and getline() for string<>
|
||||
|
@ -1,6 +1,6 @@
|
||||
// <bitset> -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -1326,7 +1326,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
typename __istream_type::sentry __sentry(__is);
|
||||
if (__sentry)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (size_t __i = _Nb; __i > 0; --__i)
|
||||
{
|
||||
@ -1355,12 +1355,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__is._M_setstate(__ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ __is._M_setstate(__ios_base::badbit); }
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Special functions -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2006, 2007, 2008
|
||||
// Copyright (C) 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -477,13 +477,13 @@ namespace tr1
|
||||
|
||||
bool __ok_d1 = true;
|
||||
_Tp __lng_ad, __lng_ad1, __lng_bd1;
|
||||
try
|
||||
__try
|
||||
{
|
||||
__lng_ad = __log_gamma(__ad);
|
||||
__lng_ad1 = __log_gamma(__a + __d1);
|
||||
__lng_bd1 = __log_gamma(__b + __d1);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__ok_d1 = false;
|
||||
}
|
||||
@ -525,12 +525,12 @@ namespace tr1
|
||||
// Evaluate F2.
|
||||
bool __ok_d2 = true;
|
||||
_Tp __lng_ad2, __lng_bd2;
|
||||
try
|
||||
__try
|
||||
{
|
||||
__lng_ad2 = __log_gamma(__a + __d2);
|
||||
__lng_bd2 = __log_gamma(__b + __d2);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__ok_d2 = false;
|
||||
}
|
||||
@ -600,14 +600,14 @@ namespace tr1
|
||||
bool __ok1 = true;
|
||||
_Tp __sgn_g1ca = _Tp(0), __ln_g1ca = _Tp(0);
|
||||
_Tp __sgn_g1cb = _Tp(0), __ln_g1cb = _Tp(0);
|
||||
try
|
||||
__try
|
||||
{
|
||||
__sgn_g1ca = __log_gamma_sign(__c - __a);
|
||||
__ln_g1ca = __log_gamma(__c - __a);
|
||||
__sgn_g1cb = __log_gamma_sign(__c - __b);
|
||||
__ln_g1cb = __log_gamma(__c - __b);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__ok1 = false;
|
||||
}
|
||||
@ -615,14 +615,14 @@ namespace tr1
|
||||
bool __ok2 = true;
|
||||
_Tp __sgn_g2a = _Tp(0), __ln_g2a = _Tp(0);
|
||||
_Tp __sgn_g2b = _Tp(0), __ln_g2b = _Tp(0);
|
||||
try
|
||||
__try
|
||||
{
|
||||
__sgn_g2a = __log_gamma_sign(__a);
|
||||
__ln_g2a = __log_gamma(__a);
|
||||
__sgn_g2b = __log_gamma_sign(__b);
|
||||
__ln_g2b = __log_gamma(__b);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__ok2 = false;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// <tr1/shared_ptr.h> -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -110,13 +110,13 @@ namespace tr1
|
||||
template<typename _Ptr>
|
||||
__shared_count(_Ptr __p) : _M_pi(0)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
typedef typename std::tr1::remove_pointer<_Ptr>::type _Tp;
|
||||
_M_pi = new _Sp_counted_base_impl<_Ptr, _Sp_deleter<_Tp>, _Lp>(
|
||||
__p, _Sp_deleter<_Tp>());
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
delete __p;
|
||||
__throw_exception_again;
|
||||
@ -126,11 +126,11 @@ namespace tr1
|
||||
template<typename _Ptr, typename _Deleter>
|
||||
__shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_pi = new _Sp_counted_base_impl<_Ptr, _Deleter, _Lp>(__p, __d);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
__d(__p); // Call _Deleter on __p.
|
||||
__throw_exception_again;
|
||||
@ -709,11 +709,11 @@ namespace tr1
|
||||
if (expired())
|
||||
return __shared_ptr<element_type, _Lp>();
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
return __shared_ptr<element_type, _Lp>(*this);
|
||||
}
|
||||
catch(const bad_weak_ptr&)
|
||||
__catch(const bad_weak_ptr&)
|
||||
{
|
||||
// Q: How can we get here?
|
||||
// A: Another thread may have invalidated r after the
|
||||
@ -958,11 +958,11 @@ namespace tr1
|
||||
if (this->expired())
|
||||
return shared_ptr<_Tp>();
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
return shared_ptr<_Tp>(*this);
|
||||
}
|
||||
catch(const bad_weak_ptr&)
|
||||
__catch(const bad_weak_ptr&)
|
||||
{
|
||||
return shared_ptr<_Tp>();
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Internal header for TR1 unordered_set and unordered_map -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -482,7 +482,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
||||
_M_allocate_node(const value_type& __v)
|
||||
{
|
||||
_Node* __n = _M_node_allocator.allocate(1);
|
||||
try
|
||||
__try
|
||||
{
|
||||
#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
|
||||
_M_node_allocator.construct(__n, __v);
|
||||
@ -492,7 +492,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
||||
__n->_M_next = 0;
|
||||
return __n;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_node_allocator.deallocate(__n, 1);
|
||||
__throw_exception_again;
|
||||
@ -624,12 +624,12 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
||||
__distance_fw(__f,
|
||||
__l)));
|
||||
_M_buckets = _M_allocate_buckets(_M_bucket_count);
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (; __f != __l; ++__f)
|
||||
this->insert(*__f);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
clear();
|
||||
_M_deallocate_buckets(_M_buckets, _M_bucket_count);
|
||||
@ -654,7 +654,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
||||
_M_rehash_policy(__ht._M_rehash_policy)
|
||||
{
|
||||
_M_buckets = _M_allocate_buckets(_M_bucket_count);
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (size_type __i = 0; __i < __ht._M_bucket_count; ++__i)
|
||||
{
|
||||
@ -669,7 +669,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
clear();
|
||||
_M_deallocate_buckets(_M_buckets, _M_bucket_count);
|
||||
@ -946,7 +946,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
||||
// do a rehash if the allocation throws.
|
||||
_Node* __new_node = _M_allocate_node(__v);
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (__do_rehash.first)
|
||||
{
|
||||
@ -961,7 +961,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
||||
++_M_element_count;
|
||||
return iterator(__new_node, _M_buckets + __n);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_deallocate_node(__new_node);
|
||||
__throw_exception_again;
|
||||
@ -1239,7 +1239,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
||||
_M_rehash(size_type __n)
|
||||
{
|
||||
_Node** __new_array = _M_allocate_buckets(__n);
|
||||
try
|
||||
__try
|
||||
{
|
||||
for (size_type __i = 0; __i < _M_bucket_count; ++__i)
|
||||
while (_Node* __p = _M_buckets[__i])
|
||||
@ -1253,7 +1253,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
||||
_M_bucket_count = __n;
|
||||
_M_buckets = __new_array;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
// A failure here means that a hash function threw an exception.
|
||||
// We can't restore the previous state without calling the hash
|
||||
|
@ -1,5 +1,6 @@
|
||||
// -*- C++ -*- Helpers for calling unextected and terminate
|
||||
// Copyright (C) 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of GCC.
|
||||
//
|
||||
@ -108,14 +109,14 @@ __cxa_call_unexpected(void* exc_obj_in)
|
||||
} end_catch_protect_obj;
|
||||
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
if (foreign_exception)
|
||||
std::unexpected();
|
||||
else
|
||||
__unexpected(unexpectedHandler);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
/* See if the new exception matches the rtti list. */
|
||||
if (foreign_exception)
|
||||
|
@ -1,5 +1,6 @@
|
||||
// -*- C++ -*- The GNU C++ exception personality routine.
|
||||
// Copyright (C) 2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of GCC.
|
||||
//
|
||||
@ -664,9 +665,9 @@ PERSONALITY_FUNCTION (int version,
|
||||
std::terminate ();
|
||||
else if (handler_switch_value < 0)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{ std::unexpected (); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ std::terminate (); }
|
||||
}
|
||||
}
|
||||
@ -753,9 +754,9 @@ __cxa_call_unexpected (void *exc_obj_in)
|
||||
xh_terminate_handler = xh->terminateHandler;
|
||||
info.ttype_base = (_Unwind_Ptr) xh->catchTemp;
|
||||
|
||||
try
|
||||
__try
|
||||
{ __unexpected (xh->unexpectedHandler); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
// Get the exception thrown from unexpected.
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
// -fno-exceptions Support -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -40,11 +41,13 @@
|
||||
|
||||
#ifndef __EXCEPTIONS
|
||||
// Iff -fno-exceptions, transform error handling code to work without it.
|
||||
# define try if (true)
|
||||
# define catch(X) if (false)
|
||||
# define __try if (true)
|
||||
# define __catch(X) if (false)
|
||||
# define __throw_exception_again
|
||||
#else
|
||||
// Else proceed normally.
|
||||
# define __try try
|
||||
# define __catch(X) catch(X)
|
||||
# define __throw_exception_again throw
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Exception Handling support header (exception_ptr class) for -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2008 Free Software Foundation
|
||||
// Copyright (C) 2008, 2009 Free Software Foundation
|
||||
//
|
||||
// This file is part of GCC.
|
||||
//
|
||||
@ -39,6 +39,7 @@
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
#include <bits/c++config.h>
|
||||
#include <exception_defines.h>
|
||||
|
||||
#if !defined(_GLIBCXX_ATOMIC_BUILTINS_4)
|
||||
# error This platform does not support exception propagation.
|
||||
@ -152,11 +153,11 @@ namespace std
|
||||
template <class _Ex>
|
||||
exception_ptr copy_exception(_Ex __ex) throw()
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
throw __ex;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
return current_exception ();
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Bitmap Allocator. Out of line function definitions. -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -75,12 +76,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
{
|
||||
size_t* __ret = 0;
|
||||
--__ctr;
|
||||
try
|
||||
__try
|
||||
{
|
||||
__ret = reinterpret_cast<size_t*>
|
||||
(::operator new(__sz + sizeof(size_t)));
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
this->_M_clear();
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Compatibility symbols for previous versions -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2005, 2006, 2009
|
||||
// Copyright (C) 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb && __n > 0)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __eof = traits_type::eof();
|
||||
__streambuf_type* __sb = this->rdbuf();
|
||||
@ -115,12 +115,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (traits_type::eq_int_type(__c, __eof))
|
||||
__err |= ios_base::eofbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -142,7 +142,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb && __n > 0)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __eof = traits_type::eof();
|
||||
__streambuf_type* __sb = this->rdbuf();
|
||||
@ -186,12 +186,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (traits_type::eq_int_type(__c, __eof))
|
||||
__err |= ios_base::eofbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Iostreams base classes -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -125,9 +126,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__ix < numeric_limits<int>::max())
|
||||
{
|
||||
__newsize = __ix + 1;
|
||||
try
|
||||
__try
|
||||
{ __words = new _Words[__newsize]; }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
_M_streambuf_state |= badbit;
|
||||
if (_M_streambuf_state & _M_exception)
|
||||
@ -170,9 +171,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
_Callback_list* __p = _M_callbacks;
|
||||
while (__p)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{ (*__p->_M_fn) (__e, *this, __p->_M_index); }
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ }
|
||||
__p = __p->_M_next;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Iostreams base classes -*- C++ -*-
|
||||
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -129,7 +130,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__gnu_cxx::__exchange_and_add_dispatch(&_S_refcount, -1) == 2)
|
||||
{
|
||||
// Catch any exceptions thrown by basic_ostream::flush()
|
||||
try
|
||||
__try
|
||||
{
|
||||
// Flush standard output streams as required by 27.4.2.1.6
|
||||
cout.flush();
|
||||
@ -142,7 +143,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
wclog.flush();
|
||||
#endif
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Input streams -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -45,7 +46,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
sentry __cerb(*this, true);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __idelim = traits_type::to_int_type(__delim);
|
||||
const int_type __eof = traits_type::eof();
|
||||
@ -91,12 +92,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
__err |= ios_base::failbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
}
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
@ -123,7 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb && __n > 0)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const char_type __cdelim = traits_type::to_char_type(__delim);
|
||||
const int_type __eof = traits_type::eof();
|
||||
@ -182,12 +183,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__sb->sbumpc();
|
||||
}
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -211,7 +212,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__istream_type::sentry __cerb(__in, false);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
// Figure out how many characters to extract.
|
||||
streamsize __num = __in.width();
|
||||
@ -261,12 +262,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
*__s = __char_type();
|
||||
__in.width(0);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__in._M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ __in._M_setstate(ios_base::badbit); }
|
||||
}
|
||||
if (!__extracted)
|
||||
@ -294,7 +295,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__istream_type::sentry __cerb(__in, false);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
__str.erase();
|
||||
const streamsize __w = __in.width();
|
||||
@ -336,12 +337,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__err |= ios_base::eofbit;
|
||||
__in.width(0);
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__in._M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// 91. Description of operator>> and getline() for string<>
|
||||
@ -376,7 +377,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__istream_type::sentry __cerb(__in, true);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
__str.erase();
|
||||
const __int_type __idelim = __traits_type::to_int_type(__delim);
|
||||
@ -421,12 +422,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
__err |= ios_base::failbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__in._M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// 91. Description of operator>> and getline() for string<>
|
||||
@ -452,7 +453,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
sentry __cerb(*this, true);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
const int_type __idelim = traits_type::to_int_type(__delim);
|
||||
const int_type __eof = traits_type::eof();
|
||||
@ -498,12 +499,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
__err |= ios_base::failbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
}
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
@ -530,7 +531,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
if (__cerb && __n > 0)
|
||||
{
|
||||
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
|
||||
try
|
||||
__try
|
||||
{
|
||||
const char_type __cdelim = traits_type::to_char_type(__delim);
|
||||
const int_type __eof = traits_type::eof();
|
||||
@ -589,12 +590,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__sb->sbumpc();
|
||||
}
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
if (__err)
|
||||
this->setstate(__err);
|
||||
@ -622,7 +623,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__istream_type::sentry __cerb(__in, true);
|
||||
if (__cerb)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
__str.erase();
|
||||
const __int_type __idelim = __traits_type::to_int_type(__delim);
|
||||
@ -667,12 +668,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
else
|
||||
__err |= ios_base::failbit;
|
||||
}
|
||||
catch(__cxxabiv1::__forced_unwind&)
|
||||
__catch(__cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
__in._M_setstate(ios_base::badbit);
|
||||
__throw_exception_again;
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// 91. Description of operator>> and getline() for string<>
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
// 2009
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -256,7 +256,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
: _M_refcount(__refs), _M_facets(0), _M_facets_size(__imp._M_facets_size),
|
||||
_M_caches(0), _M_names(0)
|
||||
{
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_facets = new const facet*[_M_facets_size];
|
||||
for (size_t __i = 0; __i < _M_facets_size; ++__i)
|
||||
@ -285,7 +285,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
std::memcpy(_M_names[__l], __imp._M_names[__l], __len);
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
this->~_Impl();
|
||||
__throw_exception_again;
|
||||
@ -337,11 +337,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
// New cache array.
|
||||
const facet** __oldc = _M_caches;
|
||||
const facet** __newc;
|
||||
try
|
||||
__try
|
||||
{
|
||||
__newc = new const facet*[__new_size];
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
delete [] __newf;
|
||||
__throw_exception_again;
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
// 2006, 2007, 2008
|
||||
// 2006, 2007, 2008, 2009
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
@ -166,9 +166,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__cat = _S_normalize_category(__cat);
|
||||
_M_impl = new _Impl(*__base._M_impl, 1);
|
||||
|
||||
try
|
||||
__try
|
||||
{ _M_impl->_M_replace_categories(__add._M_impl, __cat); }
|
||||
catch (...)
|
||||
__catch (...)
|
||||
{
|
||||
_M_impl->_M_remove_reference();
|
||||
__throw_exception_again;
|
||||
@ -186,7 +186,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
__c_locale __cloc;
|
||||
locale::facet::_S_create_c_locale(__cloc, __s);
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
_M_facets = new const facet*[_M_facets_size];
|
||||
for (size_t __i = 0; __i < _M_facets_size; ++__i)
|
||||
@ -254,7 +254,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
#endif
|
||||
locale::facet::_S_destroy_c_locale(__cloc);
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
locale::facet::_S_destroy_c_locale(__cloc);
|
||||
this->~_Impl();
|
||||
|
@ -44,11 +44,11 @@ namespace std
|
||||
__thread_data_ptr __local_thread_data;
|
||||
__local_thread_data.swap(__t->_M_this_ptr);
|
||||
|
||||
try
|
||||
__try
|
||||
{
|
||||
__local_thread_data->_M_run();
|
||||
}
|
||||
catch(...)
|
||||
__catch(...)
|
||||
{
|
||||
std::terminate();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user