mpark / variant

C++17 `std::variant` for C++11/14/17
https://mpark.github.io/variant
Boost Software License 1.0
659 stars 88 forks source link

Backport to GCC 4.8 #37

Closed mpark closed 6 years ago

tzlaine commented 6 years ago

ETA? Would it help to prod you on this if I told you I just recommended this implementation to some at-risk youths who are forced to use GCC 4.8.3?

mpark commented 6 years ago

Hi Zach! I'm planning to work on this next week. Last time I tried this it was having trouble with the cartesian product generation here: https://github.com/mpark/variant/blob/master/include/mpark/variant.hpp#L574-L575

So I'll have to figure out how to deal with that part.

Thanks for the recommendation!

mpark commented 6 years ago

Closed by 12b77f3325b81ba56a3c3f0b88e61b57505b9ff0.

The minimum repro of the problems were https://wandbox.org/permlink/ypmovjwyTaXnSnwy. In short, S<alias<pack..., thing>> drops thing and incorrectly passes alias<pack...> instead.

This caused the true in all implementation to be dropped in bool_sequence<Bs..., true>, and the J was dropped in index_sequence<Is..., J>. Since the issue was due to the fact that bool_sequence and index_sequence are aliases, integer_sequence is now used directly.

tzlaine commented 6 years ago

Thanks for the quick resolution!