ctRegex! vs regex error

Milvakili maliy.kayit at gmail.com
Wed Aug 7 15:36:37 PDT 2013


Hi,
I can compile

void main(){
auto myRegx = regex(`(?!test)`);
}

however can not compile this one

void main(){
auto myRegx =  ctRegex!(`(?!test)`);
}

code sample:http://dpaste.dzfl.pl/d38926f4

and get the following error:

/opt/compilers/dmd2/include/std/regex.d(4355): Error: 
"NeglookaheadStart"[0LU..17LU]
/opt/compilers/dmd2/include/std/regex.d(4313):        called from 
here: this.ctGenGroup(ir, result.addr)
/opt/compilers/dmd2/include/std/regex.d(4751):        called from 
here: this.ctGenBlock(re.ir, 0)
/opt/compilers/dmd2/include/std/regex.d(4800):        called from 
here: context.ctGenRegEx(re)
/opt/compilers/dmd2/include/std/regex.d(6487):        called from 
here: ctGenRegExCode(Regex(null, [Bytecode(2566914052u), 
Bytecode(1u), Bytecode(1u), Bytecode(2147483764u), 
Bytecode(2147483749u), Bytecode(2147483763u), 
Bytecode(2147483764u), Bytecode(2583691268u), 
Bytecode(2550136832u)], null, 1u, 0u, 0u, 7u, 0u, null, null, 
ShiftOr([4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 
4294967295u, 4294967295u], 4294967295u, 0u)))
/opt/compilers/dmd2/include/std/regex.d(6511): Error: template 
instance std.regex.ctRegexImpl!("(?!test)", []) error 
instantiating
/d53/f251.d(10):        instantiated from here: 
ctRegex!("(?!test)")
/d53/f251.d(10): Error: template instance 
std.regex.ctRegex!("(?!test)") error instantiating


More information about the Digitalmars-d mailing list