ericniebler / meta

A tiny metaprogramming library
Boost Software License 1.0
302 stars 46 forks source link

Alternate formulation of and_c that allows gcc5.1 to compile range-v3 #30

Closed CaseyCarter closed 9 years ago

CaseyCarter commented 9 years ago

Also fix clang-3.7 Travis builds using ericniebler/range-v3@d0ba804f

ericniebler commented 9 years ago

Interesting. What about meta:: or_c?

CaseyCarter commented 9 years ago

Interesting. What about meta:: or_c?

I don't know of a similar trick for computing or, and in any case meta::or_c doesn't break range-v3 tests with GCC 5.1 ;)

ericniebler commented 9 years ago

I prefer to put the new implementation under an ifdef with a comment that has the URL of the GCC bug it's working around.

CaseyCarter commented 9 years ago

Took me a while to find the PR, ironically enough it's for this exact line in meta.hpp:

% g++ -std=c++11 -c zip.ii ... /home/trippels/range-v3/include/meta/meta.hpp:887:66: internal compiler error: in tsubst, at cp/pt.c:12021

                                    integer_sequence<bool, (Bools || true)...>>;
ericniebler commented 9 years ago

Great, thanks.