Releases: Sedeniono/tiny-optional
Releases · Sedeniono/tiny-optional
v1.4.0
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
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
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 oftiny::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 intiny/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
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
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 ifT
is atiny::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
v1.1.0
Major changes:
- Introduced customization point
tiny::optional_flag_manipulator
, which allows the user to teachtiny::optional<PayloadType>
about a custom "flag manipulator" for some custom typePayloadType
. If available,tiny::optional<PayloadType>
will always have the same size as thePayloadType
. Hence, to support custom types, it is no longer necessary to usetiny::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 fromIsEmpty()
,InitializeIsEmptyFlag()
andPrepareIsEmptyFlagForPayload()
tois_empty()
,init_empty_flag()
andinvalidate_empty_flag()
. This was done to make the naming more consistent (since the whole public API uses snake_case names becausestd::optional
does). Their arguments, return values or semantics did not change.
Full Changelog: v1.0.0...v1.1.0