Clang's `__is_base_of` intrinsic incorrectly handles some corner cases involving incomplete union types before LLVM 9. Workaround by guarding with `__is_class`.
Add jobify.exe and parallelize.exe
Add a "tools" directory for test/build support tools.
Add jobify.exe from the msvc repo.
Extract parts of jobify into stljobs.h, and author wrappers for other test support.
Add parallelize.exe which runs a command in parallel over all inputs in a directory.
Teach Azure DevOps to enforce clang-format in parallel.
This is a back-compat fix for users who were saying things like
`std::memory_order::memory_order_relaxed`. As there is nothing
especially problematic about such usage, and LWG's ultimate resolution
is unknown, I'm not deprecating these enumerators at this time. If and
when this is voted into the WP in the deprecated clause, then we can
add deprecated attributes.
This mirrors a Microsoft-internal PR:
https://devdiv.visualstudio.com/DevDiv/_git/msvc/pullrequest/205250
Update the PR template to fix#117.
This adds a checkbox to the PR template mentioning
license discipline.
It clarifies the instructions regarding unchecked
and inapplicable boxes.
It fuses the "acceptance will be delayed" disclaimer
into the README checkbox.
This also rewraps the issue template (we usually wrap to 120,
but 80 is friendlier to the issue textbox) and improves the
wording by changing "Alternately" to "Alternatively".
This script runs clang-format on the sources, then runs git status --porcelain on the result, redirected to stderr. If any output goes to stderr, Azure Pipelines marks the build as failed, which enforces that no changes were made to the repo by the clang-format pass.
Resolves#88
Resolves#97.
We used to detect target platform by inspection of VCPKG_TARGET_TRIPLET, but that is no longer necessary. As a result, this enforcement can be removed.
Configured headers were flattened during configuration. This patch
keep original directory structure.
For example without this for 'deque` is replaced by `experimental/deque`.
* `array`, `basic_string`, `basic_string_view`, `valarray`, and `vector` (`span` is not yet implemented) model `contiguous_range` by defining the nested type `iterator_concept` to `contiguous_iterator_tag` in `iterator` and `const_iterator`, and specializing `pointer_traits` for those types (to fulfill `contiguous_iterator`'s `std::to_address` requirement)
* `basic_string_view` (Ditto, no `span` yet) models the exposition-only *`forwarding-range`* concept (which indicates that the validity of iterators is not bound to the lifetime of the range) by defining hidden-friend overloads of `begin` and `end` that accept rvalues
* Drive-by:
* mark the `_Unfancy` internal helper function `[[nodiscard]]`
* Remove redundant `_Can_begin` requirement from `std::ranges::_Begin::_Cpo::_Choose`
* Add test coverage to `devcrt/P0896R4_ranges_range_machinery`:
* tighten up `test_std_container`:
* `data` and `cdata` reject rvalue arguments since the returned pointer could potentially dangle (`contiguous_range` codepaths were lacking coverage)
* the `size_type` of a standard container can be other than `std::size_t` when using fancy pointers
* we should enforce that each container's iterator type models the expected concept
* Add test coverage to ensure that contiguous standard library containers model `contiguous_range` even when using an "old" fancy pointer type that does not model `contiguous_iterator`
Unions have "class type", despite that `is_class_v` is false for unions. Fixes a bug in which the behavior of `std::ranges::swap` cannot be customized for union types.
C4180 "qualifier applied to function type has no meaning; ignored" is emitted from `std::remove_reference<T>` when `T` is a function type or reference to such after applying the changes in #82. We could suppress it locally, but the warning is extremely low-value for the STL in general so let's simply suppress it globally.
This depends on compiler support that will first ship in Visual Studio 2019 16.4, so it's guarded to allow the build to work with current preview releases.
Resolves https://developercommunity.visualstudio.com/content/problem/274938/index.html
Replays VSO PR 199513, this is the last substantial change I hope to do before we can work wholly in GitHub.
* 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.