I have some problem with 'using' keyword in c++11. This piece of code should create alias for pointer to another type.
template <typename T>
class SomeClass
{
typedef typename std::add_pointer<T>::type pointer;
template <typename U>
using rebind_pointer = typename std::pointer_traits<pointer>::rebind<U>;
}
SomeClass<int> obj;
But in gcc 4.7 I've got compile error:
typename std::pointer_traits<int*>::rebind
namestemplate<class _Up> using rebind = _Up*
, which is not a type
I found out that pointer_traits::rebind is a template alias itself so maybe that is problem ?