llvm-project/libcxx/include/support
Shoaib Meenai f6eea04cd1 [libc++] Avoid <memory> include in locale_win32.h
When `_LIBCPP_NO_EXCEPTIONS` is defined, we end up with compile errors
when targeting MSVCRT:

* Code includes `<new>`
* `<new>` includes `<cstdlib>` in order to get `abort`
* `<cstdlib>` includes `<stdlib.h>`, _before_ the `using ::abort`
* `<stdlib.h>` includes `locale_win32.h`
* `locale_win32.h` includes `<memory>`
* `<memory>` includes `<stdexcept>`
* `<stdexcept>` includes `<cstdlib` for `abort`, but that inclusion gets
  (correctly) ignored because of header guards
* `<stdexcept>` references `_VSTD::abort`, which isn't declared

The easiest solution is to make `locale_win32.h` not include `<memory>`,
by removing the use of `unique_ptr` and manually restoring the locale
instead.

Differential Revision: https://reviews.llvm.org/D24374

llvm-svn: 281641
2016-09-15 18:36:13 +00:00
..
android Reorganize locale extension fallbacks. NFCI 2016-05-20 12:58:41 +00:00
ibm Split locale management out of ibm/xlocale.h. NFCI 2016-02-18 17:37:33 +00:00
musl Add initial support for the MUSL C library. 2015-11-09 10:21:04 +00:00
newlib Reorganize locale extension fallbacks. NFCI 2016-05-20 12:58:41 +00:00
solaris Implement LWG issue 1169. num_get not fully compatible with strto* 2016-06-19 06:58:22 +00:00
win32 [libc++] Avoid <memory> include in locale_win32.h 2016-09-15 18:36:13 +00:00
xlocale Implement LWG issue 1169. num_get not fully compatible with strto* 2016-06-19 06:58:22 +00:00