summaryrefslogtreecommitdiffstats
path: root/include/__tree
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-08-11 17:04:31 +0000
committerHoward Hinnant <hhinnant@apple.com>2010-08-11 17:04:31 +0000
commitd444470d6cd1cad554139c4ba7f3c4f3fe921a5d (patch)
tree6281d60246fdb081fa2e7df5b0942c1f9920dd8b /include/__tree
parent81e68580b2c1fc311e2393fafdfb56adc2a240fd (diff)
downloadexternal_libcxx-d444470d6cd1cad554139c4ba7f3c4f3fe921a5d.tar.gz
external_libcxx-d444470d6cd1cad554139c4ba7f3c4f3fe921a5d.tar.bz2
external_libcxx-d444470d6cd1cad554139c4ba7f3c4f3fe921a5d.zip
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
Diffstat (limited to 'include/__tree')
-rw-r--r--include/__tree12
1 files changed, 12 insertions, 0 deletions
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)