In my cuda-api-wrappers library, I have the following bit of code (snipped for brevity):
namespace memory { namespace managed { namespace detail { template <