From d444470d6cd1cad554139c4ba7f3c4f3fe921a5d Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Wed, 11 Aug 2010 17:04:31 +0000 Subject: now works with -fno-exceptions and -fno-rtti git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@110828 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/__tree | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/__tree') diff --git a/include/__tree b/include/__tree index 53c1e1f2a..18363dc53 100644 --- a/include/__tree +++ b/include/__tree @@ -1102,8 +1102,10 @@ __tree<_Tp, _Compare, _Allocator>::__assign_unique(_InputIterator __first, _Inpu if (size() != 0) { __node_pointer __cache = __detach(); +#ifndef _LIBCPP_NO_EXCEPTIONS try { +#endif for (; __cache != nullptr && __first != __last; ++__first) { __cache->__value_ = *__first; @@ -1111,6 +1113,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_unique(_InputIterator __first, _Inpu __node_insert_unique(__cache); __cache = __next; } +#ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { @@ -1119,6 +1122,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_unique(_InputIterator __first, _Inpu destroy(__cache); throw; } +#endif if (__cache != nullptr) { while (__cache->__parent_ != nullptr) @@ -1138,8 +1142,10 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input if (size() != 0) { __node_pointer __cache = __detach(); +#ifndef _LIBCPP_NO_EXCEPTIONS try { +#endif for (; __cache != nullptr && __first != __last; ++__first) { __cache->__value_ = *__first; @@ -1147,6 +1153,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input __node_insert_multi(__cache); __cache = __next; } +#ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { @@ -1155,6 +1162,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input destroy(__cache); throw; } +#endif if (__cache != nullptr) { while (__cache->__parent_ != nullptr) @@ -1253,8 +1261,10 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type) if (size() != 0) { __node_pointer __cache = __detach(); +#ifndef _LIBCPP_NO_EXCEPTIONS try { +#endif while (__cache != nullptr && __t.size() != 0) { __cache->__value_ = _STD::move(__t.remove(__t.begin())->__value_); @@ -1262,6 +1272,7 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type) __node_insert_multi(__cache); __cache = __next; } +#ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { @@ -1270,6 +1281,7 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type) destroy(__cache); throw; } +#endif if (__cache != nullptr) { while (__cache->__parent_ != nullptr) -- cgit v1.2.3