Skip to content

Releases: Sedeniono/tiny-optional

v1.4.0

14 Dec 13:19
Compare
Choose a tag to compare

Major changes:

  • Added support for installation of the library via cmake. See the installation chapter in the readme.
  • Starting with this version, different patch versions of the library are compatible with each other if the major and minor versions match. See the readme for more details.

Full Changelog: v1.3.1...v1.4.0

v1.3.1

11 Jun 18:08
Compare
Choose a tag to compare

Fixed: The Natvis file now works again after the previous release put all types into an inline namespace. Unfortunately, the Natvis file needs both the library version and the configuration hardcoded, so be aware that you need to update your copy of the Natvis file after updating the library or when compiling with TINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS.

Full Changelog: v1.3.0...v1.3.1

v1.3.0

09 Jun 12:09
Compare
Choose a tag to compare

Major changes:

  • Allow disabling all functionality that relies on undefined behavior (i.e. exploitation of unused bit patterns and storing the empty state in a member variable) by defining TINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS. This allows using the other parts of the library (custom sentinel; custom specializations of tiny::optional_flag_manipulator) on non-x86/x64 platforms. Updated the README to document this configuration option.
  • Added TINY_OPTIONAL_VERSION, which is a preprocessor macro that specifies the version of the library. See its definition in tiny/optional.h for more information.
  • Actively prevent mixing of different versions or configurations. It could lead to all sorts of problems. This is done by defining the types in an inline namespace whose name contains the version number and the configuration.

Full Changelog: v1.2.1...v1.3.0

v1.2.1

18 Apr 20:30
Compare
Choose a tag to compare

Bugfix: Fixed Natvis when std::nullopt is not used in any translation unit. (Visual Studio fails to resolve std::nullopt in this case.)

Full Changelog: v1.2.0...v1.2.1

v1.2.0

29 Mar 13:33
Compare
Choose a tag to compare

Major changes:

  • Added Natvis file to the include directory. Add it to your own Natvis file to make debugging in Visual Studio easier. Also see the corresponding chapter in the readme for more information.
  • Added tiny::optional::is_compressed to allow checking whether a given optional uses more memory than the payload.
  • Added tiny::is_tiny_optional_v<T> which is true if T is a tiny::optional (or some other optional defined by this library).
  • Updated and improved github workflows.

Full Changelog: v1.1.1...v1.2.0

v1.1.1

10 Sep 12:02
Compare
Choose a tag to compare

Mainly added missing debug assert to move constructor, and explanation to the readme regarding the problems when the transition to/from the empty state happens outside of tiny::optional. Compare #4.

Full Changelog: v1.1.0...v1.1.1

v1.1.0

07 May 13:39
Compare
Choose a tag to compare

Major changes:

  • Introduced customization point tiny::optional_flag_manipulator, which allows the user to teach tiny::optional<PayloadType> about a custom "flag manipulator" for some custom type PayloadType. If available, tiny::optional<PayloadType> will always have the same size as the PayloadType. Hence, to support custom types, it is no longer necessary to use tiny::optional_inplace (although still possible). See the readme for more information. This has been suggested in issue #3.
  • Breaking Change in the API of tiny::optional_inplace: The flag manipulator's functions were renamed from IsEmpty(), InitializeIsEmptyFlag() and PrepareIsEmptyFlagForPayload() to is_empty(), init_empty_flag() and invalidate_empty_flag(). This was done to make the naming more consistent (since the whole public API uses snake_case names because std::optional does). Their arguments, return values or semantics did not change.

Full Changelog: v1.0.0...v1.1.0

v1.0.0

15 Jan 15:15
Compare
Choose a tag to compare

First stable release.