[x] I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.
Changes Proposed
Using a namespace rather than a singleton/global has two major advantages:
it avoids accidentally creating a new instance (which can be fixed with private constructor + getInstance static method, but this is verbose)
it does not generate RTTI for the class
It also reduces the size of the header by hiding what would be private in an anonymous namespace, and gives better opportunity to optimize it (no external interface to respect = compiler can go nuts)
Pull Request Prelude
Changes Proposed
Using a namespace rather than a singleton/global has two major advantages:
getInstance
static method, but this is verbose)It also reduces the size of the header by hiding what would be
private
in an anonymous namespace, and gives better opportunity to optimize it (no external interface to respect = compiler can go nuts)Issues addressed: