Skip to content

Feature/guarded concept check

pipping requested to merge feature/guarded-concept-check into feature/new_tnnmg

Logical conjunction in templates does not appear to short-circuit. The concept check IsLessThanComparable fails to compile for tuples with clang and this cannot be helped by with a construct such as

models<Concept::IsLessThanComparable, V, L>() and not IsTupleOrDerived<V>()

as you can find it in boxconstrainedquadraticfunctional.hh -- also not if the order is reversed.

I've added a struct that evaluates the concept lazily -- only if it has to. Maybe such a thing already exists (I don't know -- it's not exactly rocket science). Maybe the name sucks ('lazy' rather than 'guarded'?). I'm putting this out here because it achieves the vital goal of making the final missing test on the new_tnnmg branch compile with clang for me but I consider it too controversial to push it as a compile-fix.

Merge request reports