Hi all,
While porting some code which compiles under gcc (up to 4.9) and MSVC (2012, 2013) I’ve came across this code snippet that is refused by clang and it’s not obvious to me that it is a genuine error. I’m asking here before creating a bug report.
Code in gcc.godbolt.org: http://goo.gl/5mNiY6
--------------8<--------------8<--------------8<--------------8<--------------
#define BEFORE // No error if this line is commented
#define AFTER
template
struct Ptr
{
template<typename U, typename V> struct _Auto;
};
#ifdef BEFORE
Ptr asd;
#endif
template
template
struct Ptr::_Auto<void,V>
{
static const int params[];
};
const void* q = &Ptr::_Auto<void,void>::params;
// Error on this line:
// error: no member named ‘params’ in ‘Ptr::_Auto’
#ifdef AFTER
Ptr asd;
#endif
--------------8<--------------8<--------------8<--------------8<--------------
Thanks!