d-winsor
1b4d42ca2e
Fix initialization in test ( #1140 )
...
* Suppress unsafe-buffer-usage
2024-02-26 13:17:12 -08:00
Dmitry Kobets
9face82309
Remove unnecessary check from size_bytes() ( #1105 )
...
`size_bytes()` returns the span's size in bytes.
Assuming the span was constructed with an accurate size parameter, the check `size() < dynamic_extent / sizeof(element_type)` isn't required, since `size_t(-1)` (which is `dynamic_extent`) represents the size of the address space, so the number of bytes will never exceed it and in practice won't even come close.
Otherwise, it is not actually feasible to detect cases when the size parameter does not correspond to the dimensions of the underlying data pointer. In these cases, the relationship `size() < dynamic_extent / sizeof(element_type)` is simply one of many ways in which the `size()` could be incorrect, and serves no necessary purpose.
Resolves #1012
2023-05-09 09:05:26 -07:00
Dmitry Kobets
1d036585cc
Add testcase for #1100 ( #1101 )
2023-03-30 11:10:15 -07:00
Werner Henze
7a297d4283
Extend docs and tests for span ctor ( #1096 )
2023-02-21 15:46:40 -08:00
Werner Henze
9851b94d7e
add some span test for constructor from other span ( #1093 )
...
More combinations with dynamic_extent or fixed extent for higher coverage.
2023-02-17 13:05:40 -08:00
dmitrykobets-msft
383723676c
Make gsl::span's iterators use the contiguous_iterator concept ( #1035 )
...
Resolves #1016
Co-authored-by: Casey Carter <Casey@Carter.net>
2022-03-22 13:20:54 -07: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
Jordan Maples [MSFT]
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
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
Jordan Maples
72803a7ecb
adding template type to the vector to suppress clang-10 warning that vector may not intend for type deduction.
2020-05-29 15:45:25 -07:00
Jordan Maples
4d2090ebc4
fixed typo
2020-05-29 10:54:13 -07:00
Jordan Maples
c4a2ce6cc8
wrapping string_view checks in deduction guide checks to prevent 'macro unused' errors
2020-05-29 10:53:30 -07:00
Casey Carter
c143a07f61
Add string_view test case and modify deduction guides
2020-05-28 18:00:40 -07:00
Jordan Maples
6c405a1b7f
adding a test to verify that the additional ctad works
2020-05-28 17:18:08 -07:00
Jordan Maples
25e7af9c7d
fixing clang build break
2020-05-20 17:52:03 -07:00
Jordan Maples
1e44481646
Finished integrating CaseyCarter's changes into span
2020-05-20 13:37:42 -07:00
Jordan Maples
552cd20472
addressing most of Casey's comments
2020-05-20 10:59:57 -07:00
Jordan Maples
2085c7acde
initial impl of P1976R2
2020-05-19 16:27:46 -07:00
Jordan Maples
7341c5d1b5
implement LWG3320 by deleting const_iterator and const_reverse_iterator
2020-04-14 13:51:49 -07:00
Jordan Maples [MSFT]
94f43d4adf
splitting up span's standard and non-standard behavior
2020-02-19 14:28:12 -08:00
Jordan Maples [MSFT]
41ae38f197
addressing a few more comments and adding gsl-std span compatibility tests
2020-02-14 15:24:46 -08:00
Jordan Maples [MSFT]
926aaeca56
reviewed the pr in its entirety and made some slight modifications. Removed all members and fields marked as deprecated.
2020-02-11 16:36:07 -08:00
Jordan Maples [MSFT]
d8fa68c4a5
address build failures
2020-02-07 14:40:09 -08:00
Jordan Maples [MSFT]
377b2db537
almost parity with std::span
2020-02-07 14:09:57 -08:00
Jordan Maples [MSFT]
a49ff1b8df
update span specialization of at, change some tests back to int i with narrowing for the comparisons.
2020-02-05 17:12:31 -08:00
Jordan Maples [MSFT]
45f016d96f
add back capture variable for comparison in span_test
2020-02-05 14:41:41 -08:00
Jordan Maples [MSFT]
7fcc142ffc
addressing travis errors
2020-02-05 14:32:08 -08:00
Jordan Maples [MSFT]
432be4852c
captureing result of iterator comparisons to address -Wunused-comparison
2020-02-05 13:59:48 -08:00
Jordan Maples [MSFT]
5cf1610cfe
prevent overflow in size_bytes. fix compilation issue for clang 3.6 and 3.7
2020-02-05 12:58:49 -08:00
Jordan Maples [MSFT]
d7e1611137
gsl::index ptrdiff_t -> size_t. remove span::at span::operator().
2020-02-04 16:53:43 -08:00
Jordan Maples [MSFT]
5a1e4f3953
update index_type to size_type, fix a couple Expects
2020-02-04 15:31:33 -08:00
Jordan Maples [MSFT]
eabd9358f0
addressing some comments
2020-02-03 12:46:37 -08:00
Jordan Maples [MSFT]
ad71477183
fix build breaks
2020-02-03 12:26:15 -08:00
Jordan Maples [MSFT]
c31593dd0d
updating from test loop from int to size_t
2020-02-03 11:01:24 -08:00
Jordan Maples [MSFT]
8579165d0a
change span from signed to unsigned to align to std
2020-02-03 10:56:31 -08:00
Roelf-Jilling
81f56796a1
MSVC and CoreChecker warning suppression for tests to CMake
...
Suppress CppCoreCheck warnings on GTest macros.
Suppress CppCoreCheck advice to use the GSL
2020-01-16 11:49:15 +01:00
Roelf-Jilling
d08ff53e61
Use [[maybe_unused]] with C++17
2020-01-16 11:49:15 +01:00
Roelf-Jilling
186f5d21c1
Move compiler warning suppression for tests from cpp files to CMake
2020-01-16 11:49:00 +01:00
Jordan Maples [MSFT]
395a5bf550
Merge branch 'master' into dev/jomaples/add_missing_span_functions
2020-01-10 10:20:37 -08:00
Jordan Maples [MSFT]
a1e6fcbc46
Merge branch 'master' into dev/jomaples/deprecate_span_non_std_functions
2020-01-09 16:39:24 -08:00
Jordan Maples [MSFT]
2d878b94ee
Merge branch 'master' into dev/jomaples/add_missing_span_functions
2020-01-09 16:37:12 -08:00
Jordan Maples [MSFT]
b076205338
Merge branch 'dev/jomaples/deprecate_span_non_std_functions' of https://github.com/JordanMaples/GSL into dev/jomaples/deprecate_span_non_std_functions
2020-01-09 14:40:08 -08:00
Jordan Maples [MSFT]
75936c3109
missed from the merge
2020-01-09 12:56:00 -08:00
Jordan Maples [MSFT]
cfd82aef4e
deprecating span::at and span::operator()
2020-01-09 12:51:28 -08:00
Jordan Maples [MSFT]
4b823b1651
adding front and back
2020-01-09 12:03:27 -08:00
Martijn Otto
fa8a8117a0
Add tests for free-standing iterator and size functions
2020-01-08 21:02:02 +01:00
Jordan Maples [MSFT]
f04907c2f6
added suppression for missing destructor override
2020-01-08 10:13:00 -08:00
Jordan Maples [MSFT]
8577033f13
addressing comments
2019-12-19 14:05:02 -08:00
Jordan Maples [MSFT]
6c5c708877
change from string to char*
2019-12-12 16:48:59 -08:00
Jordan Maples [MSFT]
5099e8fa3e
removed string_view for string in tests
2019-12-12 11:15:41 -08:00