Releases: ddmitv/option
Releases · ddmitv/option
1.3.4
1.3.3
Changes:
- Add
opt::sentinel_option_traitstype. - Rename
.SENTINEL->.PADDINGmember in built-in option traits. - Fix the implementation of references in built-in
opt::option_traitsfor recursivemax_levelalgorithm. - Allow
std::in_placeconstructor for reference options if there is only one argument provided. - Fix implementation for
opt::option<T>::swapfor reference options. - Fix the implementation of
opt::zipfor reference options. - Fix the implementation for
opt::option_castfor reference options. - Make
.ptr_or_nullreturnstd::remove_reference_t<T&>*andstd::remove_reference_t<const T&>*to account for non-constreference options. - Add
std::hashfor lvalue and rvalue reference options. - Fix
operator->for non-constreference 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
.beginand.endmethods lifetimebound. - Remove requirement of
std::is_copy_constructible_v<T>in.take_ifmethod. - Fix non-
constexprdefault/opt::none_tconstructors inopt::option. - Fix compile error when using
operator=(const option<U>&)inopt::option. - Remove
option_fwd.hppinline code fromoption.hpp. - Add size optimization for
std::complex. - Add
opt::as_optionfunction. - Change the return type of
opt::from_nullabletoopt::option<T&>. - Make
opt::flattensometimes return reference options to make it more efficient. - Make
.inspectmethod invokefnwith rvalue references and only return*thislvalue reference.
1.3.1
Changes:
- Add method
.try_emplace. - Fix compilation error in
opt::option<T>::(const_)iteratorwhenTis a reference type (#2). - Fix non-working preprocessor macro
OPTION_USE_BUILTIN_TRAITS. - Optimize for compile time algorithm of searching maximum
max_levelvalue used in built-in option traits (e.g. forstd::tuple, reflectable types). - Add
static_assertcheck for reference options when constructing them from.mapand passed function returns a prvalue. - Add
OPTION_VERIFYcheck for null pointer dereferencing in.get_uncheckedin reference options.
1.3.0
Changes:
- Improve code generation (generated assembly) when using
opt::optionand other library related stuff. Now there is no overhead in using size optimization foropt::optioncompared to standard'sstd::optional. - Fix the implementation of forward declared
std::get_if. - Remove
.replacemethod inopt::option. Usestd::exchangeinstead. - Move
opt::option<T>::flattenmethod into seperate functionopt::flatten. Extended functionality ofopt::flatten, now it support any level ofopt::optionnesting. - Move
opt::option<T>::unzipmethod into seperate functionopt::unzip. - Extended functionalify of
operator|,operator&andoperator^. - Add
opt::at_frontandopt::at_backfunctions. - 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::optionSFINAE-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::optionSFINAE-friendly.
1.1.0
Changes:
- Rename CMake variables to avoid collisions outside the library:
BUILD_TEST->OPTION_TESTBUILD_EXAMPLES->OPTION_EXAMPLESINSTALL_OPTION->OPTION_INSTALL- Add prefix
OPTION_to:USE_NATVIS,USE_NATSTEPFILTER.
- Remove SFINAE checks from methods to improve compile time
- Add
.beginand.endmethods. (P1255R12: Givestd::optionalRange 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
#includethrough URL.