From 54b409fdb9489b305bf95f4d4f52b49c7926c429 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 llvm-svn: 110828 --- libcxx/include/map | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libcxx/include/map') 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; } -- cgit v1.2.3