Skip to content

Releases: NUCLEAR-BOMB/option

1.3.4

21 Nov 13:25
Compare
Choose a tag to compare

Changes:

  • Make constructor from arguments (one without std::in_place) non-explicit.

1.3.3

20 Nov 12:41
Compare
Choose a tag to compare

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 recursive max_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 return std::remove_reference_t<T&>* and std::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

15 Nov 14:54
Compare
Choose a tag to compare

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 in opt::option.
  • Fix compile error when using operator=(const option<U>&) in opt::option.
  • Remove option_fwd.hpp inline code from option.hpp.
  • Add size optimization for std::complex.
  • Add opt::as_option function.
  • Change the return type of opt::from_nullable to opt::option<T&>.
  • Make opt::flatten sometimes return reference options to make it more efficient.
  • Make .inspect method invoke fn with rvalue references and only return *this lvalue reference.

1.3.1

12 Nov 16:11
Compare
Choose a tag to compare

Changes:

  • Add method .try_emplace.
  • Fix compilation error in opt::option<T>::(const_)iterator when T 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. for std::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

28 Oct 17:40
Compare
Choose a tag to compare

Changes:

  • Improve code generation (generated assembly) when using opt::option and other library related stuff. Now there is no overhead in using size optimization for opt::option compared to standard's std::optional.
  • Fix the implementation of forward declared std::get_if.
  • Remove .replace method in opt::option. Use std::exchange instead.
  • Move opt::option<T>::flatten method into seperate function opt::flatten. Extended functionality of opt::flatten, now it support any level of opt::option nesting.
  • Move opt::option<T>::unzip method into seperate function opt::unzip.
  • Extended functionalify of operator|, operator& and operator^.
  • Add opt::at_front and opt::at_back functions.
  • Add opt::lookup.
  • Replace documentation in 'docs/markdown' with on site one: https://nuclear-bomb.github.io/option/#/ .

1.2.0

24 Sep 12:45
Compare
Choose a tag to compare

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.) for opt::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

16 Sep 13:52
Compare
Choose a tag to compare

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: Give std::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

10 Sep 07:45
Compare
Choose a tag to compare

First release.