[PATCH] D27387: [libc++] Add a key function for bad_function_call

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 28 23:13:16 PST 2017


smeenai added inline comments.


================
Comment at: include/functional:1393
+public:
+    virtual ~bad_function_call() _NOEXCEPT;
+
----------------
EricWF wrote:
> What's the rationale for making the dtor out-of-line? Couldn't we just use `what()` as the key function?
We could, but this way it's consistent with all the other exception classes.


================
Comment at: src/functional.cpp:11
+#include "__config"
+#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
+
----------------
EricWF wrote:
> Nit, please put the guard inside of the namespace at the smallest possible scope.
> 
> Also there is no need to manually include `__config` before including `functional`.
Will do.


https://reviews.llvm.org/D27387





More information about the cfe-commits mailing list