If a class is written well, you should be able to gleam all relevant information about the class simply by looking at its header.
If one sees that the constructor is marked explicit
:
- What should one assume to be absolutely true about this class?
- What should one assume to be potentially true about this class.
- What sort of bugs could one expect, if
explicit
is violated somehow?
If what I am asking is not clear; In the same way that if I see a member function marked virtual void sneed() = 0;
- Its absolutely true that this is an abstract class
- Its potentially true that this is some sort of factory
- And that if I do not impliment it, the program will not compile.
Thanks.