Parameter pack issue on VS2015
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!
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.
That feature is definitely on the VC++ roadmap. It's in the fifth column, half way down, next to C++11 preprocessor.
next to C++11 preprocessor.
Lol
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.
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!
Their compiler architecture is ancient and thus they are struggling a lot with this feature.
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.)
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.
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.