Structs and compiletime evaluation
D_Learner via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Aug 13 05:48:12 PDT 2015
On Thursday, 13 August 2015 at 12:21:44 UTC, Rikki Cattermole
wrote:
> On Thursday, 13 August 2015 at 12:07:48 UTC, D_Learner wrote:
>> I am having this struct :-
>>
>> struct COMPILETIME_BM_PRE
>> {
>> void initialisebmBc(S,C,I,int k)( const S pattern ,ref
>> I[C] bmBc){
>> static if ( k< ASIZE ){
>> bmBc[ALPHABET[k]] = size;
>> initialisebmBc!(S,C,I,k+1)( pattern ,bmBc);
>> }
>> }
>> void initialisebmBc(S,C,I,int k : ASIZE)( const S
>> pattern ,ref I[C] bmBc){}
>>
>> [...]
>
> No it wouldn't be. It's declared for runtime usage. Not compile
> time.
> Also bmBc isn't declared as an enum (can't be in fact, bug with
> AA's). So even if bmh was accessible, bmBc isn't.
Thanks Rikki, but what do you mean by AA's ?
More information about the Digitalmars-d-learn
mailing list