import std;
template typeinfoaa(alias F,S){
S[TypeInfo] data;
template has(T){
static this(){
data[typeid(T)]=F!T;
}
bool has()=> true; //look I just added it, therefore is has T :)
}}
template grabsizeof(T){
enum grabsizeof=T.sizeof;
}
unittest{
alias foo=typeinfoaa!(grabsizeof,typeof(int.sizeof));
static assert(foo.has!int);
static assert(foo.has!float);
foo.data[typeid(int)].writeln;//crashes but I just asserted foo has an int :(
foo.data[typeid(float)].writeln;
}