The _StoredObj_ union is in global namespace in _ObjectPool.hpp_. Make the type a part of _ObjectPool_.