|
|
|
|
|
by ensiferum
3549 days ago
|
|
I think the example is either naive or then contrived. There's probably some behavioral changes that go with the state of the connection in which case you'd be much better served by having a State interface and then implementations for different actual states. For example: class State { ... }; class Connected : public State { ... }; std::unique_ptr<State> state; |
|