On Thursday, 10 January 2013 at 19:57:29 UTC, Dmitry Olshansky
wrote:
Why not try to make an AA literal a universal entity for all
kinds of user-defined associative arrays? Then the actual
construction of AA is done via constructor taking some type
like AALiteral!(Key, Value) which is a sequence of Key, Value
pairs. It could be even presorted.
Only problem I would see with that, is trying to give something
to a non-template function.
auto x = AALiteral!(string, string)([]);
void func(string[string] something);
func(x); // x is not type string[string], is type
xxx!string,string
Course that brings up problem(s) with my own idea thrown out
there.
Seems like the problem is just determining storage type, at CTFE
it calls one type of constructor while the non-CTFE calls
another; So long as the structure is the same then passing it
around wouldn't matter.