www.digitalmars.com         C & C++   DMDScript  

c++ - C++ bug: incorrect treatment of n-level member typedef access

reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
    struct string
    {
        static const int    npos = -1;
    };

    struct pair
    {
        typedef string  first_type;
        typedef string  second_type;
    };

    struct container
    {
        typedef pair    value_type;
    };

    int main()
    {
        typedef container   container_t;

        return container_t::value_type::first_type::npos;
    }


This one's causing problems all over the place. All other compilers accept this
without complaint.
Apr 01 2005
parent reply "Walter" <newshound digitalmars.com> writes:
Fixed. -Walter
Apr 20 2005
parent "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
Excellent!

Now for them subscript bugs. :-)

"Walter" <newshound digitalmars.com> wrote in message 
news:d46pd4$1ich$1 digitaldaemon.com...
 Fixed. -Walter

 
Apr 20 2005