terminal/src/cascadia/TerminalCore
Dustin L. Howett 54a7fce3e0
Move to GSL 3.1.0 (#6908)
GSL 3, the next major version of GSL after the one we're using, replaced
their local implementation of `span` with one that more closely mimics
C++20's span. Unfortunately, that is a breaking change for all of GSL's
consumers.

This commit updates our use of span to comply with the new changes in
GSL 3.

Chief among those breaking changes is:

* `span::at` no longer exists; I replaced many instances of `span::at`
  with `gsl::at(x)`
* `span::size_type` has finally given up on `ptrdiff_t` and become
  `size_t` like all other containers

While I was here, I also made the following mechanical replacements:

* In some of our "early standardized" code, we used std::optional's
  `has_value` and `value` back-to-back. Each `value` incurs an
  additional presence test.
  * Change: `x.value().member` -> `x->member` (`optional::operator->`
    skips the presence test)
  * Change: `x.value()` -> `*x` (as above)
* GSL 3 uses `size_t` for `size_type`.
  * Change: `gsl::narrow<size_t>(x.size())` -> `x.size()`
  * Change: `gsl::narrow<ptrdiff_t>(nonSpan.size())` -> `nonSpan.size()`
    during span construction

I also replaced two instances of `x[x.size() - 1]` with `x.back()` and
one instance of a manual array walk (for comparison) with a direct
comparison.

NOTE: Span comparison and `make_span` are not part of the C++20 span
library.

Fixes #6251
2020-07-14 18:30:59 +00:00
..
lib Apply audit mode to TerminalConnection/Core/Settings and WinCon… (#4016) 2020-01-03 10:44:27 -08:00
ControlKeyStates.hpp Manually pass mouse wheel messages to TermControls (#5131) 2020-04-01 16:58:16 +00:00
ITerminalApi.hpp Add support for DECSCNM in Windows Terminal (#6809) 2020-07-09 11:25:30 +00:00
ITerminalInput.hpp Add support for win32-input-mode to conhost, ConPTY, Terminal (#6309) 2020-06-08 22:31:28 +00:00
packages.config deps: upgrade CppWinRT to 2.0.200316.3, gsl to v2.1.0 (#4536) 2020-03-23 17:15:24 +00:00
pch.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
pch.h Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
Terminal.cpp Move to GSL 3.1.0 (#6908) 2020-07-14 18:30:59 +00:00
Terminal.hpp Refactor the renderer color calculations (#6853) 2020-07-10 22:26:34 +00:00
TerminalApi.cpp Add support for DECSCNM in Windows Terminal (#6809) 2020-07-09 11:25:30 +00:00
terminalcore-common.vcxitems Unify and clean up the common build properties (#3429) 2019-11-05 14:29:11 -08:00
TerminalDispatch.cpp Add support for DECSCNM in Windows Terminal (#6809) 2020-07-09 11:25:30 +00:00
TerminalDispatch.hpp Add support for DECSCNM in Windows Terminal (#6809) 2020-07-09 11:25:30 +00:00
TerminalDispatchGraphics.cpp Add support for the "faint" graphic rendition attribute (#6873) 2020-07-13 17:44:09 +00:00
terminalrenderdata.cpp Refactor the renderer color calculations (#6853) 2020-07-10 22:26:34 +00:00
TerminalSelection.cpp Refactor the renderer color calculations (#6853) 2020-07-10 22:26:34 +00:00