mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
134 lines
5.2 KiB
Diff
134 lines
5.2 KiB
Diff
From a91f0e1be27a31c446452a753001d4518ef83a6b Mon Sep 17 00:00:00 2001
|
|
From: Eric Niebler <eniebler@boost.org>
|
|
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<Base>))
|
|
- : parent_(&parent)
|
|
+ : parent_(parent)
|
|
{}
|
|
|
|
CPP_member
|
|
- constexpr CPP_ctor(split_outer_iterator)(Parent & parent,
|
|
+ constexpr CPP_ctor(split_outer_iterator)(Parent * parent,
|
|
iterator_t<Base> current)(
|
|
/// \pre
|
|
requires forward_range<Base>)
|
|
: Current{std::move(current)}
|
|
- , parent_(&parent)
|
|
+ , parent_(parent)
|
|
{}
|
|
|
|
template(bool Other)(
|
|
@@ -519,7 +519,7 @@ namespace ranges
|
|
ranges::equal_to> &&
|
|
(forward_range<V> || detail::tiny_range<Pattern>)
|
|
#endif
|
|
- struct RANGES_EMPTY_BASES split_view
|
|
+ struct RANGES_EMPTY_BASES split_view
|
|
: view_interface<split_view<V, Pattern>, is_finite<V>::value ? finite : unknown>
|
|
, private detail::split_view_base<iterator_t<V>>
|
|
{
|
|
@@ -537,17 +537,17 @@ namespace ranges
|
|
#if RANGES_CXX_IF_CONSTEXPR < RANGES_CXX_IF_CONSTEXPR_17
|
|
outer_iterator<simple_view<V>()> begin_(std::true_type)
|
|
{
|
|
- return outer_iterator<simple_view<V>()>{*this, ranges::begin(base_)};
|
|
+ return outer_iterator<simple_view<V>()>{this, ranges::begin(base_)};
|
|
}
|
|
outer_iterator<false> begin_(std::false_type)
|
|
{
|
|
this->curr_ = ranges::begin(base_);
|
|
- return outer_iterator<false>{*this};
|
|
+ return outer_iterator<false>{this};
|
|
}
|
|
|
|
outer_iterator<simple_view<V>()> end_(std::true_type) const
|
|
{
|
|
- return outer_iterator<true>{*this, ranges::end(base_)};
|
|
+ return outer_iterator<true>{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<V>)
|
|
- return outer_iterator<simple_view<V>()>{*this, ranges::begin(base_)};
|
|
+ return outer_iterator<simple_view<V>()>{this, ranges::begin(base_)};
|
|
else
|
|
{
|
|
this->curr_ = ranges::begin(base_);
|
|
- return outer_iterator<false>{*this};
|
|
+ return outer_iterator<false>{this};
|
|
}
|
|
#else
|
|
return begin_(meta::bool_<forward_range<V>>{});
|
|
@@ -596,7 +596,7 @@ namespace ranges
|
|
/// \pre
|
|
requires forward_range<V> && forward_range<const V>)
|
|
{
|
|
- 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<V> && common_range<V>)
|
|
{
|
|
- return outer_iterator<simple_view<V>()>{*this, ranges::end(base_)};
|
|
+ return outer_iterator<simple_view<V>()>{this, ranges::end(base_)};
|
|
}
|
|
constexpr auto end() const
|
|
{
|
|
#if RANGES_CXX_IF_CONSTEXPR >= RANGES_CXX_IF_CONSTEXPR_17
|
|
if constexpr(forward_range<V> && forward_range<const V> &&
|
|
common_range<const V>)
|
|
- return outer_iterator<true>{*this, ranges::end(base_)};
|
|
+ return outer_iterator<true>{this, ranges::end(base_)};
|
|
else
|
|
return default_sentinel;
|
|
#else
|