Weird template instantiation speed?
IchorDev
zxinsworld at gmail.com
Sun Jul 9 11:54:16 UTC 2023
While working on some new bindings, I've discovered that if
`opAssign` in a struct template "`BindingTempl(T)`" has the
return type "`BindingTempl!T` then it adds about 4 seconds to the
compile time per instantiation of `BindingTempl`. The added
compile time is much lower if a function other than `opAssign`
returns `BindingTempl!T`. Is opAssign a particularly bad operator
to overload in templates or something?
More information about the Digitalmars-d-learn
mailing list