template<typename T>
class BXT {
public:
typedef T Mystery;
template<typename U>
struct Magic;
};
template<typename T>
class DXTT : private BXT<T> {
public:
usingtypename BXT<T>::Mystery; //compile error:'Mystery' does not
//name a type (in GCC 4.7). WHY?
Mystery* p; // would be a syntax error if not for the typename
};
template<typename T>
class DXTM : private BXT<T> {
public:
using BXT<T>::template Magic; // ERROR: not standard
Magic<T>* plink; // SYNTAX ERROR: Magic is not a
}; // known template
Line 12 is well in MS vc environment, but it will lead a compile error using GCC4.7,why?
That bug report shows the bug as fixed.
The particular part of the code should compile
(The second half of the code - attempting to use the struct Magic should still fail though)