summaryrefslogtreecommitdiffstats
path: root/libcxx/include/map
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
commit54b409fdb9489b305bf95f4d4f52b49c7926c429 (patch)
tree4e1c893fe8a940ea767c4eef990dff879fcbbd25 /libcxx/include/map
parent37aab7674a74dd0224b14976e91f89abe48e9ae9 (diff)
downloadbcm5719-llvm-54b409fdb9489b305bf95f4d4f52b49c7926c429.tar.gz
bcm5719-llvm-54b409fdb9489b305bf95f4d4f52b49c7926c429.zip
now works with -fno-exceptions and -fno-rtti
llvm-svn: 110828
Diffstat (limited to 'libcxx/include/map')
-rw-r--r--libcxx/include/map4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/include/map b/libcxx/include/map
index 3998fdf740c..fd06c21d153 100644
--- a/libcxx/include/map
+++ b/libcxx/include/map
@@ -1136,8 +1136,10 @@ map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k)
{
__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 @@ map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) const
{
__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;
}
OpenPOWER on IntegriCloud