Gsl Lite Versions Save

gsl-lite – A single-file header-only version of ISO C++ Guidelines Support Library (GSL) for C++98, C++11, and later

v0.32.0

6 years ago

This release of gsl lite changes its not_null towards the same class in Microsoft's GSL (issue #122).

One step that gsl lite does not (yet) take, is to make not_null's constructor explicit and thereby inhibit implicit conversions and copy-initialization. gsl lite does however offer a configuration setting via gsl_CONFIG_NOT_NULL_EXPLICIT_CTOR to make not_null's constructor explicit. It also offers not_null_ic for implicit construction.

Implicit not_null construction:

void use_implicit( not_null<int*> nnp );

void caller_implicit()
{
  owner<int*> oip( new int(42) );
  use_implicit( oip );
  // ...
}

Explicit not_null construction:

void use_explicit( not_null<owner<int*>> nnp );

void caller_explicit()
{
  owner<int*> oip( new int(42) );
  use_explicit( not_null<owner<int*>>(oip) );
  // ...
}

Changes

  • Add not_null_ic with implicit constructor, allowing copy-initialization.
  • Enable making not_null constructor explicit via gsl_CONFIG_NOT_NULL_EXPLICIT_CTOR, default 0 (breaking, issue #46).
  • Enable not_null get() return by const & via gsl_CONFIG_NOT_NULL_GET_BY_CONST_REF (via M-GSL PR 651 @xaxxon, PR 675 @ericLemanissier).
  • Change constraint on not_null construction from is_convertible to is_constructible (via M-GSL PR 650, @xaxxon).
  • Change to take not_null constructor argument by const & when rvalue references are not available.
  • Add not_null non-is-default rvalue reference copy-constructor, copy-assignment.
  • Remove not_null converting assignment operator.
  • Rename to gsl_HAVE_EXPLICIT.
  • Adapt several compile-time tests for not_null with explicit construction.
  • Fix GNUC C++98 compilation by making RefCounted conversion function const in not_null.t.cpp.

v0.31.0

6 years ago

This release of gsl lite changes its span towards proposal p0122r7 and adds non-standard creator function byte_span() to create a span of bytes for a single object. Further it adds more control over including features or deprecated behaviour.

Additions

  • Added gsl_lite_MAJOR, gsl_lite_MINOR, gsl_lite_PATCH, updated script/update-version.py.
  • Added configuration selector gsl_CONFIG_DEPRECATE_TO_LEVEL; default no deprecation.
  • Added feature selector gsl_FEATURE_WITH_CONTAINER_TO_STD; default any C++ standard.
  • Added feature selector gsl_FEATURE_MAKE_SPAN_TO_STD; default any C++ standard.
  • Added feature selector gsl_FEATURE_BYTE_SPAN_TO_STD; default any C++ standard.
  • Added macros gsl_DEPRECATE_TO_LEVEL(), gsl_FEATURE(), gsl_FEATURE_TO_STD(), gsl_CONFIG(), gsl_HAVE() and gsl_ADDRESSOF(x).
  • Added span::value_type.
  • Added details::can_construct_span_from<>.
  • Added convertible constraint to span C-array constructor.
  • Added class template argument deduction guides for span.
  • Added make_span( with_container_t, ...) creator functions.
  • Added non-standard byte_span() creator functions (span lite issue #3, thanks to @chris0e3).

Changes

  • Changed span towards proposal p0122r7 (issue #118).
  • Changed C++14 constexpr to C++11 constexpr where possible.
  • Parenthesized macro arguments.
  • Omitted macros min(), max() via -DNOMINMAX in test/t*.bat.
  • Updated test/t-all.bat for various configuration and feature selections.

v0.30.0

6 years ago

This release of gsl lite introduces support for the DJGPP cross compiler. Further it contains the following changes.

Additions

  • Support for DJGPP cross compiler is introduced (PR #107, thanks to Tomáš Zeman, @zemasoft)
  • A Readme.md has been added to example/cmake-pkg

Changes

  • The lest test framework has been updated to v1.33.1.
  • Clang and GNUC now allow strict aliasing for gsl::byte (issue #114).
  • The version information on MSVC can now differentiate between 14.0 (VS 2015) and 14.1 (VS 2017).
  • The space after ':' in FILE: LINE in reported locations has been removed (issue #112).
  • MSVC level 4 warning C4127: conditional expression is constant is now avoided (issue #115, thanks to @kpeace)
  • A constructor to allow rvalue to const lvalue conversion has been added (issue #113, PR #117, thanks to @theodelrieu )

Fixes

  • The missing #include <algorithm> has been added.
  • Clang compilation for C++98 has been fixed by specifying the C++ standard.
  • The gsl-lite version in section "As CMake package" has been fixed.
  • The type in a test of span has been correced (PR #105, thanks to Tomáš Zeman, @zemasoft)
  • The owner alias template has been enabled for VC12 (Issue #111, thanks to @sg-james); the following macros for Visual C++ have been updated:
    • gsl_HAVE_ALIAS_TEMPLATE: VC12 (was VC14)
    • gsl_HAVE_ENUM_CLASS: VC11 (was VC14)
    • gsl_HAVE_EXPLICIT_CONVERSION: VC12 (was VC14)
    • gsl_HAVE_INITIALIZER_LIST: VC12 (was VC14)

v0.29.0

6 years ago

This release of gsl lite contains the following changes.

Changes

You can now use gsl lite via a CMake package, thanks to @FlorianWolters (PR #100, #103).

The CMake package provides gsl lite as interface library via 'namespaced' headers gsl/gsl and gsl/gsl-lite.hpp.

In the documentation, the section on installation now describes using gsl-lite as copied header, as external Git project, as CMake package and as Conan package. Further the section Deprecation was added and the table Reported to work with was updated.

The following methods of class span are now deprecated: span::length(), span::length_bytes() (issue #99) and the span constructors that take a smart pointer, span(shared_ptr<element_type> const & ptr), span(unique_ptr<element_type> const & ptr) (issue #98).

Additions

CMake Package Configuration support has been added. This makes gsl-lite usable with CMake's find_package() command. To prevent undesired compilation of tests and examples, two CMake options where added that default to off: GSL_LITE_OPT_BUILD_TESTS and GSL_LITE_OPT_BUILD_EXAMPLES. To support the usage of gsl-lite's CMake package, scripts script/install-gsl-pkg.py was added as well as script use-gsl-pkg.py that is part of an example that uses the package. Further a script was added to update gsl lite's version number in relevant files.

Type gsl::index has been added for container indices, subscripts and sizes. It is defined by the existing configuration macro gsl_CONFIG_SPAN_INDEX_TYPE.

Fixes

In the output stream operator of class string_span the padding has been fixed to pad to the right side, commit 9574552.

v0.28.0

6 years ago

This release of gsl lite contains the following changes.

Changes Travis and Appveyor CI compiler matrices have been expanded. CI now uses the CMake configuration.

Additions The Visual Studio 2015 and 2017 targets now include variants with compiler option -std:c++14, -std:c++17 and -std:c++latest to specify the C++ standard to use.

For the Visual Studio 2017 target C++ Core Guidelines checking has been added. The checking is limited to GSL Lite itself. Thanks to @AraHaan for drawing attention to the guideline checking in PR #95.

A test was added to compare an empty to a non-empty string span. Comparing empty string_spans as equal asserts with several configurations and is possibly questionable; it has been suppressed via [.]. See issue #96.

Fixes The CMake configuration now uses CMAKE_CXX_COMPILER_VERSION to obtain the compiler's version number instead of a version number obtained from gcc via commandline options -dumpversion and -dumpfullversion. The dumped version is a configuration value that is used in filesystem paths. I've noticed erroneous values with it on Travis even in the main version number.

v0.27.0

6 years ago

This release of gsl lite contains the following changes.

Changes

The GSL Lite header file now has extension .hpp. There are headers gsl.h and gsl/gsl-lite.h to provide backwards compatibility, however these have been deprecated as of this version. See issue #94 , thanks to @AraHaan.

Several warnings from Microsoft's CppCoreCheck have been suppressed. See pull request #95, thanks to @AraHaan.

There are no additions or fixes in this release.

v0.26.0

6 years ago

This release of gsl lite contains the following changes.

Additions

Conan installation instructions and badge were added (thanks to @agauniyal). An install target has been added to the CMake instructions (issue #85).

Changes

final_act has been renamed to final_action (issue #89). Several deleted (or private) methods were added for clang-tidy cppcoreguidelines checks to pass (pull request #91, thanks to @poconbhui).

Fixes

In not_nul::get(), nullptr was corrected to gsl_nullptr (pull request #90, thanks to @poconbhui). A -Wshadow warning was fixed (pull request #84, thanks to @MikeLankamp).

v0.25.0

6 years ago

This release of gsl lite contains the following changes.

Additions

Several deleted operators (issue #82) and comparison operators (issue #83) were added for not_null<>.

Changes

If possible, owner<T> is restricted to pointers (issue #80).

As in not_null<>'s constructor, the parameter in the assignment is taken by value. If available, = default is used for not_null<> copy construction and copy assignment.

New macros gsl_is_delete and gsl_is_delete_access were added to only write such function prototypes once (issue #81).

Fixes

none.

v0.24.0

6 years ago

This release of gsl lite adds the implementation of to_byte() and to_integer() for C++17 (thanks to David Mugnai, @cinghiale). Further a try it online badge has been added to the Readme.

v0.23.0

6 years ago

This release of gsl lite contains the following changes.

Additions

The dereference operator was added to not_null<> and tests were added for it (issue #73, thanks to @minielim). The hidden tests now also report the compiler version and the C++ language version (run gsl-lite @).

Changes

The definition of macros that indicate the availability of language and library features was changed to enable the use of option -Wundef. For the same reason the lest test framework was updated to version 1.30.1.

Fixes

A check for make_unique was fixed in a test. In the CMake build files compiler selection was fixed as well as setting of common compiler options.