* Library support for C++20 coroutines
Implements most of <coroutine>. Usefulness of this header is dependent
on a compatible compiler (e.g. Visual Studio 2019 16.8 Preview 1 or
later) that defines `__cpp_impl_coroutine`. With such a compiler
this header exposes the coroutine library support in the `std` namespace
without the need for an `/await` switch.
This implementation is not yet complete:
- noop coroutines are not yet implemented
- symmetric transfer is not yet implemented
The value of `__cpp_lib_coroutine` is defined to a value less than the
Standard-mandated value to represent the incomplete feature.
Co-authored-by: Daniel Marshall <xandan@gmail.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <cartec69@gmail.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Curtis Bezault <curtbezault@gmail.com>
* <filesystem>::space fails with no read access to root
Avoid the unnecessary call to GetVolumePathNameW because read access for this call is required on the root of the mounted volume. This call used to be required for GetDiskFreeSpace, but should not be used for GetDiskFreeSpaceExW, where the full path should be used. The appropriate read permissions on the given path will be taken into consideration.
Co-authored-by: Billy O'Neal <billy.oneal@gmail.com>
This avoids the allocation in _Winerror_message, and introduces a new version of it which uses FORMAT_MESSAGE_ALLOCATE_BUFFER to completely avoid overallocating memory
Fixes#434
Co-authored-by: Billy O'Neal <billy.oneal@gmail.com>
Co-authored-by: Casey Carter <cartec69@gmail.com>
Resolves#55.
* Deprecate experimental::erase
* Implement P1209R0
* Update yvals_core.h
* Update deprecations and remove <experimental/xutility>
* move and reorder erase/erase_if
* moved _Erase and remove and friends to <xmemory>
* Consistently place erase_if() definitions.
Configured headers were flattened during configuration. This patch
keep original directory structure.
For example without this for 'deque` is replaced by `experimental/deque`.
* Implements a selection of support machinery in `std::ranges` and adds the `<ranges>` header. Primarily consists of the range access customization point objects:
* `ranges::begin`
* `ranges::end`
* `ranges::cbegin`
* `ranges::cend`
* `ranges::rbegin`
* `ranges::rend`
* `ranges::crbegin`
* `ranges::crend`
* `ranges::size`
* `ranges::empty`
* `ranges::data`
* `ranges::cdata`
and range concepts:
* `ranges::range`
* `ranges::output_range`
* `ranges::input_range`
* `ranges::forward_range`
* `ranges::bidirectional_range`
* `ranges::random_access_range`
* `ranges::contiguous_range`
* `ranges::sized_range`
* `ranges::view`
* `ranges::common_range`
and the associated type aliases:
* `ranges::iterator_t`
* `ranges::sentinel_t`
* `ranges::range_value_t`
* `ranges::range_reference_t`
* `ranges::range_difference_t`
* `ranges::range_rvalue_reference_t`
* Adds `<ranges>` - which is mostly empty since the support machinery is defined in `<xutility>` so as to be visible to `<algorithm>`
* Annotates [P0896R4](https://wg21.link/p0896r4) as partially implemented in the "`_HAS_CXX20` directly controls" section of `<yvals_core.h>`.
* Touches `<regex>`, `<set>`, and `<unordered_set>` to add partial specializations of `ranges::enable_view` for `match_results` and `(unordered_)?multi?set` as mandated by the WD to override the heuristic.
* Partially implements [P1474R1 "Helpful pointers for `ContiguousIterator`"](https://wg21.link/p1474r1):
* Push `pointer_traits` from `<xmemory>` and `to_address` from `<memory>` up into `<xutility>`
* Add `to_address` expression requirement to `contiguous_iterator` concept, and update `P0896R4_ranges_iterator_machinery` appropriately
* Implement the changes to `ranges::data` (but not `view_interface` since it isn't yet implemented)
* Drive-by:
* Simplify the definition of `pointer_traits::_Reftype` by eschewing `add_lvalue_reference_t`.
* Strengthen `reverse_iterator`'s constructors and `make_reverse_iterator` so `ranges::rbegin` and `ranges::rend` can be `noexcept` in more cases
* Since we're using `_Rng` as the template parameter name for models of `std::ranges::range`, rename a local variable `_Rng` to `_Generator` in `<random>`
* Remove the need to specify the target architecture by testing CMAKE_CXX_COMPILER_ARCHITECTURE_ID.
This is somewhat fragile because it's documented as an internal-to-cmake variable, but FindBoost.cmake has used it 'effectively forever' so I'm not too concerned.
* Make ARM and ARM64 work, and use CMAKE_CXX_STANDARD_LIBRARIES for kernel32.lib.
* Affirmatively set _HAS_OLD_IOSTREAMS_MEMBERS=1 to make intellisense in "Open Folder" happy.
* Use add_library(STATIC) and STATIC_LIBRARY_OPTIONS for implib smashing instead of add_custom_command et al.
* Include headers in some of the generated targets so they show up in "open folder" et al.
* Extract the target architecture from VCPKG_TARGET_TRIPLET.
* Add .vs and out/ to .gitignore as VS's open folder creates these.
* Don't link an exe in try_compile.
* Add CMakeSettings.json to make VS happy.