Created
April 5, 2016 13:06
-
-
Save Jon889/502d6bad706632ff414e521cfbc2ea49 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
template <class A> struct Failable | |
{ | |
bool error; | |
A value; | |
wxString errorString; | |
Failable(wxString errorStr) : error(true), errorString(errorStr) {} | |
Failable(A val) : error(false), value(val) {} | |
operator A() const { return value; } | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment