It's a good idea. Currently, there are about 600+ "throws" being guarded by _LIBCPP_NO_EXCEPTIONS macro.

How about let's merge the patch now and I can do the conversion of existing code to the wrapper in background?

Weiming

On 6/24/2016 1:25 AM, Noel Grandin wrote:
grandinj added a subscriber: grandinj.

================
Comment at: include/experimental/optional:524
@@ -521,1 +523,3 @@
+            assert(!"bad optional access");
+#endif
          return this->__val_;
----------------
If this kind of code is going to show up in lots of places, then maybe wrap it 
up in a macro:

    _LIBCPP_THROW_OR_ASSERT(bad_optional_access(), "bad optional access")

?

With some extra preprocessor magic, and if LLVM didn't care about the string in 
the assert, could even leave out the second parameter


http://reviews.llvm.org/D21673




--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by 
The Linux Foundation

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to