On Aug 6, 2003, Benjamin Kosnik <bkoz@redhat.com> wrote:
I think a perfect template aliasing model would make the problem go
away because we could do this:
namespace std {
namespace __release {
template<typename T, typename Allocator = std::allocator<T> >
class vector; // define release-mode vector
}
namespace __debug {
template<typename T, typename Allocator = std::allocator<T> >
class vector; // define debug-mode vector
}
}
We'd need such a perfect template aliasing model to enable one to
specialize templates in namespaces other than the one in which the
template was defined. Where we stand now, a number of our customers
are running into problems specializing template code that moved from
the global namespace to namespace std or __gnu_cxx. Unfortunately we
reject specializations that are not syntactically inside namespace
blocks that match that of the original declaration. I *think* this is
mandated by the Standard, which is quite unfortunate.