On 2012-04-06 19:51, bls wrote:

Why not being more flexible .. Likewise

struct Annotation //Throw in all your annotations
{

Variant[] [string] map;

Variant[] opDispatch(string key)()
{
return map[key];
}

// Single value
Variant[] opDispatch(string key, T) (T t )
if ( !isArray!T && !isTuple!T )
{
index ~= key;
map[key] ~= to!Variant(t);
return map[key];
}
....Array, Tuple
}
well.. I am not sure about CTFE

Variant yet again. What with this Variant all the time.

--
/Jacob Carlborg

Reply via email to