diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..0b35ee2f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,44 @@ +## Version 0.2 + +This release took a long time, so here are just the most important changes. + +* Added `downcast()` utility function +* Fixed GCC 4.8 and clang support +* Improved documentation +* Improved CMake and added Conan support +* Hashing support for `boolean`, `integer`, `floating_point` and `strong_typedef` + +## Vocabulary Types + +* Added `object_ref` and and `xvalue_ref` +* Added `array_ref` +* Added `function_ref` +* Added `flag_set` +* Breaking: renamed `distance_t` to `difference_t` +* Improved `index_t` and `difference_t` + +### Optional & Variant: + +* Breaking: `optional` now auto-unwraps, removed `unwrap()` function +* Breaking: `optional_ref` creation function now `opt_ref()` instead of `ref()`, but more than before +* Breaking: Removed `optional_ref::value_or()` +* Added `optional_for` utility typedef +* Added support for additional parameters to `with()` and make it more optimizer friendly +* Added `with()` for `tagged_union` +* Improved map functions: additional arguments, member function pointers, `void` returning function objects +* Bugfix for trivial variant copy/move/destroy + +### Type Safe Building Blocks: + +* Added pointer like access to `constrained_type` +* Added `constrained_ref` +* Added `throwing_verifier` for `constrained_ref` along with `sanitize()` helper functions +* Added literal operator to create a static bound of `bounded_type` +* Added bitwise operators for `strong_typedef` +* Added `constexpr` support to `strong_typedef` +* Added support for mixed operators in `strong_typedef` +* Made `constrained_type` `constexpr` +* Fixed strong typedef `get()` for rvalues + + +Thanks to @johelgp, @xtofl, @nicola-gigante, @BRevzin, @verri, @lisongmin, @Manu343726, @MandarJKulkarni, @gerboengels. diff --git a/CMakeLists.txt b/CMakeLists.txt index 1eec2891..9c6b4767 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,7 @@ set(detail_header_files ${CMAKE_CURRENT_SOURCE_DIR}/include/type_safe/detail/copy_move_control.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/type_safe/detail/force_inline.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/type_safe/detail/is_nothrow_swappable.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/type_safe/detail/map_invoke.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/type_safe/detail/variant_impl.hpp) set(header_files ${CMAKE_CURRENT_SOURCE_DIR}/include/type_safe/config.hpp diff --git a/conanfile.py b/conanfile.py index 1a2af334..cb849e21 100644 --- a/conanfile.py +++ b/conanfile.py @@ -5,7 +5,7 @@ class TypeSafe(ConanFile): name = 'type_safe' url = 'https://github.com/foonathan/type_safe' - version = '0.1' + version = '0.2' requires = 'debug_assert/1.3@Manu343726/testing' exports = '*.hpp' generators = 'cmake' diff --git a/external/debug_assert b/external/debug_assert index cdd21e8b..dfeca6bb 160000 --- a/external/debug_assert +++ b/external/debug_assert @@ -1 +1 @@ -Subproject commit cdd21e8be0d2b7794e41fdd87400cd497615a92d +Subproject commit dfeca6bbd685c2036a1682e975cbcec041d397c4