diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:08 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:08 +0000 |
commit | 0564cdb94a7a1facbb0dbf888ceb90638aa70ecd (patch) | |
tree | 3ccbf1ba827928fca93419d0b6cf83ce0f650f2a /docs/UsingLibcxx.rst | |
parent | dbabdb5220c44e5938d404eefb84b5ed55667ea8 (diff) |
Notes
Diffstat (limited to 'docs/UsingLibcxx.rst')
-rw-r--r-- | docs/UsingLibcxx.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/UsingLibcxx.rst b/docs/UsingLibcxx.rst index 183664655aa3..f54234d6aa3f 100644 --- a/docs/UsingLibcxx.rst +++ b/docs/UsingLibcxx.rst @@ -185,6 +185,26 @@ thread safety annotations. * Giving `set`, `map`, `multiset`, `multimap` a comparator which is not const callable. +**_LIBCPP_NO_VCRUNTIME**: + Microsoft's C and C++ headers are fairly entangled, and some of their C++ + headers are fairly hard to avoid. In particular, `vcruntime_new.h` gets pulled + in from a lot of other headers and provides definitions which clash with + libc++ headers, such as `nothrow_t` (note that `nothrow_t` is a struct, so + there's no way for libc++ to provide a compatible definition, since you can't + have multiple definitions). + + By default, libc++ solves this problem by deferring to Microsoft's vcruntime + headers where needed. However, it may be undesirable to depend on vcruntime + headers, since they may not always be available in cross-compilation setups, + or they may clash with other headers. The `_LIBCPP_NO_VCRUNTIME` macro + prevents libc++ from depending on vcruntime headers. Consequently, it also + prevents libc++ headers from being interoperable with vcruntime headers (from + the aforementioned clashes), so users of this macro are promising to not + attempt to combine libc++ headers with the problematic vcruntime headers. This + macro also currently prevents certain `operator new`/`operator delete` + replacement scenarios from working, e.g. replacing `operator new` and + expecting a non-replaced `operator new[]` to call the replaced `operator new`. + C++17 Specific Configuration Macros ----------------------------------- **_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES**: |