Casey Carter
d9ffa118c5
Properly handle finally(actual_function) ( #1056 )
...
`finally` needs to use `decay_t` instead of `remove_cvref_t` so it can properly accept non-object function arguments by decaying to function pointer type. Adds test coverage for this use case which was previously missing.
2022-09-29 08:59:05 -07:00
Dmitry Kobets
8840d87199
Merge remote-tracking branch 'origin/main' into final_action-revision
2022-09-26 15:27:01 -07:00
Herb Sutter and Casey Carter
d569ed65d0
Add remove_cv too per Casey's suggestion
...
Co-authored-by: Casey Carter <Casey@Carter.net >
2022-08-31 16:48:13 -07:00
Herb Sutter
352f73df92
Applying Casey's an Dmitry's changes...
2022-08-31 16:24:05 -07:00
Herb Sutter
3865bac469
Made noexcept-consistent
2022-08-30 16:08:07 -07:00
Herb Sutter
6b284bf500
Applying Casey's suggestions
...
Applying @CaseyCarter's suggested forwarding changes
And adding `[[nodiscard]]` on `finally`
Thanks Casey -- somehow this slipped through the cracks for a year.
2022-08-30 16:05:09 -07:00
dmitrykobets-msft
330583f478
Resolve MSVC warning C5260 ( #1049 )
...
* Test solution
* Mark dynamic_extent as inline, compiler-version-permitting
2022-07-18 17:42:21 -07:00
Werner Henze and Werner Henze
4377f6e603
quoted form of #include when GSL includes GSL files ( #1030 )
...
[SF.12: Prefer the quoted form of #include for files relative to the including file and the angle bracket form everywhere else](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rs-incform )
Additionally changed #include order in `span` so that all `span_ext` is in the GSL include block and not in the STL include block.
Fixes issues #1025 .
Co-authored-by: Werner Henze <w.henze@avm.de >
2022-01-31 13:06:42 -08:00
dmitrykobets-msft
bcf008ae55
Fix/implement C++2020 compilation, tests, and CI ( #1017 )
...
* Fix C++20 bugs and tests
* Rework CI for C++2020 tests
* Update readme compiler versions
2021-12-09 14:54:06 -08:00
Jean-Michaël Celerier
f09b24970d
Fix gsl/util for c++20 compilers without <span> ( #993 )
...
For instance, clang 10 sets __cplusplus >= 202002L yet does not have span, which causes build errors:
https://gcc.godbolt.org/z/Yq345zGea
2021-09-15 15:12:11 -07:00
Jordan Maples [MSFT] and Jordan Maples
b26f6d5ec7
gsl::at behavior change regarding gsl::span ( #985 )
...
* move span specialization of 'at' to <gsl/span> and update the parameter to be taken by reference
* undid previous changes and acted upon decisions made in maintainer sync. Fixed tests failing in /kernel mode
* ran clang-format on the include folder
* ran clang-format on the test folder
Co-authored-by: Jordan Maples <jordan.maples@microsoft.com >
2021-05-20 18:18:08 -07:00
Herb Sutter
020ddc40c5
Fine, make it move-constructible (only)
...
To satisfy some compilers.
And might as well reinstate that test case.
2021-02-24 16:49:57 -08:00
Herb Sutter
f59cb795a0
Figured out test failures, removed move test
...
We shouldn't be moving these `final_action`s around, that wasn't part of the C++CG design requirements.
Went back to the simple version of `final_action`.
2021-02-24 16:42:58 -08:00
Herb Sutter
e9c575300e
Defaulted copying
2021-02-24 16:12:13 -08:00
Herb Sutter
39e956b9b1
Restored copyability to final_action
2021-02-24 16:08:02 -08:00
Herb Sutter
4cd8873d3e
Clean up final_act and finally, closes #752 and #846
2021-02-24 15:51:29 -08:00
Jordan Maples [MSFT]
a150aaa4ed
renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format ( #946 )
...
Header rename
2020-10-29 17:38:48 -07:00