llvm-project/libcxx/include/support/win32
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
..
limits_win32.h
locale_mgmt_win32.h Split locale management out of locale_win32. NFCI 2016-03-09 15:49:59 +00:00
locale_win32.h [libc++] Avoid <memory> include in locale_win32.h 2016-09-15 18:36:13 +00:00
math_win32.h
support.h support: clean up MSVC support 2016-09-08 20:52:48 +00:00