terminal/src/host/ut_host
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
..
AliasTests.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
ApiRoutinesTests.cpp Reintroduce a color compatibility hack, but only for PowerShells (#6810) 2020-07-10 15:25:39 -07:00
AttrRowTests.cpp Make the conversion from WORD to TextAttribute explicit (#6380) 2020-06-05 23:20:32 +00:00
CharRowBaseTests.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
ClipboardTests.cpp Abstract GetTextForClipboard() for UIA (#4578) 2020-03-09 08:17:34 -07:00
CodepointWidthDetectorTests.cpp Replace CodepointWidthDetector's runtime table with a static one (#2368) 2019-08-16 10:54:17 -07:00
CommandLineTests.cpp Move to GSL 3.1.0 (#6908) 2020-07-14 18:30:59 +00:00
CommandListPopupTests.cpp Replace casting 0 to a pointer with nullptr (#5062) 2020-03-23 09:38:39 -07:00
CommandNumberPopupTests.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
ConptyOutputTests.cpp Improve the propagation of color attributes over ConPTY (#6506) 2020-07-01 11:10:36 -07:00
ConsoleArgumentsTests.cpp Remove the WinTelnetEngine (#6526) 2020-06-17 16:29:49 +00:00
CopyFromCharPopupTests.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
CopyToCharPopupTests.cpp Replace casting 0 to a pointer with nullptr (#5062) 2020-03-23 09:38:39 -07:00
DbcsTests.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
DefaultResource.rc Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
HistoryTests.cpp Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
Host.UnitTests.vcxproj Create tests that roundtrip output through a conpty to a Terminal (#4213) 2020-01-17 16:40:12 +00:00
Host.UnitTests.vcxproj.filters Prevent cleanup of object given to handle that failed access check (#3414) 2019-11-05 14:22:55 -08:00
InitTests.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
InputBufferTests.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
ObjectTests.cpp Improve the legacy color conversions (#6358) 2020-06-08 19:05:06 +00:00
OutputCellIteratorTests.cpp Merged PR 4915574: console: switch to /Zc:wchar_t (native wchar_t) 2020-07-13 23:04:32 +00:00
PopupTestHelper.hpp Replace macros with constexpr part 2 (#3416) 2019-11-04 07:37:47 -06:00
product.pbxproj Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
ReadWaitTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
RendererTests.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
ScreenBufferTests.cpp Add support for the "faint" graphic rendition attribute (#6873) 2020-07-13 17:44:09 +00:00
SearchTests.cpp Migrate Search module as a shared component for Terminal Search (#3279) 2019-11-14 14:36:41 -08:00
SelectionTests.cpp Move rect expansion to textbuffer; refactor selection code (#4560) 2020-02-27 16:42:26 -08:00
sources Merged PR 4645239: [Git2Git] Merged PR 4644345: conhost: disable the DX renderer in inbox builds 2020-05-05 23:03:07 +00:00
testmd.definition Integrate inbox changes up to 68d3b53286dd 2019-12-02 17:24:26 -08:00
TextBufferIteratorTests.cpp Fix SGR indexed colors to distinguish Indexed256 color (and more) (#5834) 2020-05-27 22:34:45 +00:00
TextBufferTests.cpp Refactor the renderer color calculations (#6853) 2020-07-10 22:26:34 +00:00
TitleTests.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
Utf8ToWideCharParserTests.cpp Compensate for non-minimal UTF-8 encodings (#3380) 2019-10-31 10:50:34 -07:00
Utf16ParserTests.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
UtilsTests.cpp Replace old C headers (xxx.h) with modern ones (cxxx) (#5080) 2020-07-01 11:00:24 -07:00
ViewportTests.cpp Make the RIS command clear the display and scrollback correctly (#2367) 2019-08-27 18:45:38 -07:00
VtIoTests.cpp Improve the propagation of color attributes over ConPTY (#6506) 2020-07-01 11:10:36 -07:00
VtRendererTests.cpp Add support for the "faint" graphic rendition attribute (#6873) 2020-07-13 17:44:09 +00:00