diff --git a/dev-cpp/range-v3/files/0.11.0-gcc10.patch b/dev-cpp/range-v3/files/0.11.0-gcc10.patch new file mode 100644 index 0000000000000..caebf0a631629 --- /dev/null +++ b/dev-cpp/range-v3/files/0.11.0-gcc10.patch @@ -0,0 +1,133 @@ +From a91f0e1be27a31c446452a753001d4518ef83a6b Mon Sep 17 00:00:00 2001 +From: Eric Niebler +Date: Mon, 17 Aug 2020 17:48:09 -0700 +Subject: [PATCH] work around premature instantiation problem on gcc; fixes + #1545 + +--- + include/range/v3/view/chunk.hpp | 6 +++--- + include/range/v3/view/split.hpp | 26 +++++++++++++------------- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/include/range/v3/view/chunk.hpp b/include/range/v3/view/chunk.hpp +index 0c03cf1eb..b8df13303 100644 +--- a/include/range/v3/view/chunk.hpp ++++ b/include/range/v3/view/chunk.hpp +@@ -313,8 +313,8 @@ namespace ranges + + public: + inner_view() = default; +- constexpr explicit inner_view(chunk_view_ & view) noexcept +- : rng_{&view} ++ constexpr explicit inner_view(chunk_view_ * view) noexcept ++ : rng_{view} + {} + CPP_auto_member + constexpr auto CPP_fun(size)()( +@@ -338,7 +338,7 @@ namespace ranges + constexpr inner_view read() const + { + RANGES_EXPECT(!done()); +- return inner_view{*rng_}; ++ return inner_view{rng_}; + } + constexpr bool done() const + { +diff --git a/include/range/v3/view/split.hpp b/include/range/v3/view/split.hpp +index facf1b37f..496220e4a 100644 +--- a/include/range/v3/view/split.hpp ++++ b/include/range/v3/view/split.hpp +@@ -389,19 +389,19 @@ namespace ranges + split_outer_iterator() = default; + + CPP_member +- constexpr explicit CPP_ctor(split_outer_iterator)(Parent & parent)( ++ constexpr explicit CPP_ctor(split_outer_iterator)(Parent * parent)( + /// \pre + requires (!forward_range)) +- : parent_(&parent) ++ : parent_(parent) + {} + + CPP_member +- constexpr CPP_ctor(split_outer_iterator)(Parent & parent, ++ constexpr CPP_ctor(split_outer_iterator)(Parent * parent, + iterator_t current)( + /// \pre + requires forward_range) + : Current{std::move(current)} +- , parent_(&parent) ++ , parent_(parent) + {} + + template(bool Other)( +@@ -519,7 +519,7 @@ namespace ranges + ranges::equal_to> && + (forward_range || detail::tiny_range) + #endif +- struct RANGES_EMPTY_BASES split_view ++ struct RANGES_EMPTY_BASES split_view + : view_interface, is_finite::value ? finite : unknown> + , private detail::split_view_base> + { +@@ -537,17 +537,17 @@ namespace ranges + #if RANGES_CXX_IF_CONSTEXPR < RANGES_CXX_IF_CONSTEXPR_17 + outer_iterator()> begin_(std::true_type) + { +- return outer_iterator()>{*this, ranges::begin(base_)}; ++ return outer_iterator()>{this, ranges::begin(base_)}; + } + outer_iterator begin_(std::false_type) + { + this->curr_ = ranges::begin(base_); +- return outer_iterator{*this}; ++ return outer_iterator{this}; + } + + outer_iterator()> end_(std::true_type) const + { +- return outer_iterator{*this, ranges::end(base_)}; ++ return outer_iterator{this, ranges::end(base_)}; + } + default_sentinel_t end_(std::false_type) const + { +@@ -580,11 +580,11 @@ namespace ranges + { + #if RANGES_CXX_IF_CONSTEXPR >= RANGES_CXX_IF_CONSTEXPR_17 + if constexpr(forward_range) +- return outer_iterator()>{*this, ranges::begin(base_)}; ++ return outer_iterator()>{this, ranges::begin(base_)}; + else + { + this->curr_ = ranges::begin(base_); +- return outer_iterator{*this}; ++ return outer_iterator{this}; + } + #else + return begin_(meta::bool_>{}); +@@ -596,7 +596,7 @@ namespace ranges + /// \pre + requires forward_range && forward_range) + { +- return {*this, ranges::begin(base_)}; ++ return {this, ranges::begin(base_)}; + } + CPP_member + constexpr auto end() // +@@ -604,14 +604,14 @@ namespace ranges + /// \pre + requires forward_range && common_range) + { +- return outer_iterator()>{*this, ranges::end(base_)}; ++ return outer_iterator()>{this, ranges::end(base_)}; + } + constexpr auto end() const + { + #if RANGES_CXX_IF_CONSTEXPR >= RANGES_CXX_IF_CONSTEXPR_17 + if constexpr(forward_range && forward_range && + common_range) +- return outer_iterator{*this, ranges::end(base_)}; ++ return outer_iterator{this, ranges::end(base_)}; + else + return default_sentinel; + #else diff --git a/dev-cpp/range-v3/range-v3-0.11.0.ebuild b/dev-cpp/range-v3/range-v3-0.11.0.ebuild index a4019f9f11f02..a12572613b500 100644 --- a/dev-cpp/range-v3/range-v3-0.11.0.ebuild +++ b/dev-cpp/range-v3/range-v3-0.11.0.ebuild @@ -15,7 +15,10 @@ KEYWORDS="~amd64 ~ppc64" IUSE="test" RESTRICT="!test? ( test )" -PATCHES=( "${FILESDIR}/0.11.0-no-werror.patch" ) +PATCHES=( + "${FILESDIR}/0.11.0-no-werror.patch" + "${FILESDIR}/0.11.0-gcc10.patch" +) src_prepare() { # header-only libraries go to arch-independent dirs