Empty Result
H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Apr 17 12:33:16 PDT 2017
On Mon, Apr 17, 2017 at 12:05:19PM -0700, Ali Çehreli via Digitalmars-d-learn wrote:
[...]
> auto byNode(const(Tree) tree) {
> alias RangeType = typeof(byNode(tree.root));
Could this possibly be simplified to:
alias RangeType = typeof(return);
?
Or does that cause a circular dependency that makes the compilation
fail?
> return (tree.root
> ? byNode(tree.root)
> : new RangeType(() {})); // ← Empty range
> }
[...]
T
--
WINDOWS = Will Install Needless Data On Whole System -- CompuMan
More information about the Digitalmars-d-learn
mailing list