https://issues.dlang.org/show_bug.cgi?id=16608

Ketmar Dark <ket...@ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ket...@ketmar.no-ip.org

--- Comment #2 from Ketmar Dark <ket...@ketmar.no-ip.org> ---
yeah, semi-known thing for static foreach: sometimes it is failing to
instantiate 2nd and more template instances. actually, not really failing, but
cannot see that templates for different iterations are really different, and
merging 'em into one.

afair, here frontend sees a template whose signature (mangled name, actually)
doesn't change between iterations, and deciding that one will be enough. ;-)

this is hard to fix without introducing some (noticable) slowdown (or, maybe,
proper `static foreach` operator).

for now, force instantiation with alias seems to be the only solution (this is
for those people who interested in workaround until this issue is somehow
fixed):

alias cc = condition!s;
... anySatisfy!(cc, AliasSeq!("b")) ...

--

Reply via email to