Jordan Maples
7721de88f3
ran clang-format over string_span
2020-10-01 14:08:01 -07:00
Jordan Maples
a64c489c78
added deprecation message
2020-10-01 14:04:04 -07:00
Jordan Maples
5e773556fe
initial deprecation of all types in string_span
2020-09-30 16:39:33 -07:00
Jordan Maples
e7e3bf4f5f
add what to narrowing_error
2020-09-14 15:50:46 -07:00
Jordan Maples
5fb0c8611e
constexpr string_span stuff
2020-08-27 13:21:35 -07:00
Jordan Maples
4a4bb3c13a
adding changes suggested by Jonathan Wakely
2020-08-26 16:51:58 -07:00
Jordan Maples [MSFT]
6aa755e9ce
Merge pull request #913 from jwakely/notnull_hash
...
Pass correct value to std::hash
2020-08-20 15:32:22 -07:00
Pascal Menuet
c25a7544b8
Fix finally with mutable lvalue invokable
2020-08-14 16:24:10 +02:00
Jordan Maples [MSFT]
06c46195ee
Merge pull request #910 from JordanMaples/exception_fix_new_file
...
exception free - Version 2
2020-08-13 16:35:04 -07:00
Jonathan Wakely
e09326eefd
Pass correct value to std::hash
2020-08-13 12:59:01 +01:00
Jonathan Wakely
d09f1544fd
Fix comment typos
2020-08-13 10:46:39 +01:00
Jordan Maples
74968d3ef8
Merge branch 'master' into exception_fix_new_file
2020-08-12 17:14:13 -07:00
Jordan Maples [MSFT]
0c80f51f7c
Merge pull request #908 from JordanMaples/fix_nodiscard_in_finally_macro
...
Finally [[nodiscard]] - Version 2
2020-08-12 15:49:55 -07:00
Jordan Maples [MSFT]
ef714fa49e
Merge pull request #676 from ericLemanissier/patch-3
...
fix requirement on not_null template
2020-08-12 15:28:25 -07:00
Jordan Maples
4da6a264c4
forgot newline at eof.
2020-08-12 13:22:33 -07:00
Jordan Maples
2469db7a5a
add copyright header
2020-08-12 13:14:53 -07:00
Jordan Maples
afe824490e
change macro test to use __cplusplus instead of __has_cpp_attribute
2020-08-12 12:13:19 -07:00
Jordan Maples
72ddfb7a40
created new file for gsl_narrow, might want to rename if we go this approach to have all exception prone logic to live here
2020-08-11 17:11:14 -07:00
Jordan Maples
01eaf5bef1
macro version
2020-08-10 16:45:47 -07:00
Werner Henze
2231d733c6
zstring_span: fix for Expects, simplify functions
...
- `s[s.size() - 1]` is wrong for empty `s`, so `Expects(s.size() > 0)`
- no hard coded `'\0'`but `value_type{}`
- hard code `empty()` to return `false`
- simplify `as_string_span`: can never be `empty`
- clarify comment on `ensure_z`
2020-08-06 11:25:29 +02:00
Jordan Maples [MSFT]
f8d9f2e2e3
Merge pull request #906 from TManhente/intel_suppress_fix
...
Fix GSL_SUPPRESS definition on Intel C++ Compiler
2020-08-05 15:35:26 -07:00
Jordan Maples [MSFT]
552eedb390
Merge pull request #881 from robert-andrzejuk/patch-1
...
Refactor `narrow`.
2020-08-05 15:16:25 -07:00
Thiago M. de C. Marques
ca3bf7710f
Fix GSL_SUPPRESS definition on Intel C++ Compiler
...
Intel C++ Compiler defines the `_MSC_VER` macro, but it doesn't support `[[gsl::*]]` attributes.
2020-08-05 18:30:24 -03:00
Jordan Maples [MSFT]
559f8cfaae
Merge pull request #899 from JordanMaples/dev/jomaples/cleanup_namespaces
...
cleanup gsl namespace qualification for dynamic_extent.
2020-07-15 14:56:54 -07:00
Jordan Maples [MSFT]
f79ed1bb5c
Merge pull request #876 from beinhaerter/make_notnull_noexcept
...
noexcept for make_(strict_)not_null and not_null comparisons
2020-07-15 14:36:17 -07:00
Jordan Maples
4c66cea06c
remove gsl namespace qualification within the gsl namespace
2020-07-15 13:11:57 -07:00
Jordan Maples
478d876951
remove pragma pop for constexpr macro
2020-07-15 11:43:29 -07:00
Jordan Maples
853b061141
remove msvc < 1910 checks as those versions are no longer supported.
2020-07-15 11:38:41 -07:00
Casey Carter
c143a07f61
Add string_view test case and modify deduction guides
2020-05-28 18:00:40 -07:00
Jordan Maples
689abc2982
adding container ctad
2020-05-28 14:04:31 -07:00
Jordan Maples [MSFT]
0dbdf322fa
Merge pull request #886 from JordanMaples/dev/jomaples/build_matrix
...
compiler support revision
2020-05-26 15:14:08 -07:00
Jordan Maples [MSFT]
283e31478f
Merge pull request #857 from pps83/master-natvis
...
Fix debugger visualizer for Ext=gsl::dynamic_extent
2020-05-21 11:32:45 -07:00
Jordan Maples
25e7af9c7d
fixing clang build break
2020-05-20 17:52:03 -07:00
Jordan Maples
7e4ed8da98
addressing Stephan's comments
2020-05-20 16:50:50 -07:00
Jordan Maples
313a1121bf
fix spacing
2020-05-20 15:46:20 -07:00
Jordan Maples
1e44481646
Finished integrating CaseyCarter's changes into span
2020-05-20 13:37:42 -07:00
Jordan Maples
ed3fea6d93
implementing some of Casey's recommendations
2020-05-20 13:11:37 -07:00
Jordan Maples
d3468230b1
renaming extent to prevent shadowing of static member
2020-05-20 12:29:56 -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
f0160fcb1b
removing breaking test code. removing compiler versions n-2 and beyond from travis script. Updating XCode 11.3 to 11.4
2020-05-13 14:49:17 -07:00
Jordan Maples [MSFT]
2a483c1728
Update span
2020-05-13 11:13:14 -07:00
Jordan Maples
031231466d
pushing bad code that only reveals itself in gcc < 6 to test the allow_failures logic in travis
2020-05-13 11:04:11 -07:00
Jordan Maples
09caa20d99
changing matrices and removing msc < 1910 work arounds
2020-05-12 16:21:55 -07:00
Robert Andrzejuk
84847041ee
In narrow
refactor !is_same_signedness
to is_different_signedness
2020-04-29 20:39:44 +02:00
Robert Andrzejuk
1e5f44d3ea
Refactor narrow
- simplify & move is_same_signedness
into function, remove uneeded detail
namespace. Merge 2 if
's with a ||
.
2020-04-29 20:11:44 +02:00
Werner Henze
29297e7dac
noexcept for make_(strict_)not_null and not_null comparisons
2020-04-27 14:42:56 +02:00
Jordan Maples [MSFT]
1999b48a51
Merge pull request #870 from beinhaerter/suppress_span_warning
...
suppress code analysis warning
2020-04-23 10:13:33 -07:00
Jordan Maples [MSFT]
3da256d03b
Merge pull request #874 from JordanMaples/dev/jomaples/multi_span-cleanup
...
Minor changes to multi_span
2020-04-23 10:13:04 -07:00
Nicholas Londey
14acdcd7a8
Removed unused #include
2020-04-23 12:22:30 +10:00
Jordan Maples [MSFT]
70e1317ab6
Update include/gsl/gsl
2020-04-22 15:27:00 -07:00
Nicholas Londey
61534ca3ad
Changed implementation of gsl::narrow to throw gsl::narrowing_error
...
Implementation now behaves as described in the C++ Core Guidlines
2020-04-22 10:09:13 +10:00
Jordan Maples
afa2f3fd9a
fully qualify ptrdiff_t in multi_span and remove it from gsl\gsl
2020-04-21 16:14:58 -07:00
Werner Henze
fb1243d735
suppress code analysis warning
...
- suppress " warning C26481: Don't use pointer arithmetic. Use span instead (bounds.1)."
- Please note that the suppression in `end()` does not work with MSVC 16.5.4.
2020-04-19 16:41:12 +02:00
Jordan Maples
9cb376c050
adding back free functions for [c|cr][begin|end]
2020-04-14 16:57:12 -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]
044849d6fa
Merge pull request #823 from RedDwarf69/std_byte_fix
...
Add missing #include if built with GSL_USE_STD_BYTE=1
2020-04-13 11:33:56 -07:00
Jordan Maples
f85166aa8b
Merge branch 'master' into dev/jomaples/LWG3255
2020-04-09 09:53:45 -07:00
Farwaykorse
6e2398b524
Solve MSVC warning C4668: __GNUC__ & __clang__ not defined as a preprocessor macro
...
MSVC compiler warning C4668:
` '__clang__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'`
2020-04-09 03:15:57 +02:00
Pavel P
830b081de7
Fix debugger visualizer for Ext=gsl::dynamic_extent
...
VS 2019 doesn't seem to match -1 for size_t template parameter, as a result dynamic span/basic_string_span/basic_zstring_span show extent as `extent = 4294967295` (for 32-bit builds). This change updates details::extent_type to have static constexpr size_ parameter for non-dynamic span/basic_string_span/basic_zstring_span and simplifies/removes dynamic versions from GSL.natvis
fixes #856
2020-03-28 01:59:04 +06:00
Jordan Maples
f8bcb7d9eb
applied clang-format
2020-03-17 15:04:58 -07:00
Jordan Maples
9b3ac8d681
discussed the issue with Casey Carter, the span ctor changes are accurate but the tests are not. The test require work that was done in C++17 regarding qualifier conversions to work correctly. Scoping tests for 17.
2020-03-17 15:02:00 -07:00
Jordan Maples
1dd1320c8b
test commit to get extra eyes on the problem
2020-03-17 13:53:13 -07:00
Jordan Maples
06adf557e9
update kernel mode detection macro
2020-03-12 12:32:32 -07:00
Jordan Maples
ce4d689f4f
shuffle around code to bring includes to top.
2020-03-06 11:22:09 -08:00
Jordan Maples
b30524088a
added some comments and ran clang-format
2020-03-06 11:17:58 -08:00
Jordan Maples
769f01900d
moving exception include
2020-03-03 17:04:46 -08:00
Jordan Maples [MSFT]
4a6a7a095d
add back array header, will remove in separate pr
2020-02-25 14:09:29 -08:00
Jordan Maples [MSFT]
fc54e0d89a
just pulling in array header if we detect apple clang
2020-02-25 13:39:47 -08:00
Jordan Maples [MSFT]
32e5fea6ac
test
2020-02-24 14:47:45 -08:00
Jordan Maples [MSFT]
0f60c68ab9
disgusting test to get apple clang to work, dont look at it
2020-02-24 14:41:29 -08:00
Jordan Maples [MSFT]
60372b6468
apple-clang failed again, forcing class instead of struct
2020-02-24 13:43:42 -08:00
Jordan Maples [MSFT]
89271b89c1
fix apple clang forward declaration
2020-02-24 13:06:01 -08:00
Jordan Maples [MSFT]
ac37004274
clang defines struct as array where msvc and g++ define it as class.
2020-02-24 11:45:33 -08:00
Jordan Maples [MSFT]
3144082909
forward declare span and remove header
2020-02-24 11:16:26 -08: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]
46603698ec
rewrite operators in iterator to take advantage of nrvo
2020-02-18 15:36:15 -08:00
Jordan Maples [MSFT]
f4c608fd39
addressing comments
2020-02-18 14:09:11 -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]
cce6ee563e
address issue with v140 toolset
2020-02-10 17:09:58 -08:00
Jordan Maples [MSFT]
dd78144c2e
msvc and gcc work locally
2020-02-10 13:17:22 -08:00
Jordan Maples [MSFT]
d8fa68c4a5
address build failures
2020-02-07 14:40:09 -08:00
Jordan Maples [MSFT]
b81d6e40e1
constexpr the make_subspan calls.
2020-02-07 14:15:44 -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]
3b9d15f49f
reverting changes to gsl::index
2020-02-05 17:02:23 -08:00
Jordan Maples [MSFT]
ff5f7973a2
remove brackets around this deref for span_iterator operators
2020-02-05 14:36:34 -08:00
Jordan Maples [MSFT]
7fcc142ffc
addressing travis errors
2020-02-05 14:32:08 -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]
61c6ef8d42
remove index_type from string_span, update comments
2020-02-04 13:30:03 -08:00
Jordan Maples [MSFT]
db2134485a
Merge branch 'dev/jomaples/unsigned' of https://github.com/jordanmaples/gsl into dev/jomaples/unsigned
2020-02-04 12:01:30 -08:00
Jordan Maples [MSFT]
0c6ce424ab
refactoring index_type to size_type, changing expects
2020-02-04 12:01:27 -08:00
Jordan Maples [MSFT]
e9fea77bcb
Update include/gsl/span
...
Co-Authored-By: Casey Carter <cartec69@gmail.com>
2020-02-03 18:31:50 -08:00
Jordan Maples [MSFT]
4ec7058b56
Update include/gsl/span
...
Co-Authored-By: Casey Carter <cartec69@gmail.com>
2020-02-03 18:31:21 -08:00
Jordan Maples [MSFT]
49e7ed1ebf
updating comparisons
2020-02-03 18:27:09 -08:00
Jordan Maples [MSFT]
592c28c6d1
fixing spaces in gsl_suppress
2020-02-03 18:18:14 -08:00
Jordan Maples [MSFT]
877816faa4
addressing feedback
2020-02-03 18:16:41 -08:00