This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Strange behavior


Hi,
	I get the following behavior.  Is there something wrong with the
code or with g++?  Note, I didn't get a warning about using typename.

--jc
------------------------------------
~/src/bug% /usr/local/bin/g++ -pedantic bug9.cc
bug9.cc: In method `my_class<T>::my_class()':
bug9.cc:13: parse error before `='
[core:ttyp2]
~/src/bug% /usr/local/bin/g++ bug9.cc
bug9.cc:13: `__eq<>' does not match any template declaration
bug9.cc:13: confused by earlier errors, bailing out

-------------------------
#include <list>

template<class T>
class my_class
        {
public:

        typedef T value_type;
        typedef list<value_type> list_type;

        my_class()
                {
                list_type::const_iterator idx = _my_list.begin();
                }
        ~my_class()
                {}

private:
        list_type _my_list;
        };

--
Jimen Ching (WH6BRR)      jching@flex.com     wh6brr@uhm.ampr.org



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]