In gcc-4.7, a type inherited via using is distinct from a type defined
by using.
$ cat t.cpp
template <typename>
class A
{
public:
typedef void a;
typedef void b;
};
template <typename T>
class B : protected A<T>
{
protected:
using typename A<T>::a;
using b = typename A<T>::b;
public:
static inline a f1();
static inline b f2();
};
template <typename T>
typename B<T>::a B<T>::f1() {} // fails for gcc-4.7, works in later
template <typename T>
typename B<T>::b B<T>::f2() {} // works in both
$ gcc-4.7 -Wall -Wextra -std=gnu++0x -O2 -c t.cpp
t.cpp:21:18: error: prototype for 'typename B<T>::a B<T>::f1()' does not match any in class 'B<T>'
t.cpp:16:18: error: candidate is: static typename A<T>::a B<T>::f1()
t.cpp:16:18: warning: inline function 'static typename A<T>::a B<T>::f1() [with T = int; typename A<T>::a = void]' used but never defined [enabled by default]
$ gcc-4.8 -Wall -Wextra -std=gnu++0x -O2 -c t.cpp
$
Fixes: 8b7c5c3e2b ("Rewrite valptridx")