Summary: `std::__throw_bad_alloc()` is defined in `<new>` on OSX, so bring back the `#ifdef` guards that were there previously.
Reviewed By: markw65
Differential Revision:
D3749714
fbshipit-source-id:
0338a4cece928fce0b9d33d41c17cfa99a319abe
throw std::out_of_range(msg);
}
+#ifdef _MSC_VER
void __throw_bad_alloc() {
throw std::bad_alloc();
}
+#endif
FOLLY_NAMESPACE_STD_END
#endif
#if FOLLY_HAVE_BITS_FUNCTEXCEPT_H
#include <bits/functexcept.h>
#else
+#include <new> // Some platforms define __throw_bad_alloc() here.
#include <folly/Portability.h>
FOLLY_NAMESPACE_STD_BEGIN
[[noreturn]] void __throw_length_error(const char* msg);
[[noreturn]] void __throw_logic_error(const char* msg);
[[noreturn]] void __throw_out_of_range(const char* msg);
+
+#ifdef _MSC_VER
[[noreturn]] void __throw_bad_alloc();
+#endif
FOLLY_NAMESPACE_STD_END
#endif