range-v3 icon indicating copy to clipboard operation
range-v3 copied to clipboard

Parameter pack issue on VS2015

Open elador opened this issue 11 years ago • 9 comments

I just had a go at compiling with the VS 2015 preview, but I get tons of:

error C3546: '...': there are no parameter packs available to expand act.concepts meta.hpp 899

For example, it would be this line:

template<typename ...List, typename Fun>
struct transform_<list<List...>, Fun, void>
{
    using type = list<apply<Fun, List>...>; // <---
};

While I have some (limited) knowledge about templates and variadics, I have no clue how to even approach this, even with this SO post, which seems quite related.

I understand that this library is more of a proof-of-concept, (and I think the author uses gcc under Windows ;-) ), and yea, VS still lacks behind a lot in terms of C++11/14. But I think VS 2015 would be a really really reasonable and awesome target for this library to run on. I would love to use it!

elador avatar Dec 08 '14 21:12 elador

But I think VS 2015 would be a really really reasonable and awesome target for this library to run on.

Sadly not. Range-v3 requires a conforming C++11 compiler. VS 2015 doesn't make the cut. Range-v3 needs generalized SFINAE for expressions. It's not even on the VC++ roadmap, I'm afraid.

ericniebler avatar Dec 08 '14 22:12 ericniebler

That feature is definitely on the VC++ roadmap. It's in the fifth column, half way down, next to C++11 preprocessor.

DeadMG avatar Dec 08 '14 23:12 DeadMG

next to C++11 preprocessor.

Lol

pfultz2 avatar Dec 08 '14 23:12 pfultz2

I'm looking at slide 3 of Herb's slide deck here. I see things that have a medium probability of making it into 2015 colored yellow. Expression SFINAE is left white. To me, it says that expression SFINAE isn't making the cut for 2015. AFAIK, Microsoft hasn't said when the feature is likely to appear.


EDIT: And to be clear, the feature needs to exist, and it needs to work reliably. There's a good chance that Microsoft doesn't get it right (or right enough) on the first try. Really, I don't see range-v3 compiling on an officially supported Microsoft compiler within the next 2 years.

ericniebler avatar Dec 08 '14 23:12 ericniebler

Thank you very much for the detailed explanation! I'm very sad to hear that, but the ball clearly seems to be in Microsofts hands. Too bad! Thank you!

elador avatar Dec 09 '14 11:12 elador

Their compiler architecture is ancient and thus they are struggling a lot with this feature.

Trass3r avatar Feb 20 '15 20:02 Trass3r

http://blogs.msdn.com/b/vcblog/archive/2015/04/29/c-11-14-17-features-in-vs-2015-rc.aspx

We're planning to start implementing Expression SFINAE in the compiler immediately after 2015 RTM, and we're planning to deliver it in an Update to 2015, supported for production use.  (But not necessarily 2015 Update 1.  It might take longer.)

Trass3r avatar Aug 13 '15 06:08 Trass3r

Even once they implement it, the probability that VC++'s expression SFINAE will be robust enough to handle range-v3 on their first outing is ... small. Unless they test with range-v3, that is.

ericniebler avatar Aug 13 '15 17:08 ericniebler

FWIW they do test against range-v3. @ericniebler does range-v3 use two-phase look-up a lot? I would be more worried about this.

gnzlbg avatar Aug 14 '15 08:08 gnzlbg