weird error message

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 1 15:51:15 PDT 2017


On 07/01/2017 03:44 PM, crimaniak wrote:

 >     Captures c = findModule.output.matchFirst!(moduleMask);
 >
 > result (even C++ guys will be impressed):
 >
 > phobos_imports.d(43): Error: struct std.regex.Captures(R, DIndex =
 > size_t) if (isSomeString!R) is used as a type

 From the error message, it looks like Captures is a template. You can't 
use it as a type simply as 'Captures'. Better use 'auto' in its place:

     auto c = /* ... */

Ali



More information about the Digitalmars-d-learn mailing list