Skip to content

Releases: gsl-lite/gsl-lite

v0.41.0

11 Apr 22:30
Compare
Choose a tag to compare

Additions:

  • Add tentative C++23 detection macro gsl_CPP23_OR_GREATER, CONSTEXPR_23 language feature, and gsl_constexpr23 keyword macro (#329)
  • Add gsl_CONFIG_VALIDATES_UNENFORCED_CONTRACT_EXPRESSIONS config switch for suppressing the compile-time syntax validation of contract check expressions (#330)

Changes:

  • Deprecate string_span and zstring_span and prepare for removal (#335)
  • Continuous Integration now also tests GCC 12, Clang 14 thru 16, and NVCC 11.8 and 12.1
  • Remove Continuous Integration for GCC 6 and earlier, Clang 5 and earlier, Apple Clang 11.0.0 and earlier, and CUDA 10.2 and earlier (#333, #334)

Fixes:

  • Use NVCC's __builtin_assume() for gsl_ASSUME_() in device code (#324, thanks to @codecircuit)
  • Fix not_null_ic<> copy construction (#326, thanks to @runer112)
  • Respect libc++ configuration option to disable wchar_t (#331, thanks to @burnpanck)
  • Suppress "-Wweak-vtables" warning for Clang (#332, thanks to @mrahn)
  • Suppress "-Wuseless-cast" warning for GCC (#332, thanks to @wirew0rm)

v0.40.0

04 Nov 23:24
Compare
Choose a tag to compare

Additions:

  • Add debug-mode contract checking macros gsl_ExpectsDebug(), gsl_EnsuresDebug(), gsl_AssertDebug() which are sensitive
    to the NDEBUG macro, and thus similar to assert() (#316)
  • Add dedicated contract check configuration macros for device code: gsl_CONFIG_DEVICE_CONTRACT_CHECKING_AUDIT/ON/OFF,
    gsl_CONFIG_DEVICE_CONTRACT_VIOLATION_ASSERTS/TRAPS/CALLS_HANDLER, and
    gsl_CONFIG_DEVICE_UNENFORCED_CONTRACTS_ASSUME/ELIDE (#317)
  • Add gsl::is_valid() for explicitly detecting the moved-from state of a gsl::not_null<> object (#318)
  • Add device code detection macro gsl_DEVICE_CODE (evaluates to 1 when compiling CUDA device code, 0 when compiling host code)

Changes:

  • Continuous Integration now also tests Clang 13 and updates CUDA version to 11.5
  • Improve documentation for contract checking macros and configuration macros

Fixes:

  • Check for gsl:: target rather than nonexistent gsl-lite:: target in Config.cmake (#315, thanks to @Ram-Z)

v0.39.0

29 Sep 23:49
Compare
Choose a tag to compare

Additions:

  • Add gsl::make_unique<T>() and gsl::make_shared<T>() which resemble the eponymous functions from std but return
    gsl::not_null<std::unique_ptr<T>> and gsl::not_null<std::shared_ptr<T>> (#312)
  • Add basic support for NVHPC compiler (#308, thanks to @olupton)

Changes:

  • Continuous Integration now also tests GCC 11, Clang 12, and AppleClang 12.0.5 and 13, and updates CUDA version to 11.4 (#314)
  • Remove C++98 polyfills std98::equal(), std98::lexicographical_compare() from public interface (#313)

Fixes:

  • gsl::not_null<std::shared_ptr<T>> now correctly converts to std::weak_ptr<T> (#311, thanks to @stohrendorf)

v0.38.1

22 Apr 20:25
Compare
Choose a tag to compare

Additions:

  • Add feature detection macro gsl_HAVE( C99_PREPROCESSOR )
  • Add gsl_CONSTRAINT() which can be used to impose concept requirements on template type parameters in a backward-compatible manner:
    template< gsl_CONSTRAINT(Concept) T > expands to template< Concept T > for C++20 and to template< typename T > otherwise
  • Add C++20 polyfill std20::endian() (#305)
  • Restore Continuous Integration testing for NVCC 10.2
  • Add basic CUDA runtime tests to test suite (#307)

Changes:

  • Continuous Integration now also tests "RelWithDebInfo" configuration for select compilers and platforms

Fixes:

  • Fix regression in precondition/postcondition/assertion checks for CUDA (cf. #302, thanks to @Spielix)
  • Add workaround for GCC bug to test suite (cf. #303, thanks to @sanjayankur31)
  • Fix endianness issues in test suite (cf. #304, thanks to @sanjayankur31)
  • Improve constexpr support for span<>; add constexpr tests (#306)

0.38.0

31 Mar 13:31
Compare
Choose a tag to compare

Additions:

  • Add macros gsl_Assert(), gsl_AssertAudit() to express checks which are neither pre- nor postconditions (#294)
  • Add fail-fast operation gsl_FailFast() which is guaranteed to terminate normal execution in some way
    (exception, std::terminate(), or trap instruction) (#294)
  • Add configuration option gsl_CONFIG_CONTRACT_VIOLATION_TRAPS which makes gsl_Expects()/gsl_Ensures()/gsl_Assert() (and
    the Audit variants if audit mode is enabled) and gsl_FailFast() execute a trap instruction in case of a contract violation
  • Add configuration option gsl_CONFIG_CONTRACT_VIOLATION_ASSERTS which implements gsl_Expects()/gsl_Ensures()/gsl_Assert()
    (and the Audit variants if audit mode is enabled) in terms of the assert() macro from the standard library. This has the
    benefits that both legacy assertions and contract checks can be globally suppressed with a single macro (NDEBUG), and that
    assert() prints an informative error message which contains the contract check expression.
  • Add as_nullable() function (#251, thanks to @petamas)
  • Add compiler detection macro for NVCC (#294)
  • Add compiler detection macro and tentative support (no CI) for ARMCC (#293; thanks to @woodsking2)
  • Add conditional std::hash<> specialization for not_null<> (#297; thanks to @mbs-c)
  • Track language and library versions separately; new macros gsl_STDLIB_CPPxx_OR_GREATER indicate availability of the standard library
  • Add feature detection macros gsl_HAVE( HASH ), gsl_HAVE( MOVE_FORWARD ), gsl_HAVE( OVERRIDE_FINAL )
  • Add size_type to span<> and basic_string_span<>
  • Add Continuous Integration testing for NVCC 11.0-11.2 (CUDA14, CUDA17), Clang 10-11, GCC 10, Apple Clang 12.0.0
  • Add Continuous Integration testing for Clang with libstdc++
  • Add Valgrind "memcheck" run to Continuous Integration
  • Add testing for more configuration scenarios, e.g. building with exceptions disabled and using different ways of precondition
    violation handling

Changes:

  • Remove dependency on standard library headers <algorithm> and <iterator> (#290, #295; thanks to @mpusz)
  • Use of gsl_HAVE(), gsl_CONFIG(), gsl_FEATURE() with unknown arguments now causes compilation errors (#272)
  • narrow<>() now issues a static_assert() that refers to narrow_failfast<>() if exceptions are unavailable (#269)
  • With version-1 defaults, not_null<> now has a specialization for raw pointers which avoids unnecessary contract checks (#300)
  • The contract expression is now part of the exception message in gsl_CONFIG_CONTRACT_VIOLATION_THROWS mode
  • narrowing_error now produces a less unhelpful exception message ("narrowing_error")
  • gsl_noexcept now falls back to throw() if noexcept is unavailable
  • Most symbols are now accessible through both namespace gsl and namespace gsl_lite to ease migration
  • not_null_ic<> is now also visible in namespace gsl_lite (#280; thanks to @woodsking2)
  • nullptr_t comparison operators for not_null<> are now explicitly deleted
  • More uses of gsl_NODISCARD throughout the library
  • For NVCC ≥11.3, make use of new __builtin_unreachable() intrinsic in gsl_CONFIG_UNENFORCED_CONTRACTS_ASSUME mode

Fixes:

0.37.0

28 Jul 16:56
Compare
Choose a tag to compare

Additions:

Changes:

  • Rename as_writeable_bytes() -> as_writable_bytes() to follow C++20 in spelling; the old name is still provided for compatibility
  • Rename gsl_DEPRECATED() -> gsl_DEPRECATED_MSG(), add gsl_DEPRECATED
  • Add more gsl_DEPRECATED() annotations
  • Deprecate span<>::at(), basic_string_span<>::at(), and call indexing
  • Minor documentation improvements
  • Unify internal SFINAE macros to gsl_ENABLE_IF_() (#238; thanks to @martinmoene)
  • Add more comprehensive tests for narrow<>() and narrow_failfast<>()

Fixes:

  • Fix spurious static assertion for pre-/postcondition check arguments explicitly convertible to bool if gsl_CONFIG_CONTRACT_CHECKING_OFF is defined
  • Fix hard failure in span<> constrained constructor (#242, thanks to @orangeturtle739)
  • Make gsl::detail::is_compatible_container<> a proper type trait

0.37.0

14 May 08:24
Compare
Choose a tag to compare

0.36.0

24 Jan 17:13
62df450
Compare
Choose a tag to compare

The repository now moved to a dedicated GitHub organization: https://github.com/gsl-lite/gsl-lite

gsl-lite is now mostly maintained by @mbeutel (#175).

Additions:

Changes:

0.34.0

21 Mar 09:38
Compare
Choose a tag to compare

This release of gsl lite changes the CMake package folder name to gsl-lite (it was gsl) and it adds a usage description for the Conda package manager to the Readme.

Further macro gsl_REQUIRES_T() was introduced (nonstd lite issue 18) and the lest test framework has been updated to v1.35.1

0.33.0

08 Mar 21:49
Compare
Choose a tag to compare

This release of gsl lite has changes that originate from the nonstd-lite project and quite a few fixes by its users.

Additions

  • Add script/create-cov-rpt.py to create OpenCppCoverage report (nonstd-lite project issue 29)
  • Add script/create-vcpkg.py (nonstd-lite-project issue 28)
  • Add script/upload-conan.py (nonstd-lite-project issue 26)
  • Add conanfile.py, edit it from script/update-version.py (nonstd-lite-project issue 26)
  • Add CMake installation and config-file packaging; Let tests and example use gsl-lite interface library
  • Add "LANGUAGES CXX" to CMake project
  • Add GNUC -Wsign-conversion warning to CMake configuration
  • Add AppleClang to CMake configuration
  • Add OSX to Travis configuration
  • Add TOC entry for Standard selection macro (#128, thanks to @egarrulo)
  • Add span::ssize(), ssize(span), size(span) (#144)
  • Add test/tc-cl.bat

Changes

  • Rename "Guideline support library" to "Guidelines -" (#134)
  • Align Appveyor configuration (plan 9, nonstd-lite-project issue 14)
  • Align CMakefiles.txt (plan 8, nonstd-lite-project issue 13)
  • Align test scripts (nonstd-lite-project issue 12)
  • Align badges in readme (nonstd-lite-project issue 3)
  • Obviate need for -DNOMINMAX with MSVC (nonstd-lite issue 16)
  • Prevent and suppress warnings from clang
  • Let ctest produce output on failure
  • Update lest test framework to v1.35.0.

Fixes

  • Fix CMake install command (expected-lite issue 25, thanks to @rmorozov)
  • Fix clashing CMake cached variable, use 'gsl' for namespace and package folder (thanks to @rmorozov)
  • Fix template argument in not_null<> comparison operators (#143, thanks @stohrendorf)
  • Fix macro gsl_IN_STD (#142, thanks to @Flamefire)
  • Fix possible int overflow in nonstd::span::subspan() range (issue #138, thanks to @fefe17)
  • Fix link to P0122 (#130, thanks to @alexeyr)
  • Fix for misleading __cplusplus of GCC 4.7.0 and earlier (#127, thanks to @egarrulo)
  • Fix final_action_return() and final_action_error() during stack unwinding (#126, thanks to @patstew)
  • Fix unused parameter if Expects() elided via new macro gsl_EXPECTS_UNUSED_PARAM (#123, #124, thanks to @kugelrund)