From 6078f073feb8560127fbf0308b3794a551146252 Mon Sep 17 00:00:00 2001 From: Kris Jusiak Date: Tue, 21 Jul 2020 20:31:24 -0600 Subject: [PATCH] :arrow_up: [v1.2.0] Update version Problem: - Support for multiple compilers has been added. Solution: - Bump version to `1.2.0`. --- README.md | 1 + doc/CHANGELOG.md | 20 +++++++++++++++ include/boost/di.hpp | 58 ++++++++++++++++++++++---------------------- 3 files changed, 50 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 16d63462d2..ef115da4b6 100644 --- a/README.md +++ b/README.md @@ -431,6 +431,7 @@ retq * [Shared Scope](https://boost-ext.github.io/di/extensions.html#shared-scope) * [FAQ](https://boost-ext.github.io/di/FAQ.html) * [CHANGELOG](https://boost-ext.github.io/di/CHANGELOG.html) + * [[1.2.0] - 2020-07-21](https://boost-ext.github.io/di/CHANGELOG.html#120-2020-07-21) * [[1.1.0] - 2019-01-07](https://boost-ext.github.io/di/CHANGELOG.html#110-2019-01-07) * [[1.0.2] - 2018-01-04](https://boost-ext.github.io/di/CHANGELOG.html#102-2018-01-04) * [[1.0.1] - 2016-05-04](https://boost-ext.github.io/di/CHANGELOG.html#101-2016-05-04) diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index d66dfbb7e2..1b6f595d32 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,22 @@ +## [1.2.0] - 2020-07-21 +- **Additions** + - Support for Clang-9/Clang-10/XCode-11 + - Support for GCC-9/10 + - Support for MSVC-2019 + - Support for Meson build system +> +- **Bug Fixes** + - [Issues](https://github.com/boost-ext/di/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed+closed%3A2019-01-07..2020-07-21+) +> +- **Contributions** + - [Kanstantsin Chernik](https://github.com/kanstantsin-chernik) + - [Reza Housseini](Reza Housseini) + - [Paul Kunysch](https://github.com/pck) + - [James P. Harvey](https://github.com/jamespharvey20) + - [Anes Belfodil](https://github.com/abelfodil) + - [Alexey-Bogomolov](https://github.com/Alexey-Bogomolov) + - [mlimber](https://github.com/mlimber) + ## [1.1.0] - 2019-01-07 - **Additions** - Support for Clang-5.0/6.0/7.0 @@ -88,6 +107,7 @@ --- +[1.2.0]: https://github.com/boost-ext/di/compare/v1.1.0...v1.2.0 [1.1.0]: https://github.com/boost-ext/di/compare/v1.0.2...v1.1.0 [1.0.2]: https://github.com/boost-ext/di/compare/v1.0.1...v1.0.2 [1.0.1]: https://github.com/boost-ext/di/compare/v1.0.0...v1.0.1 diff --git a/include/boost/di.hpp b/include/boost/di.hpp index 690c17f201..db4fed98fe 100644 --- a/include/boost/di.hpp +++ b/include/boost/di.hpp @@ -8,12 +8,12 @@ #if (__cplusplus < 201305L && _MSC_VER < 1900) #error "[Boost::ext].DI requires C++14 support (Clang-3.4+, GCC-5.1+, MSVC-2015+)" #else -#define BOOST_DI_VERSION 1'1'0 +#define BOOST_DI_VERSION 1'2'0 #define BOOST_DI_NAMESPACE_BEGIN \ namespace boost { \ inline namespace ext { \ namespace di { \ - inline namespace v1_1_0 { + inline namespace v1_2_0 { #define BOOST_DI_NAMESPACE_END \ } \ } \ @@ -344,8 +344,8 @@ class instance; class singleton; class unique; } -#define __BOOST_DI_REQUIRES(...) typename ::boost::ext::di::v1_1_0::aux::enable_if<__VA_ARGS__, int>::type -#define __BOOST_DI_REQUIRES_MSG(...) typename ::boost::ext::di::v1_1_0::aux::concept_check<__VA_ARGS__>::type +#define __BOOST_DI_REQUIRES(...) typename ::boost::ext::di::v1_2_0::aux::enable_if<__VA_ARGS__, int>::type +#define __BOOST_DI_REQUIRES_MSG(...) typename ::boost::ext::di::v1_2_0::aux::concept_check<__VA_ARGS__>::type namespace aux { template T&& declval(); @@ -627,11 +627,11 @@ template auto has_shared_ptr__(T &&) -> is_valid_expr{})>; #endif template -decltype(::boost::ext::di::v1_1_0::aux::declval().operator()(::boost::ext::di::v1_1_0::aux::declval()...), - ::boost::ext::di::v1_1_0::aux::true_type()) +decltype(::boost::ext::di::v1_2_0::aux::declval().operator()(::boost::ext::di::v1_2_0::aux::declval()...), + ::boost::ext::di::v1_2_0::aux::true_type()) is_invocable_impl(int); template -::boost::ext::di::v1_1_0::aux::false_type is_invocable_impl(...); +::boost::ext::di::v1_2_0::aux::false_type is_invocable_impl(...); template struct is_invocable : decltype(is_invocable_impl(0)) {}; struct callable_base_impl { @@ -954,10 +954,10 @@ struct pool> : TArgs... { #endif namespace type_traits { template -struct is_injectable : ::boost::ext::di::v1_1_0::aux::false_type {}; +struct is_injectable : ::boost::ext::di::v1_2_0::aux::false_type {}; template -struct is_injectable> - : ::boost::ext::di::v1_1_0::aux::true_type {}; +struct is_injectable> + : ::boost::ext::di::v1_2_0::aux::true_type {}; struct direct {}; struct uniform {}; template @@ -1414,10 +1414,10 @@ struct wrapper_traits> { template using wrapper_traits_t = typename wrapper_traits::type; template -struct has_result_type : ::boost::ext::di::v1_1_0::aux::false_type {}; +struct has_result_type : ::boost::ext::di::v1_2_0::aux::false_type {}; template -struct has_result_type> - : ::boost::ext::di::v1_1_0::aux::true_type {}; +struct has_result_type> + : ::boost::ext::di::v1_2_0::aux::true_type {}; template struct is_expr : aux::integral_constant< @@ -1952,7 +1952,7 @@ struct scope_traits> { }; } #if !defined(BOOST_DI_CFG) -#define BOOST_DI_CFG ::boost::ext::di::v1_1_0::config +#define BOOST_DI_CFG ::boost::ext::di::v1_2_0::config #endif template ) = 0> inline auto make_policies(TPolicies... args) noexcept { @@ -2596,7 +2596,7 @@ class injector : public injector_base, public pool> { using type = any_type_1st_ref; }; template - struct try_create<::boost::ext::di::v1_1_0::named> { + struct try_create<::boost::ext::di::v1_2_0::named> { using type = aux::conditional_t::value, T, void>; }; template @@ -2632,7 +2632,7 @@ class injector : public injector_base, public pool> { return any_type_1st_ref{*this}; } template - auto create_impl(const aux::type<::boost::ext::di::v1_1_0::named>&) const { + auto create_impl(const aux::type<::boost::ext::di::v1_2_0::named>&) const { return create_impl__(); } template @@ -2665,7 +2665,7 @@ class injector : public injector_base, public pool> { return successful::any_type_1st_ref{*this}; } template - auto create_successful_impl(const aux::type<::boost::ext::di::v1_1_0::named>&) const { + auto create_successful_impl(const aux::type<::boost::ext::di::v1_2_0::named>&) const { return create_successful_impl__(); } template @@ -2820,7 +2820,7 @@ class injector, TDeps...> : public injector_base, public pool; }; template - struct try_create<::boost::ext::di::v1_1_0::named> { + struct try_create<::boost::ext::di::v1_2_0::named> { using type = aux::conditional_t::value, T, void>; }; template @@ -2856,7 +2856,7 @@ class injector, TDeps...> : public injector_base, public pool{*this}; } template - auto create_impl(const aux::type<::boost::ext::di::v1_1_0::named>&) const { + auto create_impl(const aux::type<::boost::ext::di::v1_2_0::named>&) const { return create_impl__(); } template @@ -2889,7 +2889,7 @@ class injector, TDeps...> : public injector_base, public pool{*this}; } template - auto create_successful_impl(const aux::type<::boost::ext::di::v1_1_0::named>&) const { + auto create_successful_impl(const aux::type<::boost::ext::di::v1_2_0::named>&) const { return create_successful_impl__(); } template @@ -3024,8 +3024,8 @@ using injector = detail::injector< aux::type_list, type_traits::add_named_t...>>>; #endif // clang-format off -#define __BOOST_DI_EXPOSE_IMPL__(...) decltype(::boost::ext::di::v1_1_0::detail::__VA_ARGS__), -#define __BOOST_DI_EXPOSE_IMPL(...) ::boost::ext::di::v1_1_0::named<__BOOST_DI_EXPOSE_IMPL__ __VA_ARGS__> +#define __BOOST_DI_EXPOSE_IMPL__(...) decltype(::boost::ext::di::v1_2_0::detail::__VA_ARGS__), +#define __BOOST_DI_EXPOSE_IMPL(...) ::boost::ext::di::v1_2_0::named<__BOOST_DI_EXPOSE_IMPL__ __VA_ARGS__> #define BOOST_DI_EXPOSE(...) __BOOST_DI_IF(__BOOST_DI_IBP(__VA_ARGS__), __BOOST_DI_EXPOSE_IMPL, __BOOST_DI_EXPAND)(__VA_ARGS__) // clang-format on #if defined(__MSVC__) @@ -3288,7 +3288,7 @@ struct named_impl { static constexpr __BOOST_DI_UNUSED named_impl named{}; template struct combine_impl { - using type = ::boost::ext::di::v1_1_0::named; + using type = ::boost::ext::di::v1_2_0::named; }; template struct combine_impl { @@ -3312,23 +3312,23 @@ using inject = aux::type_list; __BOOST_DI_IF(i, __BOOST_DI_COMMA, __BOOST_DI_EAT)() __BOOST_DI_IF(__BOOST_DI_IBP(p), __BOOST_DI_EAT p, p) #define __BOOST_DI_GEN_CTOR(i, ...) __BOOST_DI_GEN_CTOR_IMPL(__BOOST_DI_ELEM(i, __VA_ARGS__, ), i) #define __BOOST_DI_GEN_ARG_NAME(p) __BOOST_DI_GEN_ARG_NAME_IMPL p ) -#define __BOOST_DI_GEN_NONE_TYPE(p) ::boost::ext::di::v1_1_0::aux::none_type -#define __BOOST_DI_GEN_ARG_NAME_IMPL(p) decltype(::boost::ext::di::v1_1_0::detail::p) __BOOST_DI_EAT( +#define __BOOST_DI_GEN_NONE_TYPE(p) ::boost::ext::di::v1_2_0::aux::none_type +#define __BOOST_DI_GEN_ARG_NAME_IMPL(p) decltype(::boost::ext::di::v1_2_0::detail::p) __BOOST_DI_EAT( #define __BOOST_DI_GEN_NAME_IMPL(p, i) \ __BOOST_DI_IF(i, __BOOST_DI_COMMA, __BOOST_DI_EAT) \ () __BOOST_DI_IF(__BOOST_DI_IBP(p), __BOOST_DI_GEN_ARG_NAME, __BOOST_DI_GEN_NONE_TYPE)(p) #define __BOOST_DI_GEN_NAME(i, ...) __BOOST_DI_GEN_NAME_IMPL(__BOOST_DI_ELEM(i, __VA_ARGS__, ), i) #define __BOOST_DI_INJECT_TRAITS_IMPL_0(...) \ static void ctor(__BOOST_DI_REPEAT(__BOOST_DI_SIZE(__VA_ARGS__), __BOOST_DI_GEN_CTOR, __VA_ARGS__)); \ - using type __BOOST_DI_UNUSED = ::boost::ext::di::v1_1_0::aux::function_traits_t; + using type __BOOST_DI_UNUSED = ::boost::ext::di::v1_2_0::aux::function_traits_t; #define __BOOST_DI_INJECT_TRAITS_IMPL_1(...) \ static void ctor(__BOOST_DI_REPEAT(__BOOST_DI_SIZE(__VA_ARGS__), __BOOST_DI_GEN_CTOR, __VA_ARGS__)); \ static void name(__BOOST_DI_REPEAT(__BOOST_DI_SIZE(__VA_ARGS__), __BOOST_DI_GEN_NAME, __VA_ARGS__)); \ using type __BOOST_DI_UNUSED = \ - ::boost::ext::di::v1_1_0::detail::combine_t<::boost::ext::di::v1_1_0::aux::function_traits_t, \ - ::boost::ext::di::v1_1_0::aux::function_traits_t>; + ::boost::ext::di::v1_2_0::detail::combine_t<::boost::ext::di::v1_2_0::aux::function_traits_t, \ + ::boost::ext::di::v1_2_0::aux::function_traits_t>; #define __BOOST_DI_INJECT_TRAITS_EMPTY_IMPL(...) \ - using boost_di_inject__ __BOOST_DI_UNUSED = ::boost::ext::di::v1_1_0::aux::type_list<> + using boost_di_inject__ __BOOST_DI_UNUSED = ::boost::ext::di::v1_2_0::aux::type_list<> #define __BOOST_DI_INJECT_TRAITS_IMPL(...) \ struct boost_di_inject__ { \ __BOOST_DI_CAT(__BOOST_DI_INJECT_TRAITS_IMPL_, __BOOST_DI_HAS_NAMES(__VA_ARGS__)) \