Related discussion at https://forum.dlang.org/thread/efjydhujahujqjrvmnsk@forum.dlang.org Fails with "dmd -m64" on Microsoft Windows: --- import core.stdcpp.vector: stdcpp_vector = vector; void foo(stdcpp_vector!(S)* s) {} struct S { stdcpp_vector!int a; } void main(){} --- main.d(7): Error: struct core.stdcpp.vector.vector(T, Alloc = allocator!T) recursive template expansion main.d(7): while looking for match for stdcpp_vector!(int, allocator!int) ......\src\druntime\import\core\stdcpp\vector.d(33): Error: template instance core.stdcpp.allocator.allocator!(S) error instantiating main.d(3): instantiated from here: stdcpp_vector!(S) Succeeds with "dmd -m64" on Microsoft Windows: --- import core.stdcpp.allocator: allocator; import core.stdcpp.vector: stdcpp_vector = vector; void foo(stdcpp_vector!(S, allocator!S)* s) {} struct S { stdcpp_vector!int a; } void main(){} ---
@n8sh created dlang/druntime pull request #3309 "Fix inscrutable template error when core.stdcpp.vector of a struct with a core.stdcpp.vector field is referenced before the struct's definition" fixing this issue: - Fix Issue 21468 - Inscrutable template error when core.stdcpp.vector of a struct with a core.stdcpp.vector field is referenced before the struct's definition Related discussion at https://forum.dlang.org/thread/efjydhujahujqjrvmnsk@forum.dlang.org https://github.com/dlang/druntime/pull/3309
dlang/druntime pull request #3309 "Fix inscrutable template error when core.stdcpp.vector of a struct with a core.stdcpp.vector field is referenced before the struct's definition" was merged into stable: - 12a56aa5fc19552637634f2cf1e56a250589d1fc by Nathan Sashihara: Fix Issue 21468 - Inscrutable template error when core.stdcpp.vector of a struct with a core.stdcpp.vector field is referenced before the struct's definition Related discussion at https://forum.dlang.org/thread/efjydhujahujqjrvmnsk@forum.dlang.org https://github.com/dlang/druntime/pull/3309
dlang/druntime pull request #3315 "merge stable" was merged into master: - 1e64c52ef762049e2f12e55fc1d00dff4bd76d92 by Nathan Sashihara: Fix Issue 21468 - Inscrutable template error when core.stdcpp.vector of a struct with a core.stdcpp.vector field is referenced before the struct's definition Related discussion at https://forum.dlang.org/thread/efjydhujahujqjrvmnsk@forum.dlang.org https://github.com/dlang/druntime/pull/3315