aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/allocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/bits/allocator.h')
-rw-r--r--libstdc++-v3/include/bits/allocator.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/allocator.h b/libstdc++-v3/include/bits/allocator.h
index 7f5e659e22f..605731533d0 100644
--- a/libstdc++-v3/include/bits/allocator.h
+++ b/libstdc++-v3/include/bits/allocator.h
@@ -206,15 +206,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static bool
_S_do_it(_Tp& __c) noexcept
{
- __try
+#if __cpp_exceptions
+ try
{
_Tp(__make_move_if_noexcept_iterator(__c.begin()),
__make_move_if_noexcept_iterator(__c.end()),
__c.get_allocator()).swap(__c);
return true;
}
- __catch(...)
+ catch(...)
{ return false; }
+#else
+ return false;
+#endif
}
};
#endif