Skip to content

Implement workarounds for broken sizeof...

Carsten Gräser requested to merge feature/variadic-sizeof into master

This adds Dune::SizeOf that can be use as Dune::SizeOf<T...>::value as a drop in replacement for sizeof...(T). This is necessary because the latter is broken in clang<3.8. Because the bug also effects std::index_sequence_for we now always provide our manually written fallback implementation Std::index_sequence_for that works around the bug by using SizeOf.

As a rule of thumb you should always use SizeOf instead instead of sizeof... in variadic template aliases if you want to avoid compiling code that produces wrong results.

Merge request reports

Loading