|
Boost : |
Subject: Re: [boost] [iterators] Missing typedefs in v1.57
From: gast128 (gast128_at_[hidden])
Date: 2014-12-10 08:30:14
> Some compilers do not perform name binding properly, effectively
> delaying all of it to the template instantiation point. This is not a
> conforming behavior, and it can let errors like this pass unnoticed.
I had reported this issue as well and afaik Visual Studio 2010 does not
handle non dependent name look-up in dependent base class correctly:
template <typename T>
struct Base
{
typedef T Type;
int m_n;
};
template <typename T>
struct DerivedT : public Base<T>
{
void Foo()
{
//illegal code accepted by VS2010?
#if 1
Type t;
m_n = 0;
#else
typename Base<T>::Type t; //make name dependent
this->m_n = 0;
#endif
}
};
Somehow with the old Boost (1.52) iterator_facade using the reference type
directly in derived class was accepted by Visual Studio 2010 while the new
code is (correctly) rejected.
Anyway i am not a template magician, so may be this gives a clue.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk