I need a meta-function that for given complete class type returns its template (e.g. f<foo<bar>>::type
or f<foo<baz>>::type
results in foo
).
Or it may return true
on f<foo<bar>, foo<baz>>::value
and false
on f<foo<bar>, not_foo<baz>>::value
P.S: this was meant to be used with many chrono::duration like classes (but for weight units, mass units and so on). I needed different units not to convert one to another.
true
onf<foo<bar>, foo<baz>>::value
andfalse
onf<foo1<bar>, foo2<bar>>::value
– Isaacsdecltype
? – Appendagedecltype
will result in complete typefoo<bar>
instead offoo
– Isaacstrue
andfalse
can be done, to getfoo
without mentioning for first I am not sure if it is even possible. Would ais_instantiation_of_foo < foo<bar> >
suffice? – Falcone