Created
March 12, 2019 09:03
-
-
Save TheZoq2/21cd4e7ed9ea705bea180c1fe33c0f2a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node; | |
class FractionalNode { | |
virtual double min() = 0; | |
virtual double max() = 0; | |
}; | |
class BooleanNode; | |
template<class Result> | |
class If : Result { | |
If(BooleanNode condition, Result on_true, Result on_false) { | |
static_assert(Result is node); | |
} | |
// If Result is FractionalNode, impl min, max | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment