"Singleton" is widely considered anti-pattern ("bad" in everyday language).
What about this alternative modified singleton pattern?
An object constructor for our class ensures that at any given point of time there is at most one instance of the object (yes, this uses a global boolean variable). If the user attempts to create an object of our class while another object of the class is created (and not yet destructed), the constructor throws an exception.
This way we can ensure that two objects (possibly holding a global external state) cannot interfere with each other and disturb each other to operate as planned.
This facilitates such things as testing, as the object can be created in a test case.
So, should such modified singleton pattern be accepted? can it be it a pattern? or yet anti-pattern?