Releases: NUCLEAR-BOMB/option
Releases · NUCLEAR-BOMB/option
1.3.4
1.3.3
Changes:
- Add
opt::sentinel_option_traits
type. - Rename
.SENTINEL
->.PADDING
member in built-in option traits. - Fix the implementation of references in built-in
opt::option_traits
for recursivemax_level
algorithm. - Allow
std::in_place
constructor for reference options if there is only one argument provided. - Fix implementation for
opt::option<T>::swap
for reference options. - Fix the implementation of
opt::zip
for reference options. - Fix the implementation for
opt::option_cast
for reference options. - Make
.ptr_or_null
returnstd::remove_reference_t<T&>*
andstd::remove_reference_t<const T&>*
to account for non-const
reference options. - Add
std::hash
for lvalue and rvalue reference options. - Fix
operator->
for non-const
reference options returning a const reference. - Add secret non-type template parameter to signle argument overload of
opt::make_option
. - Add support for VS toolset v142 (Visual Studio 2019).
- Add support for gcc 10, gcc 9.
1.3.2
Changes:
- Make
.begin
and.end
methods lifetimebound. - Remove requirement of
std::is_copy_constructible_v<T>
in.take_if
method. - Fix non-
constexpr
default/opt::none_t
constructors inopt::option
. - Fix compile error when using
operator=(const option<U>&)
inopt::option
. - Remove
option_fwd.hpp
inline code fromoption.hpp
. - Add size optimization for
std::complex
. - Add
opt::as_option
function. - Change the return type of
opt::from_nullable
toopt::option<T&>
. - Make
opt::flatten
sometimes return reference options to make it more efficient. - Make
.inspect
method invokefn
with rvalue references and only return*this
lvalue reference.
1.3.1
Changes:
- Add method
.try_emplace
. - Fix compilation error in
opt::option<T>::(const_)iterator
whenT
is a reference type (#2). - Fix non-working preprocessor macro
OPTION_USE_BUILTIN_TRAITS
. - Optimize for compile time algorithm of searching maximum
max_level
value used in built-in option traits (e.g. forstd::tuple
, reflectable types). - Add
static_assert
check for reference options when constructing them from.map
and passed function returns a prvalue. - Add
OPTION_VERIFY
check for null pointer dereferencing in.get_unchecked
in reference options.
1.3.0
Changes:
- Improve code generation (generated assembly) when using
opt::option
and other library related stuff. Now there is no overhead in using size optimization foropt::option
compared to standard'sstd::optional
. - Fix the implementation of forward declared
std::get_if
. - Remove
.replace
method inopt::option
. Usestd::exchange
instead. - Move
opt::option<T>::flatten
method into seperate functionopt::flatten
. Extended functionality ofopt::flatten
, now it support any level ofopt::option
nesting. - Move
opt::option<T>::unzip
method into seperate functionopt::unzip
. - Extended functionalify of
operator|
,operator&
andoperator^
. - Add
opt::at_front
andopt::at_back
functions. - Add
opt::lookup
. - Replace documentation in 'docs/markdown' with on site one: https://nuclear-bomb.github.io/option/#/ .
1.2.0
Changes:
- Faster compile times for
opt::option
(faster instantiation time) and other stuff. - Add support for Clang's Consumed Annotation Checking for
opt::option
(not recommended though). - Add
.value_or_construct
, add default template argument for.value_or
(implements P2218: More flexible optional::value_or() proposal). - Make comparison operators (e.g.
operator==
,operator<
, etc.) foropt::option
SFINAE-friendly. - For
opt::option
, use direct-list-initialization if type is an aggregate, otherwise use direct-initialization when constructing (direct-initialization less strict than direct-list-initialization). - Make constructors and assignment operators for reference types in
opt::option
SFINAE-friendly.
1.1.0
Changes:
- Rename CMake variables to avoid collisions outside the library:
BUILD_TEST
->OPTION_TEST
BUILD_EXAMPLES
->OPTION_EXAMPLES
INSTALL_OPTION
->OPTION_INSTALL
- Add prefix
OPTION_
to:USE_NATVIS
,USE_NATSTEPFILTER
.
- Remove SFINAE checks from methods to improve compile time
- Add
.begin
and.end
methods. (P1255R12: Givestd::optional
Range Support proposal). - Add "code equivalent" description for function in the documentation.
- Remove size optimization for 16-bit pointers.
- Add support for godbolt (Compiler Explorer) header
#include
through URL.
1.0.0
First release.