now works with -fno-exceptions and -fno-rtti
llvm-svn: 110828
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 54b409fdb9489b305bf95f4d4f52b49c7926c429
diff --git a/include/map b/include/map
index 3998fdf..fd06c21 100644
--- a/include/map
+++ b/include/map
@@ -1136,8 +1136,10 @@
{
__node_base_pointer __parent;
__node_base_pointer& __child = __find_equal_key(__parent, __k);
+#ifndef _LIBCPP_NO_EXCEPTIONS
if (__child == nullptr)
throw out_of_range("map::at: key not found");
+#endif
return static_cast<__node_pointer>(__child)->__value_.second;
}
@@ -1147,8 +1149,10 @@
{
__node_base_const_pointer __parent;
__node_base_const_pointer __child = __find_equal_key(__parent, __k);
+#ifndef _LIBCPP_NO_EXCEPTIONS
if (__child == nullptr)
throw out_of_range("map::at: key not found");
+#endif
return static_cast<__node_const_pointer>(__child)->__value_.second;
}