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
// The status_variable class is a templated class that is used to handle the status | |
// of a variable with a predefined success code. Any assignment to this variable | |
// that does not match the success code results in an exception being thrown. | |
template <typename T> | |
class status_variable | |
{ | |
public: | |
status_variable() = default; | |
explicit status_variable(int success_code) : success_code(success_code) {} | |
void operator=(T other) |