{"id":25836,"date":"2020-04-16T11:00:56","date_gmt":"2020-04-16T11:00:56","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=25836"},"modified":"2020-06-04T21:00:14","modified_gmt":"2020-06-04T21:00:14","slug":"gsl-3-0-0-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/gsl-3-0-0-release\/","title":{"rendered":"GSL 3.0.0 Release"},"content":{"rendered":"<h2>Update<\/h2>\n<p>June 4th, 2020 &#8211; GSL version 3.1.0 has been released. Please see the latest <a href=\"https:\/\/github.com\/microsoft\/GSL\/releases\/tag\/v3.1.0\">release page<\/a> for information regarding GSL 3.1.0. For all future updates, please see refer to the <a href=\"https:\/\/github.com\/microsoft\/gsl\/releases\">release page<\/a> on GitHub.<\/p>\n<p>&nbsp;<\/p>\n<h2>GSL 3.0.0 Release<\/h2>\n<p>Version 3.0.0 of Microsoft&#8217;s implementation of the <a href=\"https:\/\/github.com\/microsoft\/GSL\">C++ Core Guidelines Support Library<\/a> (GSL) is now available for you to download on the <a href=\"https:\/\/github.com\/microsoft\/gsl\/releases\">releases page<\/a>. Microsoft\u2019s implementation of <code>gsl::span<\/code> has played a pivotal role in the standardization of span for C++20. However, the standard does not provide any runtime checking guarantees for memory bounds safety. The bounds safety provided by <code>gsl::span<\/code> has been very successful in preventing security issues in Microsoft products. This release maintains the safety guarantees that we have always offered but modernizes our implementation to align with C++20 span.<\/p>\n<h2>What changed in this release?<\/h2>\n<ul>\n<li>New implementations of <code>gsl::span<\/code> and <code>gsl::span_iterator<\/code> that align to the C++ 20 standard.<\/li>\n<li>Changes to contract violation behavior.<\/li>\n<li>Additional CMake support.<\/li>\n<li>Deprecation of <code>gsl::multi_span<\/code> and <code>gsl::strided_span<\/code>.<\/li>\n<\/ul>\n<h2>When should I use gsl::span instead of std::span?<\/h2>\n<p><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentStart SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">By default, use\u00a0<\/span><\/span><code><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2 SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">std::<\/span><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">span<\/span><\/span><\/code><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">which\u00a0<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">is shipping in VS2019 16.6<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0(<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">with additional interface changes in 16.7,\u00a0<\/span><\/span><a class=\"Hyperlink SCXW246201816 BCX0\" href=\"https:\/\/github.com\/microsoft\/STL\/wiki\/Changelog\" target=\"_blank\" rel=\"noreferrer noopener\"><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-charstyle=\"Hyperlink\" data-wac-het=\"1\">see release notes<\/span><\/span><\/a><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">)<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0if you have enabled C++20 mode and do not need runtime bounds checking guarantees<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">.<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0Use<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0<\/span><\/span><code><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SpellingErrorV2 SpellingErrorHighlight SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">gsl<\/span><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">::span<\/span><\/span><\/code><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">if you need support for a ver<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">s<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">ion of C++ lower than C++20 (<\/span><\/span><code><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SpellingErrorV2 SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">gsl<\/span><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">::span<\/span><\/span><\/code><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">supports C++14 and\u00a0<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">higher) or<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">runtime bounds checking guarantees (a<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">ll operations performed on\u00a0<\/span><\/span><code><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SpellingErrorV2 SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">gsl<\/span><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">::span<\/span><\/span><\/code><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0and its iterators have explicit bounds safety checks.<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">)<\/span><\/span><span class=\"TextRun SCXW246201816 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW246201816 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0<\/span><\/span><span class=\"EOP SCXW246201816 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true}\" data-wac-het=\"1\">\u00a0<\/span><\/p>\n<h2>gsl::span<\/h2>\n<p>With the standardization of span nearing completion, we decided it was time to align our implementation with the design changes in the standard. The new implementation provides full bounds checking, guaranteeing bounds safety if the underlying data is valid.<\/p>\n<h3>General changes<\/h3>\n<p><code>gsl::span<\/code> was rewritten to have its interface align to <code>std::span<\/code>. The biggest change is that span&#8217;s Extent is now unsigned. It is now implemented as <code>std::size_t<\/code> whereas previously it was <code>std::ptrdiff_t.<\/code> By extension, <code>dynamic_extent<\/code> is now defined as <code>static_cast&lt;std::size_t&gt;(-1)<\/code> instead of just <code>-1<\/code>.<\/p>\n<ul>\n<li>The field <code>span::index_type<\/code> was removed, superseded by <code>span::size_type<\/code>.<\/li>\n<li>Addition of Class Template Argument Deduction (CTAD) support.<\/li>\n<\/ul>\n<h3>Interface alignment<\/h3>\n<p>These are the changes required to align <code>gsl::span<\/code> to the interface of <code>std::span<\/code>.<\/p>\n<h4>Removed functions<\/h4>\n<ul>\n<li><code>span::operator()<\/code><\/li>\n<li><code>span::at<\/code><\/li>\n<li><code>span::cbegin<\/code><\/li>\n<li><code>span::cend<\/code><\/li>\n<li><code>span::crbegin<\/code><\/li>\n<li><code>span::crend<\/code><\/li>\n<\/ul>\n<h4>Added functions<\/h4>\n<ul>\n<li><code>span::front<\/code><\/li>\n<li><code>span::back<\/code><\/li>\n<\/ul>\n<h4>Renamed functions<\/h4>\n<ul>\n<li><code>span::as_writeable_bytes<\/code> was renamed to <code>span::as_writable_bytes<\/code><\/li>\n<\/ul>\n<h2>gsl::span_iterator<\/h2>\n<h3>General changes<\/h3>\n<p>Our implementation of <code>span_iterator<\/code> has been completely rewritten to be more range-like. Previously, the implementation consisted of a span pointer and an offset. The new implementation is a set of three pointers: begin, end, and current.<\/p>\n<h3>Benefits of our new implementation<\/h3>\n<p>The new implementation can perform all of the bounds checks by itself, instead of calling into the span. By relying on pointers to the underlying data, rather than a pointer to the span, the new <code>span_iterator<\/code> can outlive the underlying span.<\/p>\n<h2>The new &lt;gsl\/span_ext&gt; header<\/h2>\n<p>The &lt;gsl\/span_ext&gt; header was created to support our customers who rely on portions of the old span implementation that no longer exist in the standard definition of span.<\/p>\n<h3>Elements moved from &lt;gsl\/span&gt; and inserted into &lt;gsl\/span_ext&gt;<\/h3>\n<ul>\n<li>span comparison operators<\/li>\n<li><code>gsl::make_span<\/code><\/li>\n<li>span specialization of <code>gsl::at<\/code><\/li>\n<li><code>gsl::begin<\/code><\/li>\n<li><code>gsl::rbegin<\/code><\/li>\n<li><code>gsl::crbegin<\/code><\/li>\n<li><code>gsl::end<\/code><\/li>\n<li><code>gsl::rend<\/code><\/li>\n<li><code>gsl::crend<\/code><\/li>\n<\/ul>\n<h2>Contract violations<\/h2>\n<p>Contract violations are no longer configurable. Contract violations always result in termination, rather than providing a compile-time option to throw or disregard the contract violation. This is subject to change in the future. Some concerns over this decision have been raised and the conversation continues here: <a href=\"https:\/\/github.com\/isocpp\/CppCoreGuidelines\/issues\/1561\">CppCoreGuidelines#1561<\/a>. As a side note, the removal of the throwing behavior required the migration of our test infrastructure from Catch2 to Google Test, whose support of death tests easily enabled testing of contract violation behavior.<\/p>\n<h2>CMake improvements<\/h2>\n<p>This release now supports <code>find_package<\/code>. Once installed, use <code>find_package(Microsoft.GSL CONFIG)<\/code> to easily consume the GSL.<\/p>\n<h2>Deprecation of multi_span and strided_span<\/h2>\n<p>To more closely align Microsoft\u2019s GSL to the C++ Core Guidelines, we decided to deprecate our implementation of <code>gsl::multi_span<\/code> and <code>gsl::strided_span<\/code>. For the time being, we will continue to provide these headers, but they will not be actively worked on or maintained unless the C++ Core Guidelines identifies a need for them.<\/p>\n<h2><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2 CommentStart CommentHighlightClickedGreyout CommentHighlightPipeClicked GrammarErrorHighlight SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">Improvement<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2 CommentHighlightClickedGreyout GrammarErrorHighlight SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">\u00a0<\/span><span class=\"NormalTextRun CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">change<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">s\u00a0<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">c<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">ausing\u00a0<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">p<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">otential\u00a0<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2 CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">b<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2 CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">uild<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">\u00a0<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2 CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">b<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2 CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">reaks<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2 CommentHighlightClickedGreyout SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">\u00a0<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentHighlightPipeClicked SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">and\u00a0<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">m<\/span><\/span><span class=\"TextRun SCXW23760642 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW23760642 BCX0\" data-ccp-parastyle=\"heading 2\" data-wac-het=\"1\">itigations<\/span><\/span><span class=\"EOP SCXW23760642 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true}\" data-wac-het=\"1\">\u00a0<\/span><\/h2>\n<p><strong>Change: <\/strong>The change from signed <code>std::ptrdiff_t<\/code> to unsigned <code>std::size_t<\/code> in <code>gsl::span<\/code> may introduce signed\/unsigned mismatches.<\/p>\n<p><strong>Mitigation: <\/strong>Use <code>static_cast<\/code> or <code>gsl::narrow_cast<\/code> to resolve mismatches.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Change: <\/strong><code>gsl::multi_span<\/code> and <code>gsl::strided_span<\/code> have been deprecated.<\/p>\n<p><strong>Mitigation: <\/strong>Pass multi-dimensional arrays as constant references instead of <code>gsl::multi_span<\/code>.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Change: <\/strong><span class=\"TextRun SCXW14250749 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW14250749 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">Code that makes use of\u00a0<\/span><\/span><span class=\"TextRun SCXW14250749 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW14250749 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">moved<\/span><\/span><span class=\"TextRun SCXW14250749 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW14250749 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0span<\/span><\/span><span class=\"TextRun SCXW14250749 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW14250749 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0helper<\/span><\/span><span class=\"TextRun SCXW14250749 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW14250749 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0functions<\/span><\/span><span class=\"TextRun SCXW14250749 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW14250749 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">\u00a0will g<\/span><\/span><span class=\"TextRun SCXW14250749 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentStart SCXW14250749 BCX0\" data-ccp-parastyle=\"Normal (Web)\" data-wac-het=\"1\">enerate compiler errors. <\/span><\/span>Examples of these functions include span comparison operators, <code>gsl::make_span<\/code>, etc.<\/p>\n<p><strong>Mitigation: <\/strong>Include &lt;gsl\/span_ext&gt; instead of &lt;gsl\/span&gt; in files where you use these functions.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Change: <\/strong>Throwing contract violation behavior is removed.<\/p>\n<p><strong>Mitigation:<\/strong> Use a terminate handler to log relevant information before termination executes for debugging. Relying on throwing behavior does not guarantee safety.<\/p>\n<h2>Upcoming changes<\/h2>\n<p>The paper <a href=\"http:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2020\/p1976r2.html\">P1976R2<\/a> that came out of the WG21 Prague meeting has yet to be implemented in GSL. A minor release will be issued when this is added to GSL.<\/p>\n<h2>Feedback<\/h2>\n<p>We look forward to hearing your feedback. If you would like to reach us, please use the comments below or email <a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a>. Visit our page on <a href=\"https:\/\/github.com\/microsoft\/gsl\">GitHub<\/a> if you would like to file issues or contribute to the project.<\/p>\n<h2><\/h2>\n<h2>Update History<\/h2>\n<p>4\/23\/2020 &#8211; Released GSL version 3.0.1<\/p>\n<p>6\/4\/2020 &#8211; Released GSL version 3.1.0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update June 4th, 2020 &#8211; GSL version 3.1.0 has been released. Please see the latest release page for information regarding GSL 3.1.0. For all future updates, please see refer to the release page on GitHub. &nbsp; GSL 3.0.0 Release Version 3.0.0 of Microsoft&#8217;s implementation of the C++ Core Guidelines Support Library (GSL) is now available [&hellip;]<\/p>\n","protected":false},"author":6068,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[270,1,512,277],"tags":[],"class_list":["post-25836","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcement","category-cplusplus","category-general-cpp-series","category-writing-code"],"acf":[],"blog_post_summary":"<p>Update June 4th, 2020 &#8211; GSL version 3.1.0 has been released. Please see the latest release page for information regarding GSL 3.1.0. For all future updates, please see refer to the release page on GitHub. &nbsp; GSL 3.0.0 Release Version 3.0.0 of Microsoft&#8217;s implementation of the C++ Core Guidelines Support Library (GSL) is now available [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/25836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/6068"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=25836"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/25836\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=25836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=25836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=25836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}