Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixing #1151

Open
wants to merge 69 commits into
base: dmitrykobets-msft/experiment/fix-span-2020-gtest-failures
Choose a base branch
from

Commits on Dec 9, 2021

  1. Fix/implement C++2020 compilation, tests, and CI (microsoft#1017)

    * Fix C++20 bugs and tests
    * Rework CI for C++2020 tests
    * Update readme compiler versions
    dmitrykobets-msft committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    bcf008a View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2021

  1. Configuration menu
    Copy the full SHA
    c412deb View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2022

  1. Update compiler support (microsoft#1021)

    Bump clang and Xcode supported versions and add support for VS with LLVM
    dmitrykobets-msft committed Jan 6, 2022
    Configuration menu
    Copy the full SHA
    ebf0498 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2022

  1. Configuration menu
    Copy the full SHA
    99a29ce View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2022

  1. Configuration menu
    Copy the full SHA
    a353456 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2022

  1. quoted form of #include when GSL includes GSL files (microsoft#1030)

    [SF.12: Prefer the quoted form of #include for files relative to the including file and the angle bracket form everywhere else](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rs-incform)
    
    Additionally changed #include order in `span` so that all `span_ext` is in the GSL include block and not in the STL include block.
    
    Fixes issues microsoft#1025.
    
    Co-authored-by: Werner Henze <w.henze@avm.de>
    beinhaerter and Werner Henze committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    4377f6e View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2022

  1. Suppress reserved identifier warning (microsoft#1041)

    The following reserved identifiers are being used specifically to target certain MSVC constructs, so suppress the warning in VS 2022 (LLVM) "... is reserved because it starts with '_' followed by a capital letter":
    - _Unchecked_type
    - _Verify_range
    - _Verify_offset
    - _Unwrapped
    - _Unwrap_when_unverified
    - _Seek_to
    - _Unchecked_begin
    - _Unchecked_end
    dmitrykobets-msft committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    f22f524 View commit details
    Browse the repository at this point in the history
  2. Make gsl::span's iterators use the contiguous_iterator concept (micro…

    …soft#1035)
    
    Resolves microsoft#1016
    
    Co-authored-by: Casey Carter <Casey@Carter.net>
    dmitrykobets-msft and CaseyCarter committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    3837236 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2022

  1. Suppress -Wfloat-equal warning in implementation of gsl::narrow (micr…

    …osoft#1043)
    
    In the implementation of gsl::narrow, there is a comparison `static_cast<U>(t) != u` which may be comparing two floats.
    The comparison here is done purposefully to categorize ill effects of narrowing conversion, since the values being compared *should* be the same when compared with `operator==`. 
    Note, using #pragma GCC will suppress this warning for both GCC and Clang.
    dmitrykobets-msft committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    2bfd495 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2022

  1. gsl/narrow should include <exception> (microsoft#1044)

    This file uses std::exception, so it should include the appropriate header.
    
    Normally it gets the STL's <exception> header included via the gsl/assert file, but this is skipped with _HAS_EXCEPTIONS=0. I understand _HAS_EXCEPTIONS is undocumented and unsupported, but regardless, the appropriate header should be included here.
    
    Alternatively, gsl/narrow should be modified to support _HAS_EXCEPTIONS=0, like gsl/assert was. But I'm not proposing that change. <exception> does define std::exception even with _HAS_EXCEPTIONS=0.
    TheJCAB committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    f21f29d View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2022

  1. Configuration menu
    Copy the full SHA
    7fefaaf View commit details
    Browse the repository at this point in the history
  2. Suppress es.46 warning in implementation of gsl::narrow (microsoft#1046)

    As per the CoreGuidelines, gsl::narrow is defined in terms of static_cast.
    Suppress es.46, which suggests converting the static_cast into gsl::narrow
    dmitrykobets-msft committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    d8c493c View commit details
    Browse the repository at this point in the history
  3. Remove useless runtime checks in span implementation (microsoft#1029)

    Both checks for Expects(ExtentType::size() != dynamic_extent); in storage_type are always useless. storage_type<ExtentType> is only ever created with ExtentType == extent_type<Extent>, where Extent has type std::size_t and is the extent of the span.
    
    Looking at extent_type<std::size_t Ext>::size():
    
    - if Ext != dynamic_extent, then size() always returns Ext, and therefore size() != dynamic_extent
    - if Ext == dynamic_extent, then size() returns extent_type<dynamic_extent>::size_. size_ can only be set via one of two constructors:
      - constexpr explicit extent_type(size_type size), which already does the check in question
      - constexpr explicit extent_type(extent_type<Other> ext) : size_(ext.size()), which simply relies on the other extent's size() method
    So there is no way for ExtentType::size() == dynamic_extent.
    dmitrykobets-msft committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    da01eb2 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2022

  1. Microsoft mandatory file (microsoft#1047)

    Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
    Configuration menu
    Copy the full SHA
    d9fc52e View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2022

  1. Resolve MSVC warning C5260 (microsoft#1049)

    * Test solution
    
    * Mark dynamic_extent as inline, compiler-version-permitting
    dmitrykobets-msft committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    330583f View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2022

  1. Use updated NDK version in android test suite (microsoft#1053)

    actions/runner-images#5930 recently updated the NDK version, resulting in test breakages. Update the version.
    dmitrykobets-msft committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    2e94541 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2022

  1. solve span compile problem with gcc 5.5.0 (microsoft#1052)

    GCC 4.8.0 - 7.0 has a bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480) involving specialization in a namespace enclosing the specialized template. This PR fixes an appearance of this bug in the span header.
    beinhaerter committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    10df83d View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2022

  1. Fix NDK version in Android CI (microsoft#1054)

    This PR future-proofs the fix made in microsoft#1053, which is now outdated due to further updates to the NDK version in the Azure VMs used as part of the CI.
    dmitrykobets-msft committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    1683d87 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2022

  1. Fix Clang-tidy 15 warnings (microsoft#1058)

    These warnings were found by running clang-tidy 15.
    AtariDreams committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    849f7ce View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2022

  1. Clean up final_act and finally, closes microsoft#846 (microsoft#977)

    Somewhere along the way, GSL's implementation of final_act and finally seems to have become way overthought. This PR is to re-simplify these facilities back to what C++ Core Guidelines C.30 said which is simple and clear and works. It just copies the invocable thing, and doesn't bother trying to optimize the copy. This should be fine, because we're typically passing something that's cheap to copy, often a stateless lambda.
    
    The problem in microsoft#846 appears to be because finally looks like was originally written as a const&/&& overload (its state at the time that issue was opened)... to eliminate a copy when you invoke it with a temporary. If so, then the && was probably never intended to be a forwarder, but an rvalue reference that tripped over the horrid C++ syntax collision where a && parameter magically instead means a forwarding reference because the type happens to be a template parameter type here. So I suspect the original author was just trying to write an rvalue overload, and the forwarder that's there now was never intended at all.
    hsutter committed Oct 10, 2022
    6 Configuration menu
    Copy the full SHA
    7d49d4b View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2022

  1. Prevent inefficient copying when using not_null::get (microsoft#1059)

    Closes issue microsoft#550, which highlighted overhead in not_null::get for larger types such as shared_ptr. Every call to get would return a copy of the contained value.
    This PR implements Herb's suggestion for changing the return type of not_null::get. The not_null's value will now only be copied if it is "trivially copyable"; otherwise, it will be returned by const reference.
    Note: this change also forces the returned copy to be const.
    dmitrykobets-msft committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    991fa66 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2022

  1. CMake cleanup (microsoft#1060)

    - Move all install logic inside gsl_install.cmake
      - This makes reading the logic easier, and avoids the enable language
        issue with `GNUInstallDirs` by having it included after the project
        call
    - Have all functions inside gsl_functions.cmake
    - Use CMake idiom PROJECT_IS_TOP_LEVEL
    - Update README.md
    jpr42 committed Oct 18, 2022
    Configuration menu
    Copy the full SHA
    c52bad3 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2022

  1. Configuration menu
    Copy the full SHA
    1e0d044 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2022

  1. Raise CMake min to 3.8 (microsoft#1061)

    This avoids propagating -std=c++14 as a compile option
    
    Currently if you use less than CMake 3.8 and you install the project
    `-std=c++14` gets added to the INTERFACE_COMPILE_OPTIONS. This forces
    users to use C++ 14 or remove the property from the imported target.
    
    The solution is to raise the minimum and use `cxx_std_14`
    jpr42 committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    9c4212a View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2022

  1. Configuration menu
    Copy the full SHA
    d69e578 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2022

  1. Configuration menu
    Copy the full SHA
    517ed29 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2022

  1. Suppress false postive warning (microsoft#1068)

    The Clang compiler for MSVC in Visual Studio 2022 17.4.33122.133 used by the test runner has a bug which raises -Wdeprecated "out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated" in gsl/span, when compiling with C++14. Temporarily suppress this warning for MSVC Clang with C++14.
    dmitrykobets-msft committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    f3620bb View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2022

  1. Remove null check inside not_null::get (microsoft#1067)

    Guidelines issue 2006 removes the null check inside not_null::get, since the contained pointer is already guaranteed to be not-null upon construction.
    
    Resolves microsoft#1051
    dmitrykobets-msft committed Dec 15, 2022
    Configuration menu
    Copy the full SHA
    6c6111a View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2022

  1. Document potentially confusing behavior in gsl::narrow (microsoft#1073)

    NaN != Nan, so the comparisons used in gsl::narrow will always throw when attempting to cast a NaN value. This may be surprising, so document it.
    dmitrykobets-msft committed Dec 24, 2022
    Configuration menu
    Copy the full SHA
    46c7271 View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2022

  1. remove all deprecated string_span stuff (microsoft#1074)

    This solves issue microsoft#1070 and removes the class `string_span`. The only content remaining in the header file `gsl/string_span` is the `*zstring` types.
    This also removes the `string_span_tests.cpp` unit tests as these were only for the deprecated `string_span` class.
    
    Co-authored-by: Werner Henze <werner.henze+gitcommits@posteo.de>
    beinhaerter and Werner Henze committed Dec 27, 2022
    Configuration menu
    Copy the full SHA
    c016bdc View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2022

  1. cleanup natvis (microsoft#1077)

    - `fail_fast`,`basic_string_span` and `basic_zstring_span` are not declared in the headers any more.
    - Name the exporting header file for all types in `GSL.natvis`.
    beinhaerter committed Dec 29, 2022
    Configuration menu
    Copy the full SHA
    ac26d7b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f94c1f6 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2023

  1. Add Linguist language override for include files (microsoft#1079)

    Add a `linguist-language` Git attribute that matches the files at `include/gsl` and sets their language to C++. Without this override, these files are not detected as C++ code by [GitHub's Linguist](https://github.com/github/linguist) (likely due to lacking any file extensions).
    
    This will cause GitHub.com to count these files correctly as C++ code and do syntax highlighting when browsing the repo.
    
    **Linguist breakdown results**
    
    Before:
    
    <details>
    
    
    ```
    $ docker run --rm -v $(pwd):$(pwd) -w $(pwd) -t linguist github-linguist --breakdown
    91.57%  152148     C++
    8.43%   14011      CMake
    
    CMake:
    CMakeLists.txt
    cmake/gsl_functions.cmake
    cmake/gsl_install.cmake
    include/CMakeLists.txt
    tests/CMakeLists.txt
    
    C++:
    tests/algorithm_tests.cpp
    tests/assertion_tests.cpp
    tests/at_tests.cpp
    tests/byte_tests.cpp
    tests/deathTestCommon.h
    tests/no_exception_ensure_tests.cpp
    tests/notnull_tests.cpp
    tests/owner_tests.cpp
    tests/span_compatibility_tests.cpp
    tests/span_ext_tests.cpp
    tests/span_tests.cpp
    tests/strict_notnull_tests.cpp
    tests/utils_tests.cpp
    ```
    
    </details>
    
    After:
    
    <details>
    
    ```
    $ docker run --rm -v $(pwd):$(pwd) -w $(pwd) -t linguist github-linguist --breakdown
    94.16%  225699     C++
    5.84%   14011      CMake
    
    CMake:
    CMakeLists.txt
    cmake/gsl_functions.cmake
    cmake/gsl_install.cmake
    include/CMakeLists.txt
    tests/CMakeLists.txt
    
    C++:
    include/gsl/algorithm
    include/gsl/assert
    include/gsl/byte
    include/gsl/gsl
    include/gsl/gsl_algorithm
    include/gsl/gsl_assert
    include/gsl/gsl_byte
    include/gsl/gsl_narrow
    include/gsl/gsl_util
    include/gsl/narrow
    include/gsl/pointers
    include/gsl/span
    include/gsl/span_ext
    include/gsl/string_span
    include/gsl/util
    tests/algorithm_tests.cpp
    tests/assertion_tests.cpp
    tests/at_tests.cpp
    tests/byte_tests.cpp
    tests/deathTestCommon.h
    tests/no_exception_ensure_tests.cpp
    tests/notnull_tests.cpp
    tests/owner_tests.cpp
    tests/span_compatibility_tests.cpp
    tests/span_ext_tests.cpp
    tests/span_tests.cpp
    tests/strict_notnull_tests.cpp
    tests/utils_tests.cpp
    ```
    </details>
    gerlero committed Jan 6, 2023
    Configuration menu
    Copy the full SHA
    0822838 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2023

  1. 1075 Wrong Expects in gsl::at? (microsoft#1076)

    microsoft#1075
    - Add `static_assert` because we only support C style array `at` for up to half of the address space.
    - Add `std::` before `size_t`.
    - tests:
      - Add `#include <exception>`
      - Implement `span_tests` `interop_with_gsl_at` like `at_tests` `std_span`
    beinhaerter committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    a381a37 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2023

  1. Fix max macro collision (microsoft#1081)

    PR microsoft#1076 introduced a usage of `numeric_limits::max()` function, which seems to have [issues interacting with some Windows headers](https://github.com/skypjack/entt/wiki/Frequently-Asked-Questions#warning-c4003-the-min-the-max-and-the-macro). This PR implements [a simple fix](https://stackoverflow.com/questions/1394132/macro-and-member-function-conflict), which is to wrap the invocations in parentheses. This offloads the fix from the users of the library.
    dmitrykobets-msft committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    cbf5e66 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2023

  1. Raise CMake min to 3.14 (microsoft#1083)

    - Explicitly test package manager support with CMake 3.14 and Ninja
    - Remove gsl_install.cmake
    - Simplify installation code
    jpr42 committed Feb 6, 2023
    2 Configuration menu
    Copy the full SHA
    f7da2e4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    49c88f2 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. simplify to_byte (microsoft#1090)

    - to_byte_impl is not necessary, the same can be achieved with shorter code
    - add test code for things that should not compile
    beinhaerter committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    3ba80d5 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2023

  1. Documentation (microsoft#1086)

    Add documentation for microsoft#1071.
    beinhaerter committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    7439397 View commit details
    Browse the repository at this point in the history
  2. add some span test for constructor from other span (microsoft#1093)

    More combinations with dynamic_extent or fixed extent for higher coverage.
    beinhaerter committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    9851b94 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2023

  1. Configuration menu
    Copy the full SHA
    7a297d4 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2023

  1. Better links to CoreGuidelines (microsoft#1094)

    The `#i13-do-not-pass-an-array-as-a-single-pointer` anchor seems to be auto generated based on the title of the section. The `#Ri-array` anchor is explicitely written in the source, so this should be a better link.
    beinhaerter committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    7f7108a View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2023

  1. Document span_ext (microsoft#1098)

    `<gsl/span>` is intended to mirror `<span>` in the STL. `<span_ext>` provides convenience features that aren't part of `<span>`.
    Address microsoft#1095
    dmitrykobets-msft committed Feb 23, 2023
    Configuration menu
    Copy the full SHA
    78eb6ca View commit details
    Browse the repository at this point in the history
  2. minor docs improvements (microsoft#1097)

    - Capitalize inital letter (make both tables consistent)
    - Add links to docs/headers.md
    - Latest cmake requirement is 3.14
    - Mark text as code
    beinhaerter committed Feb 23, 2023
    Configuration menu
    Copy the full SHA
    9f85e4e View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2023

  1. Configuration menu
    Copy the full SHA
    b080081 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. Configuration menu
    Copy the full SHA
    50d6eef View commit details
    Browse the repository at this point in the history
  2. Suppress warning C26481 (microsoft#1099)

    Suppress "warning C26481: Don't use pointer arithmetic. Use span instead (bounds.1)." in the code that impements `span`.
    beinhaerter committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    43d60c5 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2023

  1. Configuration menu
    Copy the full SHA
    1d03658 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2023

  1. Remove unnecessary check from size_bytes() (microsoft#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 microsoft#1012
    dmitrykobets-msft committed May 9, 2023
    Configuration menu
    Copy the full SHA
    9face82 View commit details
    Browse the repository at this point in the history
  2. Use the implementation-defined strict total order for pointer compari…

    …sons with `not_null` (microsoft#1106)
    
    Using `<`,`<=`,`>`,`>=` to compare unrelated pointers gives an unspecified result according to the standard.
    This PR replaces the usage of these operators in `gsl::not_null` with the STL counterparts, which would leverage any implementation-defined strict total ordering for pointers.
    
    Resolves microsoft#880
    dmitrykobets-msft committed May 9, 2023
    Configuration menu
    Copy the full SHA
    5dc7fae View commit details
    Browse the repository at this point in the history

Commits on May 10, 2023

  1. Configuration menu
    Copy the full SHA
    4b5b5a1 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2023

  1. Install GSL.natvis (microsoft#1112)

    Turns out supporting GSL.natvis perfectly is quite difficult.
    
    There is no universal way to consume .natvis files that would satisfy everyone.
    
    I thought the solution was to use the /NATVIS linker option. But it turns out that actually embeds information into the PDB. So I'm not sure how to properly support the Ninja generator...
    
    That's not even accounting for the fact target_link_options doesn't play nicely with /NATVIS
    
    When you just add the file via target_sources the visual studio solution will just pick it up and recognize it without adding it to the PDB file. Which won't affect the binary and is what most devs want.
    
    This all comes down to the fact that /NATVIS files have native integration with visual studio that makes it difficult to use with non-visual studio solutions. /NATVIS almost works but embeds itself into the PDB which not everyone wants, and not everyone generates PDBs either.
    
    Docs for natvis files and /NATVIS
    - https://learn.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects?view=vs-2022
    - https://learn.microsoft.com/en-us/cpp/build/reference/natvis-add-natvis-to-pdb?view=msvc-170
    
    So my current solution is to just simplify the existing CMake code, and install the natvis so the user can decide.
    
    closes microsoft#1084
    jpr42 committed May 11, 2023
    Configuration menu
    Copy the full SHA
    afaaa71 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2023

  1. Deprecate the Ptr make_span overloads (microsoft#1113)

    These overloads don't seem to be in a usable state, and their original purpose is no longer clear. Deprecate them.
    Resolves microsoft#1092
    dmitrykobets-msft committed May 22, 2023
    Configuration menu
    Copy the full SHA
    303d964 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2023

  1. Remove deprecated headers (microsoft#1124)

    Headers that were previously prefixed with `gsl_` were renamed to drop the `gsl_` prefix in microsoft#946, and the original version deprecated.
    The deprecation happened a long time ago, so it is now time to remove these headers entirely.
    dmitrykobets-msft committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    65a5995 View commit details
    Browse the repository at this point in the history
  2. Deprecate <gsl/string_span> and replace with <gsl/zstring> (micro…

    …soft#1125)
    
    With `string_span` having been deprecated (microsoft#931, microsoft#945) and removed (microsoft#1074), the header `<gsl/string_span>` now only contains the definitions for the `zstring` family. Update the name accordingly from `<gsl/string_span>` to `<gsl/zstring>`. The old header is now deprecated and should no longer be used and will be removed in some future release.
    dmitrykobets-msft committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    3549e31 View commit details
    Browse the repository at this point in the history
  3. remove gcc noexcept warning (microsoft#1122)

    Without this change a `gsl::not_null<class_type>` triggers these `noexcept` warnings:
    ```
    .../gsl/include/gsl/pointers:162:50: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘constexpr gsl::details::value_or_reference_return_t<T> gsl::not_null<T>::get() const [with T = class_type*; gsl::details::value_or_reference_return_t<T> = class_type* const]’ [-Wnoexcept]
      162 |                 const not_null<U>& rhs) noexcept(noexcept(lhs.get() == rhs.get()))
          |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    .../gsl/include/gsl/pointers:119:55: note: but ‘constexpr gsl::details::value_or_reference_return_t<T> gsl::not_null<T>::get() const [with T = class_type*; gsl::details::value_or_reference_return_t<T> = class_type* const]’ does not throw; perhaps it should be declared ‘noexcept’
      119 |     constexpr details::value_or_reference_return_t<T> get() const
          |                                                       ^~~
    ```
    
    Co-authored-by: Werner Henze <w.henze@avm.de>
    beinhaerter and Werner Henze committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    87e2140 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2023

  1. add missing include (microsoft#1126)

    The header file uses `std::declval`, so it needs to `#include <utility>`.
    beinhaerter committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    167c77d View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2023

  1. get back gcc 8.4 compatibility (microsoft#1127)

    Before my PR microsoft#1122 `gsl/pointers` was gcc 8.4 compatible. Now it is not. This commit makes it compatible with gcc 8.4 again.
    beinhaerter committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    b34f735 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2023

  1. Remove unused macros (microsoft#1128)

    This macro is a relic of the old implementation of GSL's header. It is unused and can be removed.
    dmitrykobets-msft committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    4300304 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2023

  1. fix and optimize documentation (microsoft#1131)

    - Add anchor for `finally` in `headers.md` so that the link in `README.md` can work
    - In `README.md` add code formatting for the character types of the `zstring` and `string_span` types
    - In `README.md` change code formatting to links for GSL types
    - Vertical alignment
    beinhaerter committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    9695da9 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2023

  1. Suppress some noisy / buggy warnings (microsoft#1136)

    Two warnings were being emitted in the MSVC+LLVM tests. 
    
    The warning `-Wunsafe-buffer-usage` is initially introduced in some capacity here https://reviews.llvm.org/D137346 pointing to documentation at https://discourse.llvm.org/t/rfc-c-buffer-hardening/65734. The warning is a stylistic checker whose goal is to "emit a warning every time an unsafe operation is performed on a raw pointer". This type of programming model is not useful for library implementations of types such as `span`, where direct manipulation of raw pointers is inevitable, so disable the warning altogether.
    
    There is also a false-positive warning llvm/llvm-project#65689 that I've disabled inline.
    dmitrykobets-msft committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    2940006 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    52212c2 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2023

  1. Mark not_null constructors as noexcept when underlying type can be mo…

    …ved with no exception (microsoft#1135)
    
    This enables possible optimisations for trivial types. This also avoids a bug
    in std::variant::emplace from GNU's libstdc++.
    
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106547
    mymedia2 committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    e64c97f View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2024

  1. Configuration menu
    Copy the full SHA
    77b2f4f View commit details
    Browse the repository at this point in the history
  2. ci: Update to actions/checkout@v4. (microsoft#1142)

    This fixes annotations on task runs like the following:
    
        The following actions uses node12 which is deprecated and will be forced
        to run on node16: actions/checkout@v2. For more info:
        https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
    waywardmonkeys committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    f1a494c View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. Configuration menu
    Copy the full SHA
    caae4dd View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2024

  1. Fix initialization in test (microsoft#1140)

    * Suppress unsafe-buffer-usage
    d-winsor committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    1b4d42c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2e0d1ba View commit details
    Browse the repository at this point in the history
  3. Add documentation for to_integer(byte) (microsoft#1144)

    Co-authored-by: Werner Henze <w.henze@avm.de>
    beinhaerter and Werner Henze committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    b39e7e4 View commit details
    Browse the repository at this point in the history