December 27, 2016
https://issues.dlang.org/show_bug.cgi?id=16705

--- Comment #7 from github-bugzilla@puremagic.com ---
Commits pushed to scope at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/a7597df60ed7f78988e875d25b6d48b48189cc33 Fix issue 16705 - TaskPool.reduce fails to compile "cannot get frame pointer to D main"

https://github.com/dlang/phobos/commit/6a7ad38562882e3587ed68e42e6706e2c23ab1af Merge pull request #4915 from ZombineDev/patch-8

--
January 16, 2017
https://issues.dlang.org/show_bug.cgi?id=16705

--- Comment #8 from github-bugzilla@puremagic.com ---
Commits pushed to newCTFE at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/a7597df60ed7f78988e875d25b6d48b48189cc33 Fix issue 16705 - TaskPool.reduce fails to compile "cannot get frame pointer to D main"

https://github.com/dlang/phobos/commit/6a7ad38562882e3587ed68e42e6706e2c23ab1af Merge pull request #4915 from ZombineDev/patch-8

--
April 01, 2019
https://issues.dlang.org/show_bug.cgi?id=16705

feklushkin.denis@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |feklushkin.denis@gmail.com

--
April 01, 2019
https://issues.dlang.org/show_bug.cgi?id=16705

--- Comment #9 from feklushkin.denis@gmail.com ---
Probably, more info here: https://issues.dlang.org/show_bug.cgi?id=17092

--
December 12, 2019
https://issues.dlang.org/show_bug.cgi?id=16705

berni44 <bugzilla@d-ecke.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw@gdcproject.org

--- Comment #10 from berni44 <bugzilla@d-ecke.de> ---
*** Issue 17092 has been marked as a duplicate of this issue. ***

--
December 27, 2019
https://issues.dlang.org/show_bug.cgi?id=16705

berni44 <bugzilla@d-ecke.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@d-ecke.de

--- Comment #11 from berni44 <bugzilla@d-ecke.de> ---
Not sure, if this helps. With the help of dustmite I reduced the example and Phobos to the following code:

---
void main()
{
    TaskPool pool;
    pool.reduce(map!(a=>1));
}

struct Task(Args)
{
    Args a;
}

struct TaskPool
{
    auto reduce(Args)(Args args)
    {
        return Task!(typeof(args))();
    }
}

auto map(fun...)()
{
    return MapResult!fun();
}

struct MapResult(alias fun)
{
    void x() {}
}
---

--
August 09, 2021
https://issues.dlang.org/show_bug.cgi?id=16705

Ajieskola@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Ajieskola@gmail.com

--- Comment #12 from Ajieskola@gmail.com ---
Simplified case of what the frame pointer error is about:

```d
void main()
{ struct X{ void x(){} }
  auto a = defInit!X;
}

auto defInit(T)(){ return T(); }
```

This won't work, because `struct X` default constructor needs a hidden pointer to `main` local variables, and `defInit` does not have that pointer. So far, so good.

However, it also fails in this form:

```d
void main()
{ auto a = defInit!(X!(x=>1));
}

struct X(alias f){ void x(){} }
auto defInit(T)(){ return T(); }
```

I would have expected this one to pass. `x=>1` is completely context independant, so theoretically `X` should not need a frame pointer to `main()`. I'm not sure what the langauge spec says about this.

--
August 09, 2021
https://issues.dlang.org/show_bug.cgi?id=16705

--- Comment #13 from Ajieskola@gmail.com ---
Simplified test case of the issue itself:

```d
void main()
{   import std.parallelism;

    struct MyIota
    { size_t front;
      void popFront(){front++;}
      auto empty(){return front >= 100;}
      auto opIndex(size_t i){return front+i;}
      auto length(){return 100-front;}
    }

    auto mySum = taskPool.reduce!"a + b"(MyIota());
}
```

--
September 30, 2021
https://issues.dlang.org/show_bug.cgi?id=16705

--- Comment #14 from Dlang Bot <dlang-bot@dlang.rocks> ---
@dukc created dlang/phobos pull request #8258 "Fix regression 16705" fixing this issue:

- Fix issue 16705 - TaskPool.reduce did not work with non-copyable ranges

https://github.com/dlang/phobos/pull/8258

--
October 15, 2021
https://issues.dlang.org/show_bug.cgi?id=16705

--- Comment #15 from Dlang Bot <dlang-bot@dlang.rocks> ---
@dukc created dlang/phobos pull request #8282 "Fix regression 16705 - another attempt" fixing this issue:

- Fix issue 16705 - TaskPool.reduce did not work with non-default initializable ranges

https://github.com/dlang/phobos/pull/8282

--