Hi D
I have a main "loop" for a data processing program that looks much as follows:
sourceRange
.operatorA
.operatorB
.operatorC
.operatorD
.operatorE
.operatorF
.operatorG
.operatorH
.copy(destination);
Where all operator
items above are InputRange structs that take an upstream range, and the pipeline really is 9 operations deep.
In order to handle new functionality it turns out that operatorG needs to be of one of two different types at runtime. How would I do something like the following:
auto virtualG; // <-- probably invalid code, illustrating the idea
if(runtime_condition)
virtualG = operatorG1;
else
virtualG = operatorG2;
sourceRange
.operatorA
.operatorB
.operatorC
.operatorD
.operatorE
.operatorF
.virtualG
.operatorH
.copy(destination);
?
I've tried various usages of range.InputRangeObject
but haven't been able to get the syntax right. Any suggestions on the best way to proceed? Maybe the whole chain should be wrapped in InputRangeObject classes, I don't know.
Thanks,