delctype
support in C++0x makes this fairly trivial to implement:
template<template <typename> class Parent, typename Param1>
Param1 get_type(Parent<Param1> const &input) { return Param1(); }
SomeTpl<int> some_obj;
delctype(get_type(some_obj)) x;
(Though you need a separate get_type definition for templates with 2, 3, 4, etc parameters.)
Unfortunately, I don't think there is a way to do this without decltype, because to do so required automatic the type-deduction provided by function templates (which is not available for class templates) and so there's no way to make a typedef that way.
I don't know off-hand if boost has anything like this already, but if they do it will still require your compiler to support decltype
, but since decltype is so new there is not a lot of stuff in boost that uses it yet (though there is some).